DrawHelpers Module
Types
| Type | Description |
Functions and values
| Function or value | Description |
Full Usage:
boxesIntersect box1 box2
Parameters:
BoundingBox
box2 : BoundingBox
Returns: bool
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Width of `txt` in pixels, reconstructed from per-character advance widths rather than measured: there is no canvas to measure against outside the browser. It agrees with what the Fable build gets from measureText to better than 1% for Verdana, the draw block's font, and degrades for other families in proportion to how far their letterforms sit from Verdana's. This exists so that the draw block can be exercised by `Tests/Issie.Tests` with nothing running - symbols built, wires routed, the separation pass run. Geometry that depends on it is recomputed whenever a sheet is loaded, so being a hair out costs a test nothing; a test should still assert structure - port counts, overlap, orthogonality, ordering - rather than a pixel width, which is only ever as good as the table above.
|
|
|
Full Usage:
makeArcAttr r
Parameters:
float
Returns: string
|
|
Full Usage:
makeCircle centreX centreY circleParameters
Parameters:
float
centreY : float
circleParameters : Circle
Returns: ReactElement
|
|
Full Usage:
makeLine x1 y1 x2 y2 lineParameters
Parameters:
'a
y1 : 'b
x2 : 'c
y2 : 'd
lineParameters : Line
Returns: ReactElement
|
|
Full Usage:
makeLineAttr dx dy
Parameters:
float
dy : float
Returns: string
|
|
Full Usage:
makePartArcAttr r h1 d1 h2 d2
Parameters:
float
h1 : float
d1 : float
h2 : float
d2 : float
Returns: string
|
|
|
|
Full Usage:
makePathFromAttr attr pathParameters
Parameters:
string
pathParameters : Path
Returns: ReactElement
|
|
Full Usage:
makePolygon points polygonParameters
Parameters:
string
polygonParameters : Polygon
Returns: ReactElement
|
|
Full Usage:
makeText posX posY displayedText textParameters
Parameters:
float
posY : float
displayedText : string
textParameters : Text
Returns: ReactElement
|
|
Full Usage:
makeTwoLinesOfText posX posY line1 line2 textParameters
Parameters:
float
posY : float
line1 : string
line2 : string
textParameters : Text
Returns: ReactElement
|
|
|
|
|
|
Full Usage:
uuid ()
Parameters:
unit
Returns: string
|