What is the meaning of 0.5 pixel?

In this event-handler we add 1.5 pixels to the y position of the ball and it executes correctly.

half-pixel

But what does 0.5 pixel mean? How could it move 0.5 pixel?

The canvas allows for the setting of decimal point positioning of objects.

The size of pixels depends on the resolution of the device/display.

1 Like

These are not real physical pixels, but density-independent pixels (dp)

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.