You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to draw some more colorful line on the map but failed,it looks like it's not even supported in SKPath with SKPaint.
Like this, use to show administrative boundaries
or this,use to show transportation information in big resolution with different direction,I think using an offset value may be able to achieve that, but I can't find a simple way to do it.
Many thanks!
The text was updated successfully, but these errors were encountered:
The2S
changed the title
Any way to draw different color in normal direction of the line?
Any way to draw different colors along the normal direction of the line using an offset value?
Jan 30, 2024
I think, that should possible with a shader in the SKPaint of the path. I would start with research in SkiaSharp or Skia. Perhaps you find there a solution.
This is mostly a SkiaSharp question so you could also ask it there (after you searched for previous questions on this topic of course). https://github.com/mono/SkiaSharp
Dash Patterns
It is possible to use dash patterns in SkiaSharp. We use this in our sample "Tests" | "Line", like this:
As far as I know you can use only one color in such a draw operation. My way to go about this would be to have two draw operations. The first color could be a solid line, and on top of that draw the dashed line, so the solid line fill the gaps in the dashed line.
Note, that for a good solution where the line looks the same while panning and zooming you need to take into account the offset (of the origin of the path is not visible in the image you need to correct for that) and the scale (the dash pattern is different for different scales to make it appear the same to the user).
I try to draw some more colorful line on the map but failed,it looks like it's not even supported in SKPath with SKPaint.
Like this, use to show administrative boundaries
or this,use to show transportation information in big resolution with different direction,I think using an offset value may be able to achieve that, but I can't find a simple way to do it.
Many thanks!
The text was updated successfully, but these errors were encountered: