![]() |
GFXprim
2D bitmap graphics library with emphasis on speed and correctness
|
Coordinate transformations for gp_pixmap swap flags. More...
#include <core/gp_common.h>Go to the source code of this file.
Macros | |
| #define | GP_TRANSFORM_X(pixmap, x) |
| Flips x coordinate within pixmap according to the x_swap flag. | |
| #define | GP_TRANSFORM_Y(pixmap, y) |
| Flips y coordinate within pixmap according to the y_swap flag. | |
| #define | GP_TRANSFORM_SWAP(pixmap, x, y) |
| Swaps coordinates within pixmap according to the axes_swap flag. | |
| #define | GP_TRANSFORM_POINT(pixmap, x, y) |
| Does the complete coordinate transformation accordingly to transformation flags. | |
| #define | GP_TRANSFORM_RECT(pixmap, rx, ry, rw, rh) |
| Transforms a rectangle accordingly to the transformation flags. | |
| #define | GP_RETRANSFORM_POINT(pixmap, x, y) |
| An inverse transformation to GP_TRANSFORM_POINT(). | |
Coordinate transformations for gp_pixmap swap flags.
These transformations are applied before a complex shapes are rendered into a gp_pixmap, e.g. each polygon coordinate is transformed before the polygon rendering algorithm starts.
Definition in file gp_transform.h.
| #define GP_RETRANSFORM_POINT | ( | pixmap, | |
| x, | |||
| y ) |
An inverse transformation to GP_TRANSFORM_POINT().
Used to translate mouse pointer coordinates to coordinates on pixmap.
| pixmap | A pixmap. |
| x | An x coordinate that may be transformed. |
| y | An y coordinate that may be transformed. |
Definition at line 129 of file gp_transform.h.
| #define GP_TRANSFORM_POINT | ( | pixmap, | |
| x, | |||
| y ) |
Does the complete coordinate transformation accordingly to transformation flags.
Uses the gp_pixmap::axes_swap, gp_pixmap::x_swap and gp_pixmap::y_swap flags to transform the coordinates.
| pixmap | A pixmap. |
| x | An x coordinate that may be transformed. |
| y | An y coordinate that may be transformed. |
Definition at line 78 of file gp_transform.h.
| #define GP_TRANSFORM_RECT | ( | pixmap, | |
| rx, | |||
| ry, | |||
| rw, | |||
| rh ) |
Transforms a rectangle accordingly to the transformation flags.
| pixmap | A pixmap. |
| x | A left x coordinate of a rectangle. |
| y | A top y coordinate of a rectangle. |
| w | A rectangle width. |
| h | A rectangle height. |
Definition at line 95 of file gp_transform.h.
| #define GP_TRANSFORM_SWAP | ( | pixmap, | |
| x, | |||
| y ) |
Swaps coordinates within pixmap according to the axes_swap flag.
| pixmap | A pixmap. |
| x | An x coordinate that may be swapped with y coordinate. |
| y | An y coordinate that may be swapped with x coordinate. |
Definition at line 60 of file gp_transform.h.
| #define GP_TRANSFORM_X | ( | pixmap, | |
| x ) |
Flips x coordinate within pixmap according to the x_swap flag.
| pixmap | A pixmap. |
| x | An x coordinate that may be flipped. |
Definition at line 33 of file gp_transform.h.
| #define GP_TRANSFORM_Y | ( | pixmap, | |
| y ) |
Flips y coordinate within pixmap according to the y_swap flag.
| pixmap | A pixmap. |
| y | An y coordinate that may be flipped. |
Definition at line 46 of file gp_transform.h.