constrainPathToRect |
Type | handler |
Dictionary | library.widgetutils |
Library | Widget Utilities |
Syntax | constrainPathToRect(<pTargetRect>,<xPath>)
|
Associations | com.livecode.library.widgetutils |
Summary | Scales and translates a path to fit within a rectangle
|
Parameters | Name | Type | Description |
---|
pTargetRect | | The rectangle to fit the path within
|
xPath | | The path to transform
|
|
Example | use com.livecode.library.iconsvg
public handler OnPaint() returns nothing
variable tPathString as String
put iconSVGPathFromName("shopping cart") into tPathString
variable tPath as Path
put path tPathString into tPath
constrainPathToRect(my bounds, tPath)
fill tPath on this canvas
end handler
|
Description | Scales and transforms xPath so that it fits within pTargetRect whilst maintaining its
aspect ratio.
|