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 imagine this will just be a boolean on Image that, if the ambient directionality is rtl, flips the image using a scaleX(-1) transform. (This boolean would be ignored if null, and if true or false would require a direcitonality.) Maybe the API is that you provide an imageDirection and it has to match the textDirection? I guess it'd be less confusing to just have the boolean.
I have a patch that adds bool matchTextDirection to DecorationImage, Image, and FadeInImage, and adds a bool flipHorizontally to paintImage, RawImage, and RenderImage. It also adds a textDirection to ImageConfiguration.
Still needs tests and the alignment to be made directional on DecorationImage, Image, and FadeInImage.
I would test the matrix that you end up pushing onto the canvas and the balancing between save/restore using the display list testing machinery. If you want to go nuts, you can teach that code how to keep track of the transform stack.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
abarth commentedon Aug 29, 2017
Also, the alignment should be directional.
abarth commentedon Aug 29, 2017
I'm not sure if there's a better idiom for flipping the rasterization than giving the canvas a matrix.
Also, some of the material design icons are supposed to flip automatically.
abarth commentedon Aug 29, 2017
Looks like the icon flipping is #11368
Hixie commentedon Aug 30, 2017
I imagine this will just be a boolean on Image that, if the ambient directionality is rtl, flips the image using a scaleX(-1) transform. (This boolean would be ignored if null, and if true or false would require a direcitonality.) Maybe the API is that you provide an imageDirection and it has to match the textDirection? I guess it'd be less confusing to just have the boolean.
Hixie commentedon Aug 30, 2017
(plus the alignment issue, as you noted)
abarth commentedon Sep 8, 2017
Also, RawImage, Image, and FadeInImage.
Hixie commentedon Sep 23, 2017
I have a patch that adds
bool matchTextDirectionto DecorationImage, Image, and FadeInImage, and adds abool flipHorizontallytopaintImage, RawImage, and RenderImage. It also adds atextDirectionto ImageConfiguration.Still needs tests and the alignment to be made directional on DecorationImage, Image, and FadeInImage.
Hixie commentedon Sep 23, 2017
master...Hixie:image-rtl is my WIP.
abarth commentedon Sep 23, 2017
Looks promising.
Hixie commentedon Sep 23, 2017
Ok the patch is updated and does the alignment too now.
Just needs tests. Any ideas what I should test? I can't test the actual image rendering very well without reference tests...
abarth commentedon Sep 23, 2017
I would test the matrix that you end up pushing onto the canvas and the balancing between save/restore using the display list testing machinery. If you want to go nuts, you can teach that code how to keep track of the transform stack.
github-actions commentedon Sep 4, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.