예제 #1
0
파일: square.py 프로젝트: caedesvvv/pynoded
 def __init__(self,parent,x,y,w,h,col=(1,1,1)):
     """
     Constructor for Square
     @param parent: parent graphobject.
     @param x: x position relative to parent
     @param y: y position relative to parent
     @param w: width of the square
     @param h: height of the square
     @param col: color for the square
     """
     GraphObject.__init__(self,parent,x,y)
     RectCollider.__init__(self,w,h)
     self.col = col
예제 #2
0
파일: label.py 프로젝트: caedesvvv/pynoded
 def __init__(self,parent,x,y,w,h,col=(1.0,1.0,1.0),name=""):
     """
     Constructor for Label
     @param parent: parent graphobject.
     @param x: x position relative to parent
     @param y: y position relative to parent
     @param w: width of the label
     @param h: height of the label
     @param col: color for the label
     @param name: text for the label
     """
     GraphObject.__init__(self,parent,x,y)
     RectCollider.__init__(self,w,h)
     self.col = col
     self.name = name
     self.maxdist = 4