Eidolon
|
Public Member Functions | |
def | __init__ (self, matname='newLine', drawcolor=color(1, 0, 0)) |
def | startLineDraw (self) |
def | fillLineFig (self) |
def | drawMousePress (self, e) |
def | drawMouseDrag (self, e, dx, dy) |
def | drawMouseRelease (self, e) |
Public Attributes | |
drawingLine | |
lineStart | |
lineEnd | |
drawcolor | |
lineMat | |
lineFig | |
Mixin representing the UI for drawing a line in the 2D window. It relies on the mixed subtype calling drawMouse* methods when mouse events are caught and reacting appropriately when drawing occurs (ie. when those methods return True). When drawing is done the final line is self.start to self.end and can then be accessed by the mixed subtype. The method fillLineFig() must be called whenever the view is updated (ie. updateView() as in BaseCamera2DWidget).
def __init__ | ( | self, | |
matname = 'newLine' , |
|||
drawcolor = color(1,0,0) |
|||
) |
def drawMouseDrag | ( | self, | |
e, | |||
dx, | |||
dy | |||
) |
Move the end point to the position in `e'. Returns True if the line was moved, False otherwise.
def drawMousePress | ( | self, | |
e | |||
) |
Start drawing the line, returns True if drawing was enabled and the line started, False otherwise.
def drawMouseRelease | ( | self, | |
e | |||
) |
Finish drawing the line, returns True if the drawing was enabled, False otherwise.
def fillLineFig | ( | self | ) |
Fills the figure representing the drawn line so that it is visible on screen while drawing.
def startLineDraw | ( | self | ) |
drawcolor |
drawingLine |
lineEnd |
lineFig |
lineMat |
lineStart |