Example #1
0
    def __init__(self):
        RectangleShape.__init__(self, 100, 50)
        self._saveToFile = True
        self._currentAngle = DRAWN_ANGLE_0

        self._metafiles = PseudoMetaFile(), PseudoMetaFile(), PseudoMetaFile(
        ), PseudoMetaFile()
Example #2
0
    def OnDrawOutline(self, dc, x, y, w, h):
        if self._metafiles[self._currentAngle].GetOutlineOp() != -1:
            op = self._metafiles[self._currentAngle].GetOps()[self._metafiles[self._currentAngle].GetOutlineOp()]
            if op.OnDrawOutline(dc, x, y, w, h, self._width, self._height):
                return

        # Default... just use a rectangle
        RectangleShape.OnDrawOutline(self, dc, x, y, w, h)
Example #3
0
 def GetPerimeterPoint(self, x1, y1, x2, y2):
     if self._metafiles[self._currentAngle].GetOutlineOp() != -1:
         op = self._metafiles[self._currentAngle].GetOps()[self._metafiles[self._currentAngle].GetOutlineOp()]
         p = op.GetPerimeterPoint(x1, y1, x2, y2, self.GetX(), self.GetY(), self.GetAttachmentMode())
         if p:
             return p
         
     return RectangleShape.GetPerimeterPoint(self, x1, y1, x2, y2)
Example #4
0
 def __init__(self):
     RectangleShape.__init__(self, 100, 50)
     self._saveToFile = True
     self._currentAngle = DRAWN_ANGLE_0
     
     self._metafiles=PseudoMetaFile(), PseudoMetaFile(), PseudoMetaFile(), PseudoMetaFile()
Example #5
0
 def __init__(self):
     RectangleShape.__init__(self, 100, 50)
     self._filename = ""
Example #6
0
 def __init__(self, w, h):
     RectangleShape.__init__(self, w, h)
     self.ClearRegions()
Example #7
0
 def __init__(self):
     RectangleShape.__init__(self, 100, 50)
     self._filename = ""
Example #8
0
 def OnRightClick(self, x, y, keys = 0, attachment = 0):
     if keys & KEY_CTRL:
         self.EditRegions()
     else:
         RectangleShape.OnRightClick(self, x, y, keys, attachment)
Example #9
0
    def ResetControlPoints(self):
        # May only have the region handles, (n - 1) of them
        if len(self._controlPoints) > len(self.GetRegions()) - 1:
            RectangleShape.ResetControlPoints(self)

        self.ResetMandatoryControlPoints()
Example #10
0
 def MakeControlPoints(self):
     RectangleShape.MakeControlPoints(self)
     self.MakeMandatoryControlPoints()
Example #11
0
 def OnDraw(self, dc):
     RectangleShape.OnDraw(self, dc)
Example #12
0
 def __init__(self, w, h):
     RectangleShape.__init__(self, w, h)
     self.ClearRegions()