Methods
(private) addObjectPainter()
Add object painter to list of primitives
- Source:
(private) addPadButton()
Add button to the pad
- Source:
(private) addPadButtons()
Add buttons for pad or canvas
- Source:
(private) addPadInteractive()
Add pad interactive features like dragging and resize
- Source:
(private) changeDarkMode()
Changes canvas dark mode
- Source:
checkCanvasResize()
Check resize of canvas
- Source:
(private) 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:
(private) confirmDraw()
confirms that drawing is completed, may trigger next drawing immediately
- Source:
createCanvasSvg()
Create SVG element for the canvas
- Source:
(async, private) createImage() → {Promise}
Create image for the pad
- Description:
Used with web-based canvas to create images for server side
- Source:
Returns:
with image data, coded with btoa() function
- Type
- Promise
createPadSvg()
Create SVG element for the pad
- Source:
Returns:
true when pad is displayed and all its items should be redrawn
decodeOptions()
Decode pad draw options
- Source:
(private) deliverWebCanvasEvent()
Deliver mouse move or click event to the web canvas
- Source:
(async) divide()
Divide pad on sub-pads
- Source:
(private) drawItemNameOnCanvas()
Draw item name on canvas, dummy for RPad
- Source:
(async, private) drawNextSnap() → {Promise}
Function called when drawing next snapshot from the list
- Source:
Returns:
with pad painter when ready
- Type
- Promise
(async) drawObject()
Draw single primitive
- Source:
(async, private) drawPrimitives()
Draw pad primitives
- Source:
enlargePad()
Enlarge pad draw element when possible
- Source:
extractTObjectProp()
Extract properties from TObjectDisplayItem
- Source:
(private) fillContextMenu()
Fill pad context menu
- Source:
findActivePad() → {Object}
Search active pad
- Source:
Returns:
pad painter for active pad
- Type
- Object
(private) findInPrimitives()
try to find object by name in list of pad primitives
- Description:
used to find title drawing
- Source:
(private) findPainterFor()
Try to find painter for specified object
- Description:
can be used to find painter for some special objects, registered as histogram functions
- Source:
(private) findSnap()
Search painter with specified snapid, also sub-pads are checked
- Source:
(private) forEachPainterInPad(userfunc, kind)
Call function for each painter in pad
- Source:
Parameters:
Name | Type | Description |
---|---|---|
userfunc |
function | function to call |
kind |
string | 'all' for all objects (default), 'pads' only pads and sub-pads, 'objects' only for object in current pad |
getCoordinate(pos, frame_painter)
Calculates pad position for RPadPos values
- Source:
Parameters:
Name | Type | Description |
---|---|---|
pos |
object | instance of RPadPos |
frame_painter |
object | if drawing will be performed inside frame, frame painter |
(private) getCustomPalette()
Returns custom palette
- Source:
(private) getFramePainter()
Returns frame painter inside the pad
- Source:
getFrameRect()
Returns frame coordinates - also when frame is not drawn
- Source:
getHistPalette()
Returns palette associated with pad.
- Description:
Either from existing palette painter or just default palette
- Source:
(private) getMainPainter()
Returns main painter on the pad
- Description:
Typically main painter is TH1/TH2 object which is drawing axes
- Source:
(private) getNumPainters()
Returns number of painters
- Source:
getPadHeight()
get pad height
- Source:
getPadLength()
Calculates RPadLength value
- Source:
getPadLog()
return pad log state x or y are allowed
- Source:
getPadRect()
get pad rect
- Source:
getPadScale()
get pad height
- Source:
getPadWidth()
get pad width
- Source:
getRootPad()
return RPad object
- Source:
hasObjectsToDraw()
returns true if any objects beside sub-pads exists in the pad
- Source:
(private) isBatchMode()
Indicates that drawing runs in batch mode
- Source:
isButton()
Returns true if button
- Source:
(private) isDefaultPadRange()
Returns true if default pad range is configured
- Source:
isEditable()
Returns true if pad is editable
- Source:
(private) isGrayscale()
Returns true if canvas configured with grayscale
- Source:
(private) isRoot6()
Indicates that is not Root6 pad painter
- Source:
(private) itemContextMenu()
Show context menu for specified item
- Source:
(private) needRedrawByResize()
Checks if pad should be redrawn by resize
- Source:
(private) padContextMenu()
Show pad context menu
- Source:
(private) processPadTooltipEvent()
Process tooltip event in the pad
- Source:
(async) produceImage() → {Promise}
Produce image for the pad
- Source:
Returns:
with created image
- Type
- Promise
(private) producePadEvent()
Generate pad events, normally handled by GED
- Description:
in pad painter, while pad may be drawn without canvas
- Source:
redraw()
redraw pad
- Source:
(async, private) redrawLegend()
Redraw legend object
- Description:
Used when object attributes are changed to ensure that legend is up to date
- Source:
(async) redrawPad() → {Promise}
Redraw pad means redraw ourself
- Source:
Returns:
when redrawing ready
- Type
- Promise
(async) redrawPadSnap() → {Promise}
Redraw pad snap
- Description:
Online version of drawing pad primitives
- Source:
Returns:
with pad painter
- Type
- Promise
(private) registerForPadEvents()
register for pad events receiver
- Description:
in pad painter, while pad may be drawn without canvas
- Source:
(private) removePrimitive()
Removes and cleanup specified primitive
- Description:
also secondary primitives will be removed
- Source:
Returns:
new index to continue loop or -111 if main painter removed
saveAs()
Save pad in specified format
- Description:
Used from context menu
- Source:
selectObjectPainter()
method redirect call to pad events receiver
- Source:
(private) setFastDrawing()
Set fast drawing property depending on the size
- Source:
(private) setGrayscale()
Set grayscale mode for the canvas
- Source:
(private) setMainPainter()
Assign main painter on the pad
- Source:
(private) showPadButtons()
Show pad buttons
- Source:
(private) svg_this_pad()
Returns SVG element for the pad itself
- Source:
(private) syncDraw(kind) → {Promise}
sync drawing/redrawing/resize of the pad
- Source:
Parameters:
Name | Type | Description |
---|---|---|
kind |
string | kind of draw operation, if true - always queued |
Returns:
when pad is ready for draw operation or false if operation already queued
- Type
- Promise
(private) updateObject()
update RPad object
- Source:
(async, static) draw()
draw RPad object
- Source: