Home > Language Reference > Classes > Display
CoordinateSystem Property
Coordinates system.
Syntax
Public Property Get CoordinateSystem() As HbCoordinates
Public Property Let CoordinateSystem(ByVal eCoord As HbCoordinates)
| Parameter | Description |
| eCoord | New coordinates system. |
Remarks
The CoordinateSystem defines how coordinates passed to drawing methods (such as PutPixel or Rectangle) should be interpreted. It is only available when running on devices running Palm OS® 5.0 or higher and having a high-density display. On other devices, calling these properties is simply ignored.
This property can takes one of the following values:
| Constant | Value | Description |
| hbCoordinatesNative | 0 | Coordinates are interpreted as pixels, and are passed "as is" to the underlying hardware. |
| hbCoordinatesStandard | 72 | Coordinates are normalized so that the bottom right corner of the full screen is located at (159,159). This is the default mode, which is also used in the IDE when positionning controls on a form. |
| hbCoordinatesOneAndAHalf | 108 | Coordinates are normalized so that the bottom right corner of the full screen is located at (239,239). |
| hbCoordinatesDouble | 144 | Coordinates are normalized so that the bottom right corner of the full screen is located at (319,319). |
| hbCoordinatesTriple | 216 | Coordinates are normalized so that the bottom right corner of the full screen is located at (479,479). |
| hbCoordinatesQuadruple | 288 | Coordinates are normalized so that the bottom right corner of the full screen is located at (639,639). |
The hbCoordinatesNative mode allows full positionning of drawings on the screen or in a bitmap. In this mode, coordinates are expressed in pixels. In all other modes, coordinates are considered to be logical coordinates, and are converted to native coordinates taking into account the screen or bitmap density on which the drawing takes place, using the following formula:
Coord(pixels) = Coord(logical) * Density / CoordinateSystem
If the Display object on which drawing is performed is a Bitmap, the Density parameter refers to the bitmap density, as returned by the Density property. On the other hand, if the Display object is a Form or a control, the Density parameter refers to the screen density, as returned by the ScreenDensity property of the SystemInfo class.
Note that hbCoordinatesNative and hbCoordinatesStandard define the same coordinates system when running on a low-density device, while hbCoordinatesNative and hbCoordinatesDouble define the same coordinates system when running on a double-density device, and so on.
As mentionned before, not all devices support high density and coordinates system. You can determine if a given coordinates system is available by setting this property, and checking afterwards that the new mode was taken into account. For example:
Me.CoordinateSystem = hbCoordinatesDouble If Me.CoordinateSystem<>hbCoordinatesDouble Then ' Not supported Else ' OK End If
It is strongly advised to read the Graphics section of this documentation to learn more about coordinates system, and bitmap and screen densities.
Note: the active coordinates system only applies to drawings performed using the Display methods. Controls and forms positionning always uses standard coordinates, that is normalized to a 160x160 display.
System requirements
| System | Minimal version | Remarks |
| Palm OS | Palm OS 5.0 | Only effective on devices having a high density screen. |