[Lazarus] Looking for vectors library

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Wed Jun 1 17:55:58 CEST 2011


On Wed, Jun 1, 2011 at 3:44 PM, Leonardo M. Ramé <l.rame at griensu.com> wrote:
>> procedure DrawFPVectorialToCanvas(ASource: TvVectorialDocument;
>>   {$ifdef USE_LCL_CANVAS}ADest: TCanvas;{$else}ADest: TFPCustomCanvas;{$endif}
>>   ADestX: Integer = 0; ADestY: Integer = 0; AMulX: Double = 1.0;
>> AMulY: Double = 1.0);
>>
> For example, you have drawing of 1000 x 1000 mm, but you want to show in
> a canvas an area of 100 x 100 pixels, starting from the point 50, 50. To
> do this, you have to call DrawFPVectorialToCanvas(source, dest, 50, 50);

The Canvas Y coordinate is inverted in relation to how fpvectorial
defines it, so the most usual way to achieve what you want is:

DrawFPVectorialToCanvas(source, dest, 0, dest.height, 0.1, -0.1);

-- 
Felipe Monteiro de Carvalho




More information about the Lazarus mailing list