[Lazarus] Drawing angle boundaries

Howard Page-Clark hdpc at talktalk.net
Fri Jun 24 11:32:57 CEST 2011

On 23/6/11 1:11, Leonardo M. Ramé wrote:
> Hi, I need to draw the angle(s) formed by any given four points.
> As you can see in the attached image, there are two crossed lines and an
> skewed-rotated ellipse that touches all four points, then between each
> two points and the cross point I would like to draw the angle formed (in
> the example filled in blue).
> Does anyone knows how can I do this?.

Try the attached unit, for which the .lpr is as follows:

program pAngleDrawing;

{$mode objfpc}{$H+}

   {$IFDEF UNIX}{$IFDEF UseCThreads}
   Interfaces, // this includes the LCL widgetset
   Forms, uAngleDrawing;

{$R *.res}

   RequireDerivedFormResource := True;
   Application.CreateForm(TForm1, Form1);

It's a bit buggy and has no error checking for impossible point values, 
but should give you some ideas (uAngleDrawing.lfm is just an empty form).

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: uAngleDrawing.pp
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110624/7d5a7703/attachment-0003.ksh>

More information about the Lazarus mailing list