I have a problem when dealing with label component on AS3. The text was blurry on one application but not on the other. I have used the same code when dealing with the label component except the one with clear text used scaling to scale the label component and not being used on the other.
Is there because the scale that cause the problem?
Not sure if its scaling but it seems Z-Index causes the issue.
I fixed it by removing my x and z values (you may also consider removing y). In my case layout was relative with no layers, so these values were useless.
Related
I tried using the SCNFloor and Material, but it draws with limited width and length.
Is there any way I can generate an infinite grid.
Probably this could be the issue: Have you checked the zFar value of your SCNCamera? the Default is: 100m (this means everything that's more fare away is clipped by the renderer) - you might want to set it to a really high value and also disable the automaticallyAdjustZRange property (what should be the default). Hope I could help you.
I am working on a graphics application and have a number of objects with captions. To put the captions, I calculate an X, Y coordinate and call:
Canvas.TextOut(XText, YText, FCaption);
I decided to use a different mapping mode to make conversions from world space to device space simpler:
SetGraphicsMode(cnv.Handle, GM_ADVANCED);
SetMapMode(pbxMain.Canvas.Handle, MM_HIENGLISH);
and now my captions are printing upside down, but still left to right.
Any thoughts on how to remedy that?
One approach I had considered was setting the map mode back to the default for outputting text, which would require some conversions to get X, Y in the different mode. Is that a reasonable tactic? Is it "correct" to change map mode during paint routines...?
Although the y axis reversed when you set MM_HIENGLISH map mode, assuming a default previous value of MM_TEXT, it doesn't cause text to be output upside-down - it just effects where it's output.
You might want to check if you're calling SetWorldTransform which is a probable cause for the problem you observe - a faulty transformation. A negative value in eM22 of the transformation structure parameter causes a reflection in the y axis.
Regarding the last part, I don't see any problem switching map modes during a single drawing task, apart from it might complicate maintaining the code.
I am trying to think of a way to render a sub-hierarchy that is somewhat complex, and would look good (crisp) when drawn at multiple scales.
I would expect there to be some container view with a size, and this subview could be constrained within it and drawn properly.
If it helps think of a hierarchy like a calculator keypad or computer keyboard even:
You would have a keyContainer view, and a bunch of key views (or layers) of various sizes and positions.
Suppose I wanted this to be drawn in a container that was 320 x 320. I was thinking if I knew the ratio of w:h for each key and I knew the ratio of a key's width to the width of the whole container, then I could work out the sizes and positions for the key. I've found in practice the math seems to introduce a lot of rounding errors and you end up on off-pixel boundaries so the final rendering does not look great.
So how would you tackle a problem like this?
Thanks for any ideas.
I've imported a vector layer from a psd into paint code v1, I'm trying to create a background image and make it universal.
I can't seem to add a frame around the vector, to complicate matters, I only need a portion, the center, of the layer. (The design is based around a circle, it has lines drawn towards the center of the circle.)
I can’t seem to add a frame to dynamically resize the part I need.
I found this http://www.raywenderlich.com/36341/paintcode-tutorial-dynamic-buttons the part about frame ans groups doesn't help me....
When I add a click frame and drag it around the area I need, it's at the same level as the vector layer. I've also tried adding a group around both, but that doesn't seem to obey the frame size either.
I’ve looked through the tutorials and googled adding a frame, but I can’t seem to achieve what I need.
EDIT
A frame is supposed to be at the same level as the vectors you're working with.
All you do then is set the resize rules of your vectors. There is a little rectangle in the frame's parameters interface with straight arrows and springs that you can modify to fit your wishes.
I think I also remember a checkbox setting to resize only what's inside the frame.
Now I haven't used PaintCode for a while, but if this doesn't help you, there probably is a problem with your vector layer.
I don't know if this information helps.
But if you resizing doesn't work as you expected. Look carefully at the transformation box (the one with the springs attached). When you have put a frame around your object. The middle dot in this box should be blue instead of green. if t's green, you may have a problem with the originating point of your objects and then the resizing may not work as you expected.
The left hand side of the replaced text is being clipped by a few pixels, and I can't figure it out. The only thing that seems to solve the problem is setting everything to text-align: center, but that's obviously very impractical. Not sure what I've done wrong as I can't find any reports of a similar problem.
I'm using Glow and DropShadow filters, the problem persists if any of them are used independently from the other.
Any ideas? Thanks.
You can use the offsetLeft parameter to move the text to the right, and if necessary use tuneWidth to make the movie wider.
offsetTop and tuneHeight do the same for the vertical axis, and you can use negative values.