Eidolon
Public Member Functions | Public Attributes | List of all members
DrawLineMixin Class Reference
Inheritance diagram for DrawLineMixin:
Inheritance graph
Collaboration diagram for DrawLineMixin:
Collaboration graph

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
 

Detailed Description

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).

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  matname = 'newLine',
  drawcolor = color(1,0,0) 
)

Member Function Documentation

◆ drawMouseDrag()

def drawMouseDrag (   self,
  e,
  dx,
  dy 
)
Move the end point to the position in `e'. Returns True if the line was moved, False otherwise.
Here is the call graph for this function:

◆ drawMousePress()

def drawMousePress (   self,
  e 
)
Start drawing the line, returns True if drawing was enabled and the line started, False otherwise.
Here is the call graph for this function:

◆ drawMouseRelease()

def drawMouseRelease (   self,
  e 
)
Finish drawing the line, returns True if the drawing was enabled, False otherwise.

◆ fillLineFig()

def fillLineFig (   self)
Fills the figure representing the drawn line so that it is visible on screen while drawing.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ startLineDraw()

def startLineDraw (   self)
Here is the caller graph for this function:

Member Data Documentation

◆ drawcolor

drawcolor

◆ drawingLine

drawingLine

◆ lineEnd

lineEnd

◆ lineFig

lineFig

◆ lineMat

lineMat

◆ lineStart

lineStart

The documentation for this class was generated from the following file: