ScriptInterface:PixelToDoc(pixel)

Version added: before 9.5
When the user specifies things like line width, blur radius, and shadow offset in Moho, they enter a value in pixels

Arguments:

Name Type Description Default Ver
pixel real A distance in pixels < 9.5

Return value:

real the equivalent distance in document coordinates
When the user specifies things like line width, blur radius, and shadow offset in Moho, they enter a value in pixels. However, behind the scenes, these values are stored in "document coordinates". This allows an animation to be rendered at different resolutions while still looking correct. This function will convert between pixels and document coordinates.
<< Back to ScriptInterface