[Lazarus] Looking for vectors library
Felipe Monteiro de Carvalho
felipemonteiro.carvalho at gmail.com
Wed Jun 1 14:38:34 CEST 2011
On Wed, Jun 1, 2011 at 2:11 PM, Leonardo M. Ramé <l.rame at griensu.com> wrote:
> Felipe, I can't find the functions/methods to map world coordinates to
> screen
In fpvectorial all coordinates are in milimiters.
When rendering on Screen you can use the unit fpvtocanvas and this function:
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);
Which allows you to set a multiplier to be applied in the coordinates.
1.0 means that there is 1 pixel per milimiter. 2.0 means 2 pixels per
milimiter, etc.
This function also allows you to set where the drawing will be placed,
which is the viewport (ADestX, ADestY)
> nor to create a viewport on the drawing. Does fpVectorial
> includes that?.
What do you mean by "create a viewport on the drawing"?
In fpvectorial the drawing itself has no viewport, but you can set a
viewport for the whole drawing when rendering on screen, which is
(ADestX, ADestY)
--
Felipe Monteiro de Carvalho
More information about the Lazarus
mailing list