This is because pixel locking is done later on. We need the sub-pixel
information to make animations smooth, among other things. Rest
assured, the transformation is happening.
Scott Evans wrote:
On Wed, 9 Nov 2005, Oliver Steele wrote:
On Nov 9, 2005, at 2:03 AM, Scott Evans wrote:
Can someone explain the sub-pixel stuff to me? How do sub-pixel views
render? If I want sharp images and lines, do I need to ensure that
everything is pixellocked?
Subpixel positioning gets blurry lines and images, with more positioning
possibilities. This makes it look worse for static images, and better for
animation, and for drawing sets of evenly spaced images where the average
spacing isn't an integral number of pixels.
That's pretty much what I understood. But what I can't seem to figure out
is where I should declare pixellock="true" in order to get crisp lines
everywhere.
Wait! I just figured it out when I wrote a test case. It looks like x
and y values still report back as non-integer values, even though the
player is locking them to pixels. Is that expected behavior? It's a bit
surprising.
If you run the following test case, there's a visible difference between
the pixel and non-pixel-locked views -- but the debugger reports their X
positions as being the same non-integer value.
<canvas width="650" height="100%" debug="true">
<debug width="250" height="200" x="0" y="150"/>
<simplelayout axis="y" spacing="2"/>
<!-- no pixellock -->
<view id="v1" width="101" height="20" bgcolor="blue" align="center"/>
<!-- pixellock -->
<view id="v2" width="101" height="20" bgcolor="blue" align="center"
pixellock="true"/>
<!-- nested view, parent pixellocked -->
<view id="v3" width="100" height="20" bgcolor="red" align="center"
pixellock="true">
<view id="v4" width="51" height="20" align="center" bgcolor="blue"/>
</view>
<!-- nested view, both pixellocked -->
<view id="v5" width="100" height="20" bgcolor="red" align="center"
pixellock="true">
<view id="v6" width="51" height="20" align="center" bgcolor="blue"
pixellock="true"/>
</view>
<button text="debug.">
<method event="onclick">
Debug.format('v1: %s\nv2: %s\nv3: %s\nv4: %s\nv5: %s\nv6: %s\n',
v1.x, v2.x, v3.x, v4.x, v5.x, v6.x);
</method>
</button>
</canvas>
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user