On Wed, Jun 1, 2011 at 2:11 PM, Leonardo M. Ramé <[email protected]> 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

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to