From 4afd5cec0f857aa5f0e9f435b05321e8e04c98c1 Mon Sep 17 00:00:00 2001 From: sekelsenmat Date: Mon, 28 Nov 2011 10:47:17 +0000 Subject: [PATCH] GraphType: some more init routines git-svn-id: trunk@33822 - --- lcl/graphtype.pp | 52 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/lcl/graphtype.pp b/lcl/graphtype.pp index 7463d16348..4a8b8dabbd 100644 --- a/lcl/graphtype.pp +++ b/lcl/graphtype.pp @@ -156,6 +156,8 @@ type // Formats in RGB order procedure Init_BPP24_R8G8B8_BIO_TTB(AWidth, AHeight: integer); procedure Init_BPP24_R8G8B8_BIO_TTB_UpsideDown(AWidth, AHeight: integer); + procedure Init_BPP32_A8R8G8B8_BIO_TTB(AWidth, AHeight: integer); + procedure Init_BPP32_R8G8B8A8_BIO_TTB(AWidth, AHeight: integer); // Formats in Windows pixels order: BGR procedure Init_BPP24_B8G8R8_BIO_TTB(AWidth, AHeight: integer); @@ -649,6 +651,56 @@ begin // MaskBitsPerPixel:=0; end; +procedure TRawImageDescription.Init_BPP32_A8R8G8B8_BIO_TTB(AWidth, AHeight: integer); +begin + // setup an artificial ScanLineImage with format RGB 32 bit, 32bit depth format + FillChar(Self, SizeOf(Self), 0); + + Format := ricfRGBA; + Depth := 32; // used bits per pixel + Width := AWidth; + Height := AHeight; + BitOrder := riboBitsInOrder; + ByteOrder := riboLSBFirst; + LineOrder := riloTopToBottom; + BitsPerPixel := 32; // bits per pixel. can be greater than Depth. + LineEnd := rileDWordBoundary; + RedPrec := 8; // red precision. bits for red + RedShift := 8; + GreenPrec := 8; + GreenShift := 16; // bitshift. Direction: from least to most signifikant + BluePrec := 8; + BlueShift := 24; + AlphaPrec := 8; + AlphaShift := 0; +// MaskBitsPerPixel := 0; +end; + +procedure TRawImageDescription.Init_BPP32_R8G8B8A8_BIO_TTB(AWidth, AHeight: integer); +begin + // setup an artificial ScanLineImage with format RGB 32 bit, 32bit depth format + FillChar(Self, SizeOf(Self), 0); + + Format := ricfRGBA; + Depth := 32; // used bits per pixel + Width := AWidth; + Height := AHeight; + BitOrder := riboBitsInOrder; + ByteOrder := riboLSBFirst; + LineOrder := riloTopToBottom; + BitsPerPixel := 32; // bits per pixel. can be greater than Depth. + LineEnd := rileDWordBoundary; + RedPrec := 8; // red precision. bits for red + RedShift := 0; + GreenPrec := 8; + GreenShift := 8; // bitshift. Direction: from least to most signifikant + BluePrec := 8; + BlueShift := 16; + AlphaPrec := 8; + AlphaShift := 24; +// MaskBitsPerPixel := 0; +end; + procedure TRawImageDescription.Init_BPP24_B8G8R8_BIO_TTB(AWidth, AHeight: integer); { pf24bit: