Coordinate

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

Physical coordinates

Physical coordinates are the coordinate system that describes the device.

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

Coordinate origin, axis orientation, scaling scale can not be changed.

Logical coordinates

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

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

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

Coordinate origin can be modified by setorigin function.
The axis direction can be modified by the setaspectratio function.
The scaling scale can be modified by the setaspectratio function.

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