GrafX2 2.9.3227
The ultimate 256-color painting program
|
Memory representation of a 8bits picture. More...
#include "struct.h"
Data Structures | |
struct | T_GFX2_Surface |
to load 256 color pictures into memory More... | |
Functions | |
T_GFX2_Surface * | New_GFX2_Surface (word width, word height) |
Allocate a new surface. More... | |
void | Free_GFX2_Surface (T_GFX2_Surface *surface) |
Free the surface object and the associated pixel data. More... | |
byte | Get_GFX2_Surface_pixel (const T_GFX2_Surface *surface, int x, int y) |
Retrieve a pixel value. More... | |
void | Set_GFX2_Surface_pixel (T_GFX2_Surface *surface, int x, int y, byte value) |
Set a pixel. More... | |
Memory representation of a 8bits picture.
T_GFX2_Surface * New_GFX2_Surface | ( | word | width, |
word | height | ||
) |
Allocate a new surface.
width,height | dimension of the new surface. Cannot be 0 |
References GFX2_malloc, T_GFX2_Surface::h, NULL, T_GFX2_Surface::palette, T_GFX2_Surface::pixels, and T_GFX2_Surface::w.
Referenced by GFX2_Set_mode(), Pre_load(), and Render_text_SFont().
void Free_GFX2_Surface | ( | T_GFX2_Surface * | surface | ) |
Free the surface object and the associated pixel data.
surface | The surface to free |
References T_GFX2_Surface::pixels.
Referenced by Load_font(), Load_graphics(), Pre_load(), Render_text_SFont(), SFont_FreeFont(), Test_C64_Formats(), Test_Load(), and Test_Save().
byte Get_GFX2_Surface_pixel | ( | const T_GFX2_Surface * | surface, |
int | x, | ||
int | y | ||
) |
Retrieve a pixel value.
surface | The surface to access |
x,y | the coordinate of the pixel to read |
References GFX2_Log(), GFX2_WARNING, T_GFX2_Surface::h, NULL, T_GFX2_Surface::pixels, and T_GFX2_Surface::w.
Referenced by GUI_seek_down(), GUI_seek_right(), Parse_font(), Parse_skin(), Read_GUI_block(), and SFont_InitFont().
void Set_GFX2_Surface_pixel | ( | T_GFX2_Surface * | surface, |
int | x, | ||
int | y, | ||
byte | value | ||
) |
Set a pixel.
Nothing is done if the coordinates are out of bound.
surface | The surface to access |
x,y | the coordinate of the pixel to write |
value | the 8 bits pixel value |
References GFX2_Log(), GFX2_WARNING, T_GFX2_Surface::h, NULL, T_GFX2_Surface::pixels, and T_GFX2_Surface::w.
Referenced by Set_pixel().