Skip to content

Commit 2adc795

Browse files
jaakkor2SimonDanisch
authored andcommitted
Don't mesh a polygon in CairoMakie (MakieOrg#2398)
* Don't mesh a polygon * Test against polygon rasterization Co-authored-by: Simon <[email protected]>
1 parent 40232ab commit 2adc795

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Diff for: CairoMakie/src/overrides.jl

+2
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ function polypath(ctx, polygon)
124124
end
125125
end
126126

127+
draw_poly(scene::Scene, screen::Screen, poly, polygon::Polygon) = draw_poly(scene, screen, poly, [polygon])
128+
127129
function draw_poly(scene::Scene, screen::Screen, poly, polygons::AbstractArray{<:Polygon})
128130
model = poly.model[]
129131
space = to_value(get(poly, :space, :data))

Diff for: CairoMakie/test/rasterization_tests.jl

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ end
1414
fig = Figure()
1515
ax = Axis(fig[1,1])
1616
lp = lines!(ax, vcat(1:10, 10:-1:1))
17+
pts = Makie.GeometryBasics.Point2f[(0,0), (1,0), (0,1)]
18+
pl = poly!(ax, Makie.GeometryBasics.Polygon(pts))
1719

1820
@testset "Unrasterized SVG" begin
1921
@test svg_has_image(fig)

0 commit comments

Comments
 (0)