Home | GR32_Layers | TPositionedLayer |
TPositionedLayer.GetAdjustedLocation
function GetAdjustedLocation: TFloatRect;
Description
When the Scaled property is True, GetAdjustedLocation returns scaled Location, otherwise it returns Location as it is, without scaling.
It is up to you do decide if you want to use the result as a floating-point rectangle, to round the coordinates before painting:
procedure TForm1.OnLayerPaintHandler(Sender: TObject; Buffer: TBitmap32);
var
R: TRect;
begin
if Sender is TPositionedLayer then
with TPositionedLayer(Sender) do
begin
R := MakeRect(GetAdjustedLocation);
Buffer.FrameRectS(R.Left, R.Top, R.Right, R.Bottom, clRed32);
end;
end;
end;
See Also
GetAdjustedRect, Location, Scaled, TFloatRect, Using Layers
Copyright ©2000-2007 Alex Denisov and Contributors - Graphics32 v1.8.3 - Build on 4-March-2007