Canvas objects - very inaccurate

Coordinates (x,y) of objects on canvas doesn’t place in real numbers manner.
Example: x = 1.99 floors to 1.0. Between x = 1.0 and x = 1.99 there’s no difference. Between x = 1.0 and x = 2.0 there’s is difference.
Does canvas operate only on integers?

You found your own answer. It is all pixel based.

2 Likes

Okay. Is it possible to change “pixel size” to that of real pixel size of a phone? I thought canvas somehow make use of real pixels (so it allows not integers only) and it seems like it’s limited just by the width of the component.

And Line Width property is not limited by integer. I mean Line Width property can operate on “subpixels”.

I did some “research” to be sure. Only lines, and points coordinates on canvas are dependent on integers. Ball and sprites operate on real numbers without a problem. So there’s difference between ball movement and drawn lines and points. In my opinion it could be improved in the future.