new TPadPainter(dom, pad, iscanopt)
Painter for TPad object
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
dom |
object | string | DOM element for drawing or element id |
|
pad |
object | TPad object to draw |
|
iscan |
boolean |
<optional> |
if TCanvas object |
- Source:
Methods
(static) draw()
draw TPad object
- Source:
checkCanvasResize() → {Promise}
Check resize of canvas
- Source:
Returns:
with result
- Type
- Promise
checkSpecial() → {boolean}
Check if it is special object, which should be handled separately
It can be TStyle or list of colors or palette object
- Source:
Returns:
tru if any
- Type
- boolean
checkSpecialsInPrimitives()
Check if special objects appears in primitives
it could be list of colors or palette
- Source:
cleanPrimitives()
Cleanup primitives from pad - selector lets define which painters to remove
- Source:
cleanup()
cleanup pad and all primitives inside
- Source:
clickPadButton()
Process pad button click
- Source:
createCanvasSvg()
Create SVG element for canvas
- Source:
createPadSvg()
Create main SVG element for pad
- Source:
Returns:
true when pad is displayed and all its items should be redrawn
disablePadDrawing()
Disable pad drawing
Complete SVG element will be hidden
- Source:
drawObject()
Draw single primitive
- Source:
enlargePad()
Enlarge pad draw element when possible
- Source:
getFrameRect()
Returns frame coordiantes - also when frame is not drawn
- Source:
getPadHeight()
get pad height
- Source:
getPadRect()
get pad rect
- Source:
getPadWidth()
get pad width
- Source:
getRootPad()
return RPad object
- Source:
hasObjectsToDraw()
Return true if any objects beside sub-pads exists in the pad
- Source:
produceImage() → {Promise}
Prodce image for the pad
- Source:
Returns:
with created image
- Type
- Promise
redraw()
redraw pad
- Source:
redrawPad() → {Promise}
Redraw pad means redraw ourself
- Source:
Returns:
when redrawing ready
- Type
- Promise
registerForPadEvents()
register for pad events receiver
in pad painter, while pad may be drawn without canvas
- Source:
saveAs()
Save pad in specified format
Used from context menu
- Source:
selectObjectPainter()
method redirect call to pad events receiver
- Source:
updateObject()
Update TPad object
- Source: