Skip to content
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

line-pattern webgl #1045

Open
nssang00 opened this issue Dec 8, 2023 · 3 comments
Open

line-pattern webgl #1045

nssang00 opened this issue Dec 8, 2023 · 3 comments

Comments

@nssang00
Copy link

nssang00 commented Dec 8, 2023

Since line-pattern is not supported, I personally used createPattern (https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/createPattern), but the problem was that the image was not drawn along the line.

However, I confirmed that the line pattern is drawn normally in the webgl version (https://openlayers.org/en/latest/examples/webgl-draw-line.html).
Are you planning to support ol-mapbox-gl webgl version?

@ahocevar
Copy link
Member

ahocevar commented Dec 8, 2023

ol-mapbox-style uses the Canvas 2D renderer. Support for line patterns is planned for the Canvas 2D renderer.

@nssang00
Copy link
Author

nssang00 commented Dec 8, 2023

Is it possible to draw in the corresponding direction along a line on a 2D canvas?

@ahocevar
Copy link
Member

ahocevar commented Dec 8, 2023

Yes, using a transform and doing separate stroke() operations for each segment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants