mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 19:02:31 +02:00
lcl:
- revert TLazIntfImage.HasMask (it was indeed right) - improve a bit TWin32WidgetSet.RawImage_CreateBitmaps git-svn-id: trunk@15597 -
This commit is contained in:
parent
c49612b414
commit
c8d58add6a
@ -500,19 +500,19 @@ begin
|
||||
Result := False;
|
||||
AMask := 0;
|
||||
|
||||
FillChar(Info, SizeOf(Info), 0);
|
||||
Info.Header.biSize := SizeOf(Info.Header);
|
||||
Info.Header.biWidth := ADesc.Width;
|
||||
Info.Header.biHeight := -ADesc.Height; // create top to bottom
|
||||
Info.Header.biPlanes := 1;
|
||||
Info.Header.biBitCount := ADesc.BitsPerPixel;
|
||||
Info.Header.biCompression := BI_RGB;
|
||||
{BitmapInfo.bmiHeader.biSizeImage := 0;}
|
||||
{ first color is black, second color is white, for monochrome bitmap }
|
||||
Info.Colors[1] := $FFFFFFFF;
|
||||
|
||||
if not ((ADesc.BitsPerPixel = 1) and (ADesc.LineEnd = rileWordBoundary)) then
|
||||
begin
|
||||
FillChar(Info, SizeOf(Info), 0);
|
||||
Info.Header.biSize := SizeOf(Info.Header);
|
||||
Info.Header.biWidth := ADesc.Width;
|
||||
Info.Header.biHeight := -ADesc.Height; // create top to bottom
|
||||
Info.Header.biPlanes := 1;
|
||||
Info.Header.biBitCount := ADesc.BitsPerPixel;
|
||||
Info.Header.biCompression := BI_RGB;
|
||||
{BitmapInfo.bmiHeader.biSizeImage := 0;}
|
||||
{ first color is black, second color is white, for monochrome bitmap }
|
||||
Info.Colors[1] := $FFFFFFFF;
|
||||
|
||||
DC := Windows.GetDC(0);
|
||||
// Use createDIBSection, since only devicedepth bitmaps can be selected into a DC
|
||||
// when they are created with createDIBitmap
|
||||
|
@ -2924,7 +2924,7 @@ end;
|
||||
|
||||
function TLazIntfImage.HasMask: boolean;
|
||||
begin
|
||||
Result := FMaskSet or FRawImage.IsMasked(False);
|
||||
Result := FMaskSet;
|
||||
end;
|
||||
|
||||
constructor TLazIntfImage.Create(AWidth, AHeight: integer);
|
||||
|
Loading…
Reference in New Issue
Block a user