mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 13:20:18 +02:00
LCL: Supporting TCanvas.Draw a TBitmap in pf8bit TBitmap.PixelFormat. Issue #32878. Patch by fantangshan
git-svn-id: trunk@56872 -
This commit is contained in:
parent
a2c678d1d1
commit
84369842cc
@ -221,7 +221,7 @@ begin
|
|||||||
case FPixelFormat of
|
case FPixelFormat of
|
||||||
pf1bit: Flags := [riqfMono, riqfMask];
|
pf1bit: Flags := [riqfMono, riqfMask];
|
||||||
pf4bit,
|
pf4bit,
|
||||||
pf8bit: Flags := [riqfRGB, riqfMask, riqfPalette];
|
pf8bit: Flags := [riqfGrey, riqfMask, riqfPalette];
|
||||||
pf32bit: Flags := [riqfRGB, riqfMask, riqfAlpha];
|
pf32bit: Flags := [riqfRGB, riqfMask, riqfAlpha];
|
||||||
else
|
else
|
||||||
Flags := [riqfRGB, riqfMask];
|
Flags := [riqfRGB, riqfMask];
|
||||||
|
@ -561,18 +561,6 @@ function TGtk2WidgetSet.RawImage_QueryDescription(AFlags: TRawImageQueryFlags; v
|
|||||||
var
|
var
|
||||||
Desc: TRawImageDescription;
|
Desc: TRawImageDescription;
|
||||||
begin
|
begin
|
||||||
if riqfGrey in AFlags then
|
|
||||||
begin
|
|
||||||
DebugLn('TGtk2WidgetSet.RawImage_QueryDescription: riqfGrey not (yet) supported');
|
|
||||||
Exit(False);
|
|
||||||
end;
|
|
||||||
|
|
||||||
if riqfPalette in AFlags then
|
|
||||||
begin
|
|
||||||
DebugLn('TGtk2WidgetSet.RawImage_QueryDescription: riqfPalette not (yet) supported');
|
|
||||||
Exit(False);
|
|
||||||
end;
|
|
||||||
|
|
||||||
Desc.Init;
|
Desc.Init;
|
||||||
Result := RawImage_DescriptionFromDrawable(Desc, nil, riqfAlpha in AFlags);
|
Result := RawImage_DescriptionFromDrawable(Desc, nil, riqfAlpha in AFlags);
|
||||||
if not Result then Exit;
|
if not Result then Exit;
|
||||||
@ -601,8 +589,6 @@ begin
|
|||||||
ADesc.BluePrec := 1;
|
ADesc.BluePrec := 1;
|
||||||
ADesc.BlueShift := Desc.MaskShift;
|
ADesc.BlueShift := Desc.MaskShift;
|
||||||
end
|
end
|
||||||
(*
|
|
||||||
//TODO
|
|
||||||
else if riqfGrey in AFlags
|
else if riqfGrey in AFlags
|
||||||
then begin
|
then begin
|
||||||
ADesc.Format := ricfGray;
|
ADesc.Format := ricfGray;
|
||||||
@ -615,7 +601,6 @@ begin
|
|||||||
ADesc.RedPrec := 8;
|
ADesc.RedPrec := 8;
|
||||||
ADesc.RedShift := 0;
|
ADesc.RedShift := 0;
|
||||||
end
|
end
|
||||||
*)
|
|
||||||
else
|
else
|
||||||
if riqfRGB in AFlags then
|
if riqfRGB in AFlags then
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user