DiGrande.it

Blind, Braille and Embossing Technologies

This site uses cookies to personalize content and ads, provide social media features and analyze links. By closing this banner or continuing to browse, you consent to their use.
Read the DiGrande.it Cookie Policy

GraphicOffset- Sets an offset to drawing coordinates

Sets horizontal and vertical offset values, added to all drawing instructions.

- GraphicOffset(X,Y)

Parameters:

- (int) X: Horizontal offset;

- (int) Y: vertical offset.

Description:

Use GraphicOffset to set an offset or, in other words, a new origin point (usually located at the 0x0y point). The instruction can be used in any part of the code.

By changing the origin point, the offset values are added to all X Y coordinates used in the figure drawing. This means that the coordinates specified in the figures will remain unchanged, but their design will be moved forward or backward depending on the set Offset.

The constants OffsetX and OffsetY contain the offset values.

Examples:

- Draw two similar circles, but the second is shifted from the first by 40 points horizontally and 30 points vertically. The absolute position in which it is plotted is calculated: 40+20, 30+20

Circle(20,20,15)

GraphicOffset(40,30)

Circle(20,20,15)