Пример #1
0
 def __init__(self):
     CombinedHandle.__init__(self)
     self.addHandle(PointHandle())
     self.addHandle(
         CircleScaleHandle("radius", CircleScaleHandle.Mode.RADIUS,
                           "position"))
     self.update()
Пример #2
0
 def draw(self, ctx):
     pos = self.getValue("position")
     x = pos.x
     y = pos.y
     a = self.getValue("angle")
     x1, y1 = coordinates(x, y, -1000, a)
     x2, y2 = coordinates(x, y, 1000, a)
     ctx.stroke(self.HANDLE_COLOR)
     ctx.line(x1, y1, x2, y2)
     CombinedHandle.draw(self, ctx)
Пример #3
0
 def draw(self, ctx):
     pos = self.getValue("position")
     x = pos.x
     y = pos.y
     a = self.getValue("angle")
     x1, y1 = coordinates(x, y, -1000, a)
     x2, y2 = coordinates(x, y, 1000, a)
     ctx.stroke(self.HANDLE_COLOR)
     ctx.line(x1, y1, x2, y2)
     CombinedHandle.draw(self, ctx)
Пример #4
0
 def __init__(self):
     CombinedHandle.__init__(self)
     self.addHandle(PointHandle())
     self.addHandle(
         CircleScaleHandle("inner", CircleScaleHandle.Mode.DIAMETER,
                           "position"))
     self.addHandle(
         CircleScaleHandle("outer", CircleScaleHandle.Mode.DIAMETER,
                           "position"))
     self.update()
Пример #5
0
 def __init__(self):
     CombinedHandle.__init__(self)
     self.addHandle(PointHandle("point1"))
     self.addHandle(PointHandle("point2"))
     self.update()
Пример #6
0
 def update(self):
     CombinedHandle.update(self)
     self.visible = self.isConnected("shape")
Пример #7
0
 def __init__(self):
     CombinedHandle.__init__(self)
     self.addHandle(TranslateHandle("position"))
     self.addHandle(RotateHandle("angle", "position"))
     self.update()
Пример #8
0
 def __init__(self):
     CombinedHandle.__init__(self)
     self.addHandle(PointHandle())
     self.addHandle(CircleScaleHandle("radius", CircleScaleHandle.Mode.RADIUS, "position"))
     self.update()
Пример #9
0
 def __init__(self):
     CombinedHandle.__init__(self)
     self.addHandle(PointHandle())
     self.addHandle(CircleScaleHandle("inner", CircleScaleHandle.Mode.DIAMETER, "position"))
     self.addHandle(CircleScaleHandle("outer", CircleScaleHandle.Mode.DIAMETER, "position"))
     self.update()
Пример #10
0
 def __init__(self):
     CombinedHandle.__init__(self)
     self.addHandle(PointHandle("point1"))
     self.addHandle(PointHandle("point2"))
     self.update()
Пример #11
0
 def update(self):
     CombinedHandle.update(self)
     self.visible = self.isConnected("shape")
Пример #12
0
 def __init__(self):
     CombinedHandle.__init__(self)
     self.addHandle(TranslateHandle("position"))
     self.addHandle(RotateHandle("angle", "position"))
     self.update()