Skip to content

Image RTL #11391

Closed
Closed

Description

@Hixie

Image should take a way to autoflip in RTL.

Activity

  1. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    a: internationalizationSupporting other languages or locales. (aka i18n)
    on Jul 25, 2017
  2. added this to the 3: Current Milestone milestone on Jul 25, 2017
  3. abarth commented on Aug 29, 2017

    @abarth
    Contributor

    Also, the alignment should be directional.

  4. abarth commented on Aug 29, 2017

    @abarth
    Contributor

    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.

  5. abarth commented on Aug 29, 2017

    @abarth
    Contributor

    Looks like the icon flipping is #11368

  6. Hixie commented on Aug 30, 2017

    @Hixie
    ContributorAuthor

    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.

  7. Hixie commented on Aug 30, 2017

    @Hixie
    ContributorAuthor

    (plus the alignment issue, as you noted)

  8. abarth commented on Sep 8, 2017

    @abarth
    Contributor

    Also, RawImage, Image, and FadeInImage.

  9. self-assigned this
    on Sep 22, 2017
  10. Hixie commented on Sep 23, 2017

    @Hixie
    ContributorAuthor

    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.

  11. Hixie commented on Sep 23, 2017

    @Hixie
    ContributorAuthor
  12. abarth commented on Sep 23, 2017

    @abarth
    Contributor

    Looks promising.

  13. Hixie commented on Sep 23, 2017

    @Hixie
    ContributorAuthor

    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...

  14. abarth commented on Sep 23, 2017

    @abarth
    Contributor

    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.

  15. github-actions commented on Sep 4, 2021

    @github-actions

    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.

  16. locked as resolved and limited conversation to collaborators on Sep 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions