mbColorLib: Fix painting issues of TmbColorPicker descendents in Linux.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5551 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-12-20 22:28:49 +00:00
parent 69886645c6
commit db5064590a
4 changed files with 11 additions and 11 deletions

View File

@ -111,7 +111,7 @@ begin
// ControlStyle := ControlStyle - [csAcceptsControls] + [csOpaque];
PBack := TBitmap.Create;
PBack.PixelFormat := pf32bit;
// PBack.PixelFormat := pf32bit;
SetInitialBounds(0, 0, 206, 146);
TabStop := true;
FSelectedColor := clRed;

View File

@ -110,7 +110,7 @@ begin
FGValue := 0;
FBValue := 0;
PBack := TBitmap.Create;
PBack.PixelFormat := pf32bit;
// PBack.PixelFormat := pf32bit;
SetInitialBounds(0, 0, 245, 245);
TabStop := true;
FSelectedColor := clRed;

View File

@ -108,7 +108,7 @@ begin
FMaxS := 240;
FMaxL := 100;
PBack := TBitmap.Create;
PBack.PixelFormat := pf32bit;
// PBack.PixelFormat := pf32bit;
ParentColor := true;
SetInitialBounds(0, 0, WSL + DIST + WH, HSL + 2*VDELTA);
TabStop := true;

View File

@ -139,15 +139,15 @@ end;
procedure TmbCustomPicker.CreateGradient;
var
x, y: Integer;
row: pRGBQuadArray;
c: TColor;
col: TColor;
fpcol: TFPColor;
intfimg: TLazIntfImage;
imgHandle, imgMaskHandle: HBitmap;
begin
if FBufferBmp = nil then
begin
FBufferBmp := TBitmap.Create;
FBufferBmp.PixelFormat := pf32bit;
// FBufferBmp.PixelFormat := pf32bit;
end;
FBufferBmp.Width := FGradientWidth;
FBufferBmp.Height := FGradientHeight;
@ -158,13 +158,13 @@ begin
for y := 0 to FBufferBmp.Height - 1 do
begin
row := intfImg.GetDataLineStart(y); //FBufferBmp.Height - 1 - y);
for x := 0 to FBufferBmp.Width - 1 do
begin
c := GetGradientColor2D(x, y);
col := GetGradientColor2D(x, y);
if WebSafe then
c := GetWebSafe(c);
row[x] := RGBToRGBQuad(GetRValue(c), GetGValue(c), GetBValue(c));
col := GetWebSafe(col);
fpcol := TColorToFPColor(col);
intfImg.Colors[x, y] := fpcol;
end;
end;
@ -172,7 +172,7 @@ begin
FBufferBmp.Handle := imgHandle;
FBufferBmp.MaskHandle := imgMaskHandle;
finally
intfimg.Free;
intfimg.Free;
end;
end;