Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.3   7.4   7.5   8.0   8.1   8.2   8.3   8.4   8.5   8.6    Statistic  

DynaPDF.ScaleCoords

The function scales the coordinate system by applying a transformation matrix.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
DynaPDF 3.2 Yes Yes Yes Yes Yes
MBS( "DynaPDF.ScaleCoords"; PDF; x; y )   More

Parameters

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

Result

Returns OK on success and error on failure.

Description

The function scales the coordinate system by applying a transformation matrix.
It is highly recommended to save the graphics state beforehand, otherwise it is very difficult or impossible to restore the coordinate system later.
After scaling the coordinate system, bottom-up coordinates are active. It is not possible to use top- down coordinates inside a scaled coordinate system.
Please do not try to scale/skew/translate back later. use DynaPDF.SaveGraphicState and DynaPDF.RestoreGraphicState.

See also ScaleCoords function in DynaPDF manual.

Examples

Scale and draw rectangle:

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

See also

Example Databases

Created 18th August 2014, last changed 18th August 2014


DynaPDF.SaveGraphicState   -   DynaPDF.SetAlpha

Feedback: Report problem or ask question.




Links
MBS Xojo blog