mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 18:39:52 +02:00
lazVirtualTreeView Qt: implemented AlphaBlend selection for 64bit
git-svn-id: trunk@63055 -
This commit is contained in:
parent
52ffe2120d
commit
2e6e76f73a
@ -758,6 +758,13 @@ var
|
|||||||
SourceHeight,
|
SourceHeight,
|
||||||
DestWidth,
|
DestWidth,
|
||||||
DestHeight: Integer;
|
DestHeight: Integer;
|
||||||
|
{$ifdef CPU64}
|
||||||
|
ATransform: QTransformH;
|
||||||
|
DX, DY: QReal;
|
||||||
|
AColor: QColorH;
|
||||||
|
ADst: TQtDeviceContext absolute Destination;
|
||||||
|
AFillColor: TQColor;
|
||||||
|
{$endif}
|
||||||
|
|
||||||
//BlendColor: TQColor;
|
//BlendColor: TQColor;
|
||||||
begin
|
begin
|
||||||
@ -838,6 +845,22 @@ begin
|
|||||||
}
|
}
|
||||||
// Source is ignored since there is a constant color value.
|
// Source is ignored since there is a constant color value.
|
||||||
|
|
||||||
|
{$IFDEF CPU64}
|
||||||
|
if ADst <> nil then
|
||||||
|
begin
|
||||||
|
ATransform := QPainter_transform(ADst.Widget);
|
||||||
|
DX := QTransform_dx(ATransform);
|
||||||
|
DY := QTransform_dy(ATransform);
|
||||||
|
ADst.translate(-DX, -DY);
|
||||||
|
AColor := QColor_create((Bias and $000000FF), ((Bias shr 8) and $000000FF), ((Bias shr 16) and $000000FF), ConstantAlpha);
|
||||||
|
QColor_convertTo(AColor, @AFillColor, QColorRgb);
|
||||||
|
QPainter_fillRect(ADst.Widget, R.Left + Target.x, R.Top + Target.y,
|
||||||
|
R.Right - R.Left, R.Bottom - R.Top, PQColor(@AFillColor));
|
||||||
|
ADst.translate(DX, DY);
|
||||||
|
QColor_destroy(AColor);
|
||||||
|
end;
|
||||||
|
{$ELSE}
|
||||||
|
|
||||||
DestBits := GetBitmapBitsFromDeviceContext(Destination, DestWidth, DestHeight);
|
DestBits := GetBitmapBitsFromDeviceContext(Destination, DestWidth, DestHeight);
|
||||||
if Assigned(DestBits) then
|
if Assigned(DestBits) then
|
||||||
begin
|
begin
|
||||||
@ -849,6 +872,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
EMMS;
|
EMMS;
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -786,11 +786,11 @@ var
|
|||||||
DestWidth,
|
DestWidth,
|
||||||
DestHeight: Integer;
|
DestHeight: Integer;
|
||||||
{$IFDEF CPU64}
|
{$IFDEF CPU64}
|
||||||
|
ATransform: QTransformH;
|
||||||
|
DX, DY: QReal;
|
||||||
AColor: QColorH;
|
AColor: QColorH;
|
||||||
ADst: TQtDeviceContext absolute Destination;
|
ADst: TQtDeviceContext absolute Destination;
|
||||||
AFillColor: TQColor;
|
AFillColor: TQColor;
|
||||||
ATransform: QTransformH;
|
|
||||||
DX, DY: QReal;
|
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
//BlendColor: TQColor;
|
//BlendColor: TQColor;
|
||||||
|
Loading…
Reference in New Issue
Block a user