| ![[Previous]](../image-lib/prev.gif) | ![[Contents]](../image-lib/contents.gif) | ![[Index]](../image-lib/keyword_index.gif) | ![[Next]](../image-lib/next.gif) | 
Translate draw commands horizontally and vertically
void PgSetTranslation ( PhPoint_t const *translation,
                        int flags );
This function causes all subsequent draw commands to be translated by translation->x pixels horizontally and translation->y pixels vertically. The default translation is (0,0). You can set flags to:
Draw a square from (100,100) to (200,200):
PhPoint_t translation; PgSetFillColor( Pg_RED ); translation.x = translation.y = 100; PgSetTranslation( &translation, Pg_RELATIVE ); PgDrawIRect( 0, 0, 100, 100, Pg_DRAW_FILL );
Photon
| Safety: | |
|---|---|
| Interrupt handler | No | 
| Signal handler | No | 
| Thread | No | 
| ![[Previous]](../image-lib/prev.gif) | ![[Contents]](../image-lib/contents.gif) | ![[Index]](../image-lib/keyword_index.gif) | ![[Next]](../image-lib/next.gif) |