-
-
Notifications
You must be signed in to change notification settings - Fork 868
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
Complex polylines and gradient issue #1124
Comments
I think this would be expected behaviour. |
Mhhh ok. I don't know if I'm being clear, but basically something that behave like my "Picture 1", even when the path looks like picture 2 or 3. |
please ? |
My only suggestion/guess would be to not use colors with |
I'm going to close this, as I'm not sure of a way this can be done. But feel free to open if still a problem. |
I'm not currently aware of a way to do this in Flutter. A quick Google search doesn't show anything. The reason this happens is because we essentially apply the gradient to the bounding box, not the line. |
Hello there,
I'm drawing "complex" polylines with gradient, and stumble into a weird behavior !
By complex, I mean not a straight line at all, many points which can come back to the same area for exemple.
To be able to see the "begining" and "end" of the path, I am using a gradient of tree colors.
The idea is that the begining of the poyline is in one color, and slowly moove to another color the closer we are to the end.
It's seems to work rather well for "simple" path, where the path don't go back near the begining. But for complex path, it looks like there is a "leaking" effect.
Here are some screenshots to explain more clearly what I'm getting :
Picture 1 : A rather "simple path" that looks like what I wanted to acheive
Picture 2 : A "complex" path, (which comes back near some of the begining points) with the "leaking effect" observed
Picture 3 : Another "complex" path with a different "leaking effect" observed
Is this a bug, Or am I misunderstanding the way gradient works ?
I just want to draw a line which as a begining in one color and the end in another.
Can you help me ?
Here is the line of code I'm using to build the polyline :
Polyline(points:_listPoint , strokeWidth: 3, gradientColors: [ colorGradient1,colorGradient5,colorGradient9, ], )
Thank you very much !
The text was updated successfully, but these errors were encountered: