Q1 is solved. This is more simple I thought! Must
handle layer OnPain event, like this:
Delphi-Quellcode:
var
DstRect: TFloatRect;
R: TRect;
B: TBitmap32;
begin
with TPositionedLayer(Sender) do
begin
DstRect := GetAdjustedLocation;
R := MakeRect(DstRect);
if not Buffer.MeasuringMode then
begin
B := TBitmap32.Create;
try
B.SetSize(...); // size = layer size of course
B.Canvas.CopyRect(...); // here copy from buffer
// Image processing here
B.DrawTo(Buffer, R); // Now can display
finally
B.Free;
end;
end;
Buffer.Changed;
end;
end;
Q2: Looka at this image (fragment of 1600x1200 image in scale 1:1):
http://i50.tinypic.com/1588boy.png
Edge should be smooth.