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:
michl 2017-12-29 20:22:29 +00:00
parent a2c678d1d1
commit 84369842cc
2 changed files with 1 additions and 16 deletions

View File

@ -221,7 +221,7 @@ begin
case FPixelFormat of
pf1bit: Flags := [riqfMono, riqfMask];
pf4bit,
pf8bit: Flags := [riqfRGB, riqfMask, riqfPalette];
pf8bit: Flags := [riqfGrey, riqfMask, riqfPalette];
pf32bit: Flags := [riqfRGB, riqfMask, riqfAlpha];
else
Flags := [riqfRGB, riqfMask];

View File

@ -561,18 +561,6 @@ function TGtk2WidgetSet.RawImage_QueryDescription(AFlags: TRawImageQueryFlags; v
var
Desc: TRawImageDescription;
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;
Result := RawImage_DescriptionFromDrawable(Desc, nil, riqfAlpha in AFlags);
if not Result then Exit;
@ -601,8 +589,6 @@ begin
ADesc.BluePrec := 1;
ADesc.BlueShift := Desc.MaskShift;
end
(*
//TODO
else if riqfGrey in AFlags
then begin
ADesc.Format := ricfGray;
@ -615,7 +601,6 @@ begin
ADesc.RedPrec := 8;
ADesc.RedShift := 0;
end
*)
else
if riqfRGB in AFlags then
begin