From 99dd7657241b69d0f75999a08b74fd9e2619c383 Mon Sep 17 00:00:00 2001 From: marc Date: Thu, 11 Oct 2007 23:21:58 +0000 Subject: [PATCH] * Fixed cursors on win2000, winNT when bpp<24 git-svn-id: trunk@12420 - --- lcl/graphtype.pp | 14 ++++++++++++-- lcl/intfgraphics.pas | 12 +++++++++++- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/lcl/graphtype.pp b/lcl/graphtype.pp index f5d208b353..06dce6b159 100644 --- a/lcl/graphtype.pp +++ b/lcl/graphtype.pp @@ -128,6 +128,7 @@ type procedure Init_BPP32_B8G8R8_BIO_TTB(AWidth, AHeight: integer); procedure Init_BPP32_B8G8R8_M1_BIO_TTB(AWidth, AHeight: integer); procedure Init_BPP32_B8G8R8A8_BIO_TTB(AWidth, AHeight: integer); + procedure Init_BPP32_B8G8R8A8_M1_BIO_TTB(AWidth, AHeight: integer); function GetDescriptionFromMask: TRawImageDescription; function GetDescriptionFromAlpha: TRawImageDescription; @@ -670,7 +671,7 @@ begin MaskBitsPerPixel := 1; MaskBitOrder := riboBitsInOrder; // MaskShift := 0; // the shift (=position) of the mask bit - MaskLineEnd := rileDWordBoundary; + MaskLineEnd := rileWordBoundary; end; procedure TRawImageDescription.Init_BPP32_B8G8R8_BIO_TTB(AWidth, AHeight: integer); @@ -741,7 +742,7 @@ begin MaskBitsPerPixel := 1; MaskBitOrder := riboBitsInOrder; // MaskShift := 0; // the shift (=position) of the mask bit - MaskLineEnd := rileDWordBoundary; + MaskLineEnd := rileWordBoundary; end; function TRawImageDescription.MaskBitsPerLine: PtrUInt; @@ -789,6 +790,15 @@ begin // MaskBitsPerPixel := 0; end; +procedure TRawImageDescription.Init_BPP32_B8G8R8A8_M1_BIO_TTB(AWidth, AHeight: integer); +begin + Init_BPP32_B8G8R8A8_BIO_TTB(Width, Height); + + MaskBitsPerPixel := 1; + MaskBitOrder := riboBitsInOrder; + MaskLineEnd := rileWordBoundary; +end; + function TRawImageDescription.GetDescriptionFromMask: TRawImageDescription; begin diff --git a/lcl/intfgraphics.pas b/lcl/intfgraphics.pas index b6b3499887..0d3b0f3aea 100644 --- a/lcl/intfgraphics.pas +++ b/lcl/intfgraphics.pas @@ -649,7 +649,17 @@ begin if Desc.AlphaPrec >= 8 then Exit; if not AddAlphaToDescription(Desc, 8) - then Desc.Init_BPP32_B8G8R8A8_BIO_TTB(Desc.Width, Desc.Height); + then begin + Desc.Init_BPP32_B8G8R8A8_BIO_TTB(Desc.Width, Desc.Height); + // copy mask description + with TLazIntfImage(AImage).DataDescription do + begin + Desc.MaskBitsPerPixel := MaskBitsPerPixel; + Desc.MaskShift := MaskShift; + Desc.MaskLineEnd := MaskLineEnd; + Desc.MaskBitOrder := MaskBitOrder; + end; + end; TLazIntfImage(AImage).DataDescription := Desc; end;