Coordinate

In EasyX, coordinates are divided into two types: physical coordinates and logical coordinates.

Physical coordinates

Physical coordinates are the coordinate systems that describe a device.

The coordinate origin is in the upper-left corner of the device, the X-axis is positive to the right, the Y-axis is positive down, and the unit of measure is pixels.

The coordinate origin, axis direction, and scale cannot be changed.

Logical coordinates

Logical coordinates are the coordinate systems used for drawing in a program.

The default origin of the coordinates is in the upper-left corner of the window, the X-axis is positive to the right, the Y-axis is positive to the right, and the unit of measure is the point.

By default, logical coordinates correspond to physical coordinates one-to-one, and a logical point is equal to a physical pixel.

In this manual, any coordinates that are not indicated refer to the logical coordinates.

See Also

setorigin: Modify the coordinate origin.

setaspectratio: Modify the axis direction.

setaspectratio: Modify the scaling scale.