Skip to content

Commit

Permalink
fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ffreyer committed Jun 17, 2024
1 parent ff9322c commit 50b20a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions CairoMakie/src/primitives.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion CairoMakie/src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 50b20a2

Please sign in to comment.