diff options
author | Felipe Menteiro de Carvalho <sekelsenmat@users.sourceforge.net> | 2006-11-26 14:47:46 +0000 |
---|---|---|
committer | Felipe Menteiro de Carvalho <sekelsenmat@users.sourceforge.net> | 2006-11-26 14:47:46 +0000 |
commit | 77ed95805c8ed10ff6f310dd4c9e038339d09cc8 (patch) | |
tree | ca9957c235ee12cf5adf6039e9fa742926f92067 | |
parent | 0d7237fc99934d75a57a7e81bf9a6674d6b16cf9 (diff) | |
download | fpGUI-77ed95805c8ed10ff6f310dd4c9e038339d09cc8.tar.xz |
Fixes image example bug on X11, by fixating the byte order for RGB formats as the same Windows expects.
-rw-r--r-- | gfx/gfxbase.pas | 47 |
1 files changed, 7 insertions, 40 deletions
diff --git a/gfx/gfxbase.pas b/gfx/gfxbase.pas index fcc33d81..dab04c59 100644 --- a/gfx/gfxbase.pas +++ b/gfx/gfxbase.pas @@ -180,23 +180,18 @@ const BlueMask: 0; AlphaMask: 0); + { Windows requires this particular order for RGB images } + { 5-6-5 storage } PixelFormatRGB16: TGfxPixelFormat = ( FormatType: ftRGB16; - RedMask: $001F; + RedMask: $F800; GreenMask: $07E0; - BlueMask: $F800; + BlueMask: $001F; AlphaMask: 0); PixelFormatRGB24: TGfxPixelFormat = ( FormatType: ftRGB24; - RedMask: $0000ff; - GreenMask: $00ff00; - BlueMask: $ff0000; - AlphaMask: 0); - - PixelFormatBGR24: TGfxPixelFormat = ( - FormatType: ftRGB24; RedMask: $ff0000; GreenMask: $00ff00; BlueMask: $0000ff; @@ -204,46 +199,18 @@ const PixelFormatRGB32: TGfxPixelFormat = ( FormatType: ftRGB32; - RedMask: $0000ff; - GreenMask: $00ff00; - BlueMask: $ff0000; - AlphaMask: 0); - - PixelFormatRGBA32: TGfxPixelFormat = ( - FormatType: ftRGB32; - RedMask: $000000ff; - GreenMask: $0000ff00; - BlueMask: $00ff0000; - AlphaMask: $ff000000); - - PixelFormatARGB32: TGfxPixelFormat = ( - FormatType: ftRGB32; - RedMask: $0000ff00; - GreenMask: $00ff0000; - BlueMask: $ff000000; - AlphaMask: $000000ff); - - PixelFormatBGR32: TGfxPixelFormat = ( - FormatType: ftRGB32; RedMask: $ff0000; GreenMask: $00ff00; BlueMask: $0000ff; AlphaMask: 0); - PixelFormatBGRA32: TGfxPixelFormat = ( - FormatType: ftRGB32; - RedMask: $00ff0000; + PixelFormatRGBA32: TGfxPixelFormat = ( + FormatType: ftRGB32; + RedMask: $00ff00ff; GreenMask: $0000ff00; BlueMask: $000000ff; AlphaMask: $ff000000); - PixelFormatABGR32: TGfxPixelFormat = ( - FormatType: ftRGB32; - RedMask: $ff000000; - GreenMask: $00ff0000; - BlueMask: $0000ff00; - AlphaMask: $000000ff); - type EGfxError = class(Exception); |