PyANGGui.G2DDrawer¶
- class G2DDrawer¶
Base class for all the 2D Drawers.
Inherited by:
G2DViewLayerSynopsis¶
Methods¶
def
__init__()def
getLayer()def
setLayer()
Virtual methods¶
def
draw()def
hit()def
updateGeometry()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
- __init__()¶
- __init__(arg__1)
- Parameters:
arg__1 –
G2DDrawer
- abstractmethod draw(arg__1)¶
- Parameters:
arg__1 –
G2DDrawContext
Draws an object in a 2D View. Called by the
G2DView.- getLayer()¶
- Return type:
Returns the drawer layer.
- abstractmethod hit(arg__1, arg__2)¶
- Parameters:
arg__1 –
G2DDrawContextarg__2 –
GKPoint
- Return type:
Returns information about a possible hit over this object. This hit functions is tested after testing the hit on all the top objects of this object (if any).
If an object can have top objects then maybe the G2DDrawer::preHit method should be written.
The layer will test the hit over an object following this steps: - will call G2DDrawer::preHit - if G2DDrawer::preHit returns nullptr will look for the G2DDrawer::hit on the top objects - if G2DDrawer::preHit returns nullptr and all the top objects hit returns nullptr then it will call G2DDrawer::hit.
- setLayer(alayer)¶
- Parameters:
alayer –
G2DViewLayer
Sets the layer in where this object will be draw in the next draw call. Called by the
G2DViewjust before the callingdraw.- abstractmethod updateGeometry(dc)¶
- Parameters:
Synchronizes the drawer with the object that it draws (due to a change in the object): This method syncs the dylabels so be sure to call it when overwriting the function.