PyANGGui.G2DDrawer

class G2DDrawer

Base class for all the 2D Drawers.

Inheritance diagram of PyANGGui.G2DDrawer

Inherited by: G2DViewLayer

Synopsis

Methods

Virtual methods

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__1G2DDrawer

abstractmethod draw(arg__1)
Parameters:

arg__1G2DDrawContext

Draws an object in a 2D View. Called by the G2DView .

getLayer()
Return type:

G2DViewLayer

Returns the drawer layer.

abstractmethod hit(arg__1, arg__2)
Parameters:
Return type:

GDrawerHit

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:

alayerG2DViewLayer

Sets the layer in where this object will be draw in the next draw call. Called by the G2DView just before the calling draw .

abstractmethod updateGeometry(dc)
Parameters:

dcG2DUpdateGeometryContext

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.