-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement WebGL marker line joins #12055
Conversation
I personally think the way you have rendered |
I tend to use large markers with big line widths as that is the only way I can tell if I am rendering them correctly. I accept that this is not a usual use case! So probably we aren't concerned about the slight differences now and can reconsider it later if anyone has the time and/or inclination to do so. Hence I will tag this as ready for review. |
* Line joins for markers * Use same antialiasing width for all webgl markers * Correct size hints * Baseline image changes * Marker glyph should support line join test
* Fix webgl line NaN handling (#11829) * Fix webgl line nan handling * Add baseline images * Support multiple marker types in WebGL scatter (#11840) * Support multiple marker types in WebGL scatter * Update macos/windows baseline images * Changes following review * Add docs about different render order * Remove temporary webgl circle fix (#11849) * Add regression test for updating webgl line (#11884) * Add regression test for updating webgl line (issue #8346) * Update macos and windows baseline images * Unify WebGL markers and rects (#12040) * Unify markers and rects * Baseline images * Consistent code style * WebGL typescript refactor and add quad glyph (#12046) * SingleMarkerGL for rect and quad * MarkerGL inherits from BaseMarkerGL * Better class hierarchy * Test WebGL quad glyph * Separate CircleGL class * Avoid use of any * Remove code duplication * Implement WebGL marker line joins (#12055) * Line joins for markers * Use same antialiasing width for all webgl markers * Correct size hints * Baseline image changes * Marker glyph should support line join test * WebGL support for HBar VBar and HexTile glyphs (#12061) * Add WebGL HBar and VBar glyphs * Add WebGL HexTile glyphs * Visual test changes * Include rotation in should_support_Rect test * Minor WebGL line refactor (#12120) * Fix Wedge and AnnualWedge glyph hitboxes (#12071) * Fix Wedge and AnnualWedge glyph hitboxes * Hitbox tests for Wedge and AnnualWedge glyphs Co-authored-by: Michael Brown <michael@msbrown.net>
This PR implements line joins for all WebGL markers, including
quad
andrect
. WebGL markers now implement all visual properties except for line dashes which are silently ignored. I have also fixed the antialiasing width to be the same for all markers, as discussed in PR #12046, whilst I was changing the baseline images anyway.The only thing I am not completely happy with is the appearance of
square_pin
andtriangle_pin
as I am using circular arcs instead of quadratic bezier curves because they are much faster to calculate but look slightly different from canvas/svg. I may return to this eventually but they are good enough for now.New visual test image showing the 3 possible line joins (
round
,miter
,bevel
) for those markers for which it makes a difference:There are two notable discrepancies here:
square
glyphs don't use the line join at the top left hand corner.triangle_pin
withline_join='miter'
only has an upward spike for canvas/svg whereas I have implemented spikes on all 3 points because it is easier that way. Ideally they would all be the same, but which should be modified?This work is part of the CZI round 3 extension.