Oops I cut and pasted a typo.

x:= x + xx should be x := x + ww;

But that still does not fix the problem.

On Mon, 27 Oct 2008 20:36:55 -0400, <[EMAIL PROTECTED]>
wrote:
> 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
> Lazarus@lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

_______________________________________________
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to