GrafX2 2.9.3227
The ultimate 256-color painting program
T_Page Struct Reference

This is the data for one step of Undo/Redo, for one image. More...

#include <struct.h>

+ Collaboration diagram for T_Page:

Data Fields

int Width
 Image width in pixels. More...
 
int Height
 Image height in pixels. More...
 
T_Palette Palette
 Image palette. More...
 
enum IMAGE_MODES Image_mode
 0= layered image, 1=animation, More...
 
char Comment [COMMENT_SIZE+1]
 Comment to store in the image file. More...
 
char * File_directory
 Directory that contains the file. More...
 
char * Filename
 Filename without directory. More...
 
wordFilename_unicode
 Filename without directory. More...
 
enum FILE_FORMATS File_format
 File format, in enum FILE_FORMATS. More...
 
struct T_PageNext
 Pointer to the next backup. More...
 
struct T_PagePrev
 Pointer to the previous backup. More...
 
T_Gradient_arrayGradients
 Pointer to the gradients used by the image. More...
 
byte Background_transparent
 Boolean, true if Layer 0 should have transparent pixels. More...
 
byte Transparent_color
 Index of transparent color. 0 to 255. More...
 
int Nb_layers
 Number of layers. More...
 
T_Image Image [0]
 Pixel data for the (first layer of) image. More...
 

Detailed Description

This is the data for one step of Undo/Redo, for one image.

This structure is resized dynamically to hold pointers to all of the layers in the picture. The pointed layers are just byte* holding the raw pixel data. But at Image[0]-1 you will find a short that is used as a reference counter for each layer. This way we can use the same pixel data in many undo pages when the user edit only one of the layers (which is what they usually do).

Field Documentation

◆ Width

◆ Height

◆ Palette

◆ Image_mode

◆ Comment

char T_Page::Comment[COMMENT_SIZE+1]

◆ File_directory

◆ Filename

◆ Filename_unicode

◆ File_format

◆ Next

◆ Prev

◆ Gradients

◆ Background_transparent

byte T_Page::Background_transparent

Boolean, true if Layer 0 should have transparent pixels.

Referenced by Backup_with_new_dimensions(), Button_Layer_menu(), Init_context_layered_image(), Init_program(), Load_image(), and New_page().

◆ Transparent_color

◆ Nb_layers

◆ Image


The documentation for this struct was generated from the following file: