GsSetOffset

Sets the drawing offset

void GsSetOffset (
        int offx,
        int offy
)

Arguments

offx Drawing offset X coordinate
offy Drawing offset Y coordinate

Return Value

None.

Explanation

The value of the drawing offset is set to (offx, offy).
GsSetOffset() differs from GsSetDrawBuffOffset() in that GsSetDrawBuffOffset() sets the offset to the value specified by the global variable POSITION, whereas GsSetOffset() sets the offset to the value specified by the argument.
The value set by GsSetOffset() is temporary in that it does not update the global variable POSITION and is only valid within the current draw buffer. This is because when the double buffer is swapped, GsSwapDispBuff() calls GsSetDrawBuffOffset() which sets the offset from the global variable POSITION. This value remains valid until it is changed by GsSetOrign().
The offset specified as an argument is a relative offset inside the double buffer. In other words, the offset is added to the double buffer base to calculate the drawing address. The third argument of GsInitGraph() determines whether the offset is managed by the GTE or the GPU.

Notes

This function does not execute correctly if it is called when GPU drawing is in progress. ResetGraph(1) should be used to terminate any current drawing process or DrawSync(0) should be used to wait until drawing is completed before this function is called.

See Also

GsSetDrawBuffOffset()