[fpc-pascal] interactively draw an ellipse

Mattias Gaertner nc-gaertnma at netcologne.de
Wed Jan 23 11:35:16 CET 2013


On Wed, 23 Jan 2013 11:27:31 +0100
duilio foschi <duiliofoschi at euplan.com> wrote:

> Hi!
> 
> this code
> 
> procedure TForm1.DrawBtnClick(Sender: TObject);
> {Draw some ellipses on the canvas - random size and color}
> var
>   i:integer;
>   cx,cy:integer;
> begin
>   with image1, canvas do
>   begin
>     for i:= 1 to 10 do
>     begin
>       cx:=random(width);
>       cy:=random(height);
>       brush.color:=random(256*256*256);
>       ellipse(cx,cy,cx+random(100), cy+random(100));
>     end;
>   end;
> end;
> 
> will draw 10 ellipses on Image1.

This looks like Lazarus/Delphi code. 
This mailing list is about the things that comes with FPC (compiler,
RTL, FCL, ...).
Have you searched/asked on Lazarus forum?

Mattias



More information about the fpc-pascal mailing list