GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
gp_types.h File Reference

A common types. More...

#include <stdint.h>

Go to the source code of this file.

Typedefs

typedef int gp_coord
 Integer type for coordinates i.e. x, y, ...
 
typedef unsigned int gp_size
 Integer type for sizes i.e. w, h, ...
 
typedef uint32_t gp_pixel
 Pixel integer value.
 
typedef enum gp_symmetry gp_symmetry
 Rotation and mirroring flags.
 

Enumerations

enum  gp_symmetry {
  GP_ROTATE_90 = 0 , GP_ROTATE_CW = GP_ROTATE_90 , GP_ROTATE_180 , GP_ROTATE_270 ,
  GP_ROTATE_CCW = GP_ROTATE_270 , GP_MIRROR_H , GP_MIRROR_V , GP_ROTATE_INVALID = -1
}
 Rotation and mirroring flags. More...
 

Functions

gp_symmetry gp_symmetry_by_name (const char *symmetry)
 Rotation by by name (as defined in gp_symmetry_names).
 

Variables

const char ** gp_symmetry_names
 NULL-terminated array of symmetry names (C strings).
 

Detailed Description

A common types.

Definition in file gp_types.h.

Typedef Documentation

◆ gp_pixel

typedef uint32_t gp_pixel

Pixel integer value.

All channels are packed into the value accordingly to the enum gp_pixel_type

Definition at line 33 of file gp_types.h.

Enumeration Type Documentation

◆ gp_symmetry

Rotation and mirroring flags.

Enumerator
GP_ROTATE_90 

Rotate 90 degrees clockwise.

GP_ROTATE_CW 

Rotate clockwise. Alias for GP_ROTATE_90.

GP_ROTATE_180 

Rotate 180 degrees clockwise.

GP_ROTATE_270 

Rotate 270 degrees clockwise.

GP_ROTATE_CCW 

Rotate counter clockwise. Alias for GP_ROTATE_270.

GP_MIRROR_H 

Mirror horizontally.

GP_MIRROR_V 

Mirror vertically.

GP_ROTATE_INVALID 

Return value for invalid symmetry.

Definition at line 47 of file gp_types.h.

Function Documentation

◆ gp_symmetry_by_name()

gp_symmetry gp_symmetry_by_name ( const char * symmetry)

Rotation by by name (as defined in gp_symmetry_names).

Parameters
symmetryA symmetry name.
Returns
One of the values defined in enum gp_symmetry.