I'm using the following code to copy a portion of one TImage to a second
TImage
procedure TForm1.Button2Click(Sender: TObject);
var
i, x, xx, yy, ww, hh, pos : integer;
s : string;
begin
x := 0;
for i := 1 to Length ( Edit1.Text ) do
begin
pos := Ord( Edit1.Text[ i ] );
s := Edit1.Text[ i ];
xx := s_x[ pos ];
yy := s_y[ pos ];
ww := s_w[ pos ];
hh := s_h[ pos ];
Image2.Canvas.CopyRect( Classes.Rect( x, 0, ww, hh ) , Image1.Canvas,
Classes.Rect( xx, yy, ww, hh ) );
x := x + xx;
end;
end;
But the result in Image2 looks stretched. Am I using CopyRect correctly?
I'm using this under Mac OS X ( 10.4.11 ), if that makes any difference.
_______________________________________________
Lazarus mailing list
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus