diff --git a/CairoMakie/src/primitives.jl b/CairoMakie/src/primitives.jl index 5575d81263d..b2dafb1f26f 100644 --- a/CairoMakie/src/primitives.jl +++ b/CairoMakie/src/primitives.jl @@ -3,9 +3,8 @@ ################################################################################ function draw_atomic(scene::Scene, screen::Screen, @nospecialize(primitive::Union{Lines, LineSegments})) - @get_attribute(primitive, (color, linewidth, linestyle)) + @get_attribute(primitive, (color, linewidth, linestyle, space, model)) ctx = screen.context - model = primitive[:model][] positions = primitive[1][] isempty(positions) && return @@ -218,8 +217,8 @@ end function draw_multi(primitive::Lines, ctx, positions, colors::AbstractArray, linewidths::AbstractArray, indices, dash) colors = colors[indices] linewidths = linewidths[indices] - @assert length(positions) == length(colors) - @assert length(linewidths) == length(colors) + @assert length(positions) == length(colors) "$(length(positions)) != $(length(colors))" + @assert length(linewidths) == length(colors) "$(length(linewidths)) != $(length(colors))" prev_color = colors[begin] prev_linewidth = linewidths[begin] diff --git a/CairoMakie/src/utils.jl b/CairoMakie/src/utils.jl index 2467a03eecc..36f53d91b8a 100644 --- a/CairoMakie/src/utils.jl +++ b/CairoMakie/src/utils.jl @@ -241,7 +241,7 @@ function project_line_points(scene, plot::T, positions) where {T <: Union{Lines, if disconnect2 last_is_nan = true push!(screen_points, clip2screen(p2), Vec2f(NaN)) - push!(indices, i+1) + push!(indices, i+1, i+1) end end end