Skip to content

Commit a7bacaa

Browse files
committed
improve drawing
1 parent 458a64a commit a7bacaa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

haxe/ui/backend/ComponentBase.hx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ class ComponentBase extends Sprite implements IComponentBase {
4949

5050
private function handlePosition(left:Null<Float>, top:Null<Float>, style:Style):Void {
5151
if (left != null) {
52-
this.x = left;
52+
this.x = Math.fround(left);
5353
}
5454
if (top != null) {
55-
this.y = top;
55+
this.y = Math.fround(top);
5656
}
5757
}
5858

@@ -63,7 +63,7 @@ class ComponentBase extends Sprite implements IComponentBase {
6363
}
6464

6565
if (styleable == true) {
66-
OpenFLStyleHelper.paintStyleSection(graphics, style, width, height);
66+
OpenFLStyleHelper.paintStyleSection(graphics, style, Math.fround(width), Math.fround(height));
6767
}
6868

6969
if (style.clip == true) {

0 commit comments

Comments
 (0)