Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides
New in version: 5.4   6.0   6.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2    Statistic  

DynaPDF.TranslateCoords

The function translates the coordinate system to the new origin OriginX, OriginY.

Component: DynaPDF
Version: 3.2
Mac OS X: Yes
Windows: Yes
Server: Yes
FileMaker Cloud: Yes

MBS( "DynaPDF.TranslateCoords"; PDF; x; y )

Parameters

Parameter Description Example value
PDF The PDF reference returned from DynaPDF.New. $pdf
x New coordinate origin of the x-axis $x
y New coordinate origin of the y-axis $y

Result

Returns OK on success and error on failure.

Description

The function translates the coordinate system to the new origin OriginX, OriginY.
Save the graphics state beforehand and restore it when finish.
After the coordinate system was changed by the function, bottom-up coordinates are active. It is not possible to use top-down coordinates with a transformed coordinate system.
Please do not try to scale/skew/translate back later. use DynaPDF.SaveGraphicState and DynaPDF.RestoreGraphicState.

Examples

Translate and draw rectangle:

MBS( "DynaPDF.SaveGraphicState"; $PDF )
MBS( "DynaPDF.TranslateCoords"; $PDF; 200;200)
MBS( "DynaPDF.Rectangle"; $PDF; 0; 0; 200; 100; "stroke" )
MBS( "DynaPDF.RestoreGraphicState"; $PDF )

See also


DynaPDF.TextAnnot   -   DynaPDF.Triangle

Feedback: Report problem or ask question.




Links
MBS FileMaker Plugins - Nachhilfe in Kruft