57 #define COLOUR_WEIGHT_RED 4
58 #define COLOUR_WEIGHT_GREEN 9
59 #define COLOUR_WEIGHT_BLUE 1
66 #define WX_PIXFLAG_TRANSLATE 1
67 #define WX_PIXFLAG_DITHER 2
68 #define WX_PIXFLAG_SAMEPALETTE 4
69 #define WX_PIXFLAG_FASTDITHER 8
70 #define WX_PIXMODE_PALETTE 1
98 typedef void (*
wx_pixmap_translate)(
const unsigned char *src,
unsigned char *dest,
int width,
int height,
int srcPitch,
int destPitch,
const unsigned char *tt);
119 wxPixmap(wxWindow *Win,
int Width,
int Height,
int Depth,
int Pad,
char *Data,
unsigned int Flags=WX_PIXFLAG_TRANSLATE, wxColour *Palette=NULL);
121 int newPixmap(wxWindow *Win,
int Width,
int Height,
int Depth,
int Pad,
char *Data,
unsigned int Flags=WX_PIXFLAG_TRANSLATE, wxColour *Palette=NULL);
122 int plotPixmap(
int PosX,
int PosY);
123 void invalidatePixmap(
void);
129 wxColour *getPalette(
void);
130 int getModeDepth(
void);
131 int getModePitch(
void);
132 char *getModeData(
void);
133 unsigned char *getTranslationTable(
void);
134 void modeChange(
unsigned int Flags);
135 void buildTranslationTable(
void);
136 void refreshGlobalTables(
void);
137 bool setBusyCursor(
bool newMode);
138 #ifndef wx_pixmap_alloc_cols
139 void processParentPalette(
bool forceUpdate=
FALSE);
140 void processPixmapPalette(
void);
142 int findBestColour(
unsigned char red,
unsigned char green,
unsigned char blue);
143 int findFastColour(
unsigned char red,
unsigned char green,
unsigned char blue);
146 #include "wx_pixmap_dither.h"
151 void errorMemory(
void);
152 void errorGeneric(
char *message);
153 void initVariables(
void);
154 void freeResources(
int Depth,
unsigned int Flags);
155 void translateToMode(
void);
156 void ditherToMode(
void);
157 void getDisplayAttributes(
void);
158 void initColoursForMode(
bool forceUpdate=
FALSE);
159 void setupTranslators(
void);
160 #ifndef wx_pixmap_alloc_cols
161 void sortParentPalette(
int from,
int to);
162 void buildInverseTable(
void);
166 int width, height, depth, pad, pitch;
180 #ifdef wx_pixmap_alloc_cols
181 char ColourAlloc[32];
186 unsigned char parentInverse[256];
213 void win_translate_24_to_24(
unsigned char *dest);
XVisualInfo visualInfo
Definition: wx_pixmap.h:203
unsigned char number
Definition: wx_pixmap.h:77
HPALETTE currentPal
Definition: wx_pixmap.h:221
HWND windowHandle
Definition: wx_pixmap.h:217
Display * display
Definition: wx_pixmap.h:202
wx_pixmap_translate pixtrans32
Definition: wx_pixmap.h:195
bool busyCursorMode
Definition: wx_pixmap.h:189
wxWindow * parentWin
Definition: wx_pixmap.h:178
void(wxPixmap::* wx_pixmap_dither)(unsigned char *dest, int destPad)
Definition: wx_pixmap.h:100
unsigned char blue
Definition: wx_pixmap.h:77
bool validDisplay
Definition: wx_pixmap.h:188
wx_pixmap_dither pixdither8
Definition: wx_pixmap.h:196
unsigned char * TrueTransTab
int TransTabSize
Definition: wx_pixmap.h:176
GC myGC
Definition: wx_pixmap.h:207
XWindowAttributes xat
Definition: wx_pixmap.h:206
XGCValues xgcvals
Definition: wx_pixmap.h:205
#define FALSE
Definition: defs.h:70
struct wx_permute_cmap wx_permute_cmap
HWND desktop
Definition: wx_pixmap.h:218
int(wxPixmap::* pixmap_colour_match)(unsigned char r, unsigned char g, unsigned char b)
Definition: wx_pixmap.h:102
wxOutputStream streamBuf
Definition: wx_pixmap.h:191
std::ostream * errorstr
Definition: wx_pixmap.h:192
wx_permute_cmap * pixmapPalette
Definition: wx_pixmap.h:185
unsigned char * FastDitherTab
Definition: wx_pixmap.h:75
BITMAP bmDesc
Definition: wx_pixmap.h:215
int parentPaletteDepth
Definition: wx_pixmap.h:184
unsigned long COLORREF
Definition: wx_pixmap.h:38
int screen
Definition: wx_pixmap.h:208
char * data
Definition: wx_pixmap.h:168
Definition: wx_pixmap.h:114
int width
Definition: wx_pixmap.h:166
int rgbOrder
Definition: wx_pixmap.h:193
void(* wx_pixmap_translate)(const unsigned char *src, unsigned char *dest, int width, int height, int srcPitch, int destPitch, const unsigned char *tt)
Definition: wx_pixmap.h:98
unsigned char green
Definition: wx_pixmap.h:77
wx_pixmap_dither pixdither32
Definition: wx_pixmap.h:197
int height
Definition: wx_pixmap.h:166
pixmap_colour_match colour_matcher
Definition: wx_pixmap.h:198
int displayPitch
Definition: wx_pixmap.h:167
unsigned int pixFlags
Definition: wx_pixmap.h:179
HGDIOBJ oldDCObject
Definition: wx_pixmap.h:220
unsigned char red
Definition: wx_pixmap.h:77
HDC winDC
Definition: wx_pixmap.h:219
unsigned char * c
Definition: wx_pixmap.h:172
HBITMAP bitmap
Definition: wx_pixmap.h:216
COLORREF * l
Definition: wx_pixmap.h:173
char * modeData
Definition: wx_pixmap.h:169
wx_pixmap_translate pixtrans8
Definition: wx_pixmap.h:194
wxColour * palette
Definition: wx_pixmap.h:177
Window windowHandle
Definition: wx_pixmap.h:209
XImage * xim
Definition: wx_pixmap.h:204