#include <dibconv.h>
Inheritance diagram for DIBConvert:
Public Member Functions | |
DIBConvert () | |
Base class to convert bitmap depths. | |
virtual | ~DIBConvert () |
virtual BOOL | Convert (LPBYTE Input, LPBYTE Output, UINT32 Height, BOOL FirstStrip=TRUE)=0 |
Static Public Member Functions | |
static BOOL | Init () |
static void | DeInit () |
static DIBConvert * | Create (UINT32 SourceDepth, UINT32 DestDepth, UINT32 Width, LPLOGPALETTE DestPal, UINT32 DitherType=XARADITHER_ORDERED_GREY) |
static DIBConvert * | Create (LPBITMAPINFO pSourceHeader, UINT32 DestDepth, UINT32 DitherType=XARADITHER_ORDERED_GREY) |
Alternative Creation function. | |
Static Protected Member Functions | |
static GDrawContext * | GetConvertContext (void) |
Static Protected Attributes | |
static GDrawContext * | ConvertContext = NULL |
Definition at line 118 of file dibconv.h.
|
Base class to convert bitmap depths.
Definition at line 282 of file dibconv.cpp.
|
|
Definition at line 286 of file dibconv.cpp.
|
|
Implemented in Conv32to32, Conv32to24, Conv32to8, Conv32to4, Conv32to1, Conv24to8, Conv8to32, and Conv24to32. |
|
Alternative Creation function.
Definition at line 370 of file dibconv.cpp. 00371 { 00372 DitherType = DitherType; 00373 UINT32 SourceDepth = pSourceHeader->bmiHeader.biBitCount; 00374 00375 if (SourceDepth == 8) 00376 { 00377 if (DestDepth==32) 00378 return new Conv8to32( pSourceHeader ); 00379 } 00380 if (SourceDepth == 24) 00381 { 00382 if (DestDepth==32) 00383 return new Conv24to32( pSourceHeader ); 00384 } 00385 return NULL; 00386 }
|
|
Definition at line 324 of file dibconv.cpp. 00325 { 00326 ERROR2IF(DestDepth<=8 && Palette==NULL,NULL,"DIBConvert::Create null palette specified"); 00327 00328 switch(SourceDepth) 00329 { 00330 case 32: 00331 { 00332 switch(DestDepth) 00333 { 00334 case 24: 00335 return new Conv32to24( Width ); 00336 case 8: 00337 return new Conv32to8( Width, Palette, DitherType ); 00338 case 4: 00339 return new Conv32to4( Width, Palette, DitherType ); 00340 case 1: 00341 return new Conv32to1( Width, Palette, DitherType ); 00342 case 32: 00343 return new Conv32to32( Width ); 00344 default: 00345 return NULL; 00346 } 00347 } 00348 case 24: 00349 { 00350 if (DestDepth==8) 00351 return new Conv24to8( Width, Palette, DitherType ); 00352 } 00353 default: 00354 return NULL; 00355 } 00356 00357 return NULL; 00358 }
|
|
Definition at line 305 of file dibconv.cpp. 00306 { 00307 if (ConvertContext != NULL) 00308 { 00309 delete ConvertContext; 00310 ConvertContext = NULL; 00311 } 00312 }
|
|
Definition at line 315 of file dibconv.cpp. 00316 { 00317 if (ConvertContext != NULL) 00318 return(ConvertContext); 00319 else 00320 return(GRenderRegion::GetStaticDrawContext()); 00321 }
|
|
Definition at line 292 of file dibconv.cpp. 00293 { 00294 if (ConvertContext == NULL) 00295 ConvertContext = new GDrawAsm(); 00296 00297 if (ConvertContext) 00298 ConvertContext->Init(); 00299 00300 // We don't really care if this doesn't work as it is an optimisation 00301 return(TRUE); 00302 }
|
|
|