-
Bug
-
Resolution: Not an Issue
-
P3
-
fx1.0
-
Windows Vista Home Premium x32
When applying transforms ImageView fitWidth and fitHeight are calculated based on integer values. This causes large size jumps when the applied transformations map to a smaller coordinate space. For example use the following transform to create a coordinate space mapping 1024x768 to 120x90:
myTransform = [Scale{ x: 1024/120, y: 768/90 }, Translate{ 0, 0 }]
In my case I have the ImageView within a custom node:
class Custom extends CustomNode {
public var content : Node;
override protected function create() : Node {
return content;
}
}
Now let's create an ImageView with this:
var myNode : Custom = Custom {
content: ImageView {
image: myImg
preserveRatio: false
fitWidth: 7.5
fitHeight: 7.5
}
}
When adding this to a scene it should produce an image with 64x64 pixel size, however, it does not as the transform seems to be calculated based on the integer value 7 not 7.5.
The attached picture shows the too small image and a rectangle underneath it dimensioned with the proper size- using the same transform.
Thanks
/Chris
myTransform = [Scale{ x: 1024/120, y: 768/90 }, Translate{ 0, 0 }]
In my case I have the ImageView within a custom node:
class Custom extends CustomNode {
public var content : Node;
override protected function create() : Node {
return content;
}
}
Now let's create an ImageView with this:
var myNode : Custom = Custom {
content: ImageView {
image: myImg
preserveRatio: false
fitWidth: 7.5
fitHeight: 7.5
}
}
When adding this to a scene it should produce an image with 64x64 pixel size, however, it does not as the transform seems to be calculated based on the integer value 7 not 7.5.
The attached picture shows the too small image and a rectangle underneath it dimensioned with the proper size- using the same transform.
Thanks
/Chris