Code Monkey home page Code Monkey logo

Comments (5)

CircuitCipher avatar CircuitCipher commented on September 26, 2024

It looks like on Flash, as you resize the stage, the TextField's width and height are affected, whereas in NME, the height and width do not change. This could be part of the problem.

from nme.

CircuitCipher avatar CircuitCipher commented on September 26, 2024

Alright so I have a in-progress hack solution here: https://github.com/JandyCo/nme/tree/text-scale-alignment

I just wanted to commit this so that there is some documentation of what I've been doing and others can look into it. Possibly @hughsando and @jgranick ? But I will look into it more tonight and tomorrow.

  • Width and Height are not reported properly with textboxes. Right now I've just hacked this to be close by returning textWidth and textHeight.
    • I will probably look at this more soon.
  • GetExtent seems to be the real culprit of this issue.
  • Made the gfx dirty at the end of ::Layout so that the background would be drawn correctly.
  • Builds on the text-clipping PR, #135

from nme.

hughsando avatar hughsando commented on September 26, 2024

It seems nme has mixed up scaleX and scaleY somewhere.
Flash seems to ignore scaleX for text boxes.
Using textWidth instead of width is only really meaningful with autosize - have to investigate what happens without this set. Also, with embedFonts, a more normal transform is allowed.
I have been thinking about redoing the way clipping happens (not using a viewport, but instead a set of tiles/quads) to allow non-orthogonal transforms.

from nme.

CircuitCipher avatar CircuitCipher commented on September 26, 2024

I created a pull request with a cleaned up version of some of the changes I made reference in this issue. I don't know if you want to merge this in the meantime or if you have a fix in mind that you would like to perform.

#139

from nme.

hughsando avatar hughsando commented on September 26, 2024

I have implemented the scaling changes. It should be very similar to flash now when the scaleX=scaleY. When they differ, flash does some strange stuff which I'm not sure I want to emulate.

from nme.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.