Comments (5)
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.
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.
- In particular the portion that I commented out here: https://github.com/JandyCo/nme/compare/text-scale-alignment#diff-a47bca31932f06b02baa285e78c693bfR1570
- Again this is just early tests and im going to look into this more.
- 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.
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.
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.
from nme.
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)
- [QUESTION] How accurate cubicTo method? HOT 2
- Issue with clipboard getdata on Android HOT 2
- Window close events
- Incompatibility with SWF library HOT 4
- Unable to run sample project on Linux HOT 3
- nme setup fails on M1 Mac
- CapabilitiesGetScreenDPI on Mac retina display concern HOT 8
- Video player on android 11 issue HOT 1
- nme build is adding empty `-cp`s
- Build Error: Invalid character: / HOT 3
- nme build neko create an empty output file.
- xcode 14.0.1 NME app hang risk warning
- Cant compile NME for android with latest hxcpp changes
- nmehost download site has been taken over, please do not visit till Hugh has resolved. HOT 1
- ByteArray writeFile doesnt work on iOS
- Android not working? HOT 9
- Exception: ZLib Error : incorrect header check(-3) HOT 1
- linux jsprime HOT 1
- [Windows] TextField does not work properly with input method
- Exception: Code offset miscaculation on gm2d.swf.Font HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nme.