individual constraint drawing routines responsible for setting color
This commit is contained in:
parent
65f80774a1
commit
c7885bc0d6
@ -287,7 +287,6 @@ class SketchWidget:
|
||||
self.drawCircle(shape)
|
||||
|
||||
def drawConstraints(self):
|
||||
glColor(*self.constraint_color)
|
||||
for c in self.sketch.constraints:
|
||||
if isinstance(c, Connect):
|
||||
self.drawConnect(c)
|
||||
@ -297,10 +296,12 @@ class SketchWidget:
|
||||
self.drawVertical(c)
|
||||
|
||||
def drawConnect(self, con):
|
||||
glColor(*self.constraint_color)
|
||||
pt = self.ptToScreenPt(con.shape1.getPt(con.pt1))
|
||||
self.drawHandle(pt[0], pt[1])
|
||||
|
||||
def drawHandle(self, x, y):
|
||||
glColor(*self.constraint_color)
|
||||
self.drawFilledCircle(x, y, self.line_width, 4)
|
||||
s = self.line_width * 2
|
||||
glBegin(GL_LINE_LOOP)
|
||||
@ -311,6 +312,7 @@ class SketchWidget:
|
||||
glEnd()
|
||||
|
||||
def drawHorizontal(self, con):
|
||||
glColor(*self.constraint_color)
|
||||
l = 15.0
|
||||
glPushAttrib(GL_LINE_BIT)
|
||||
glEnable(GL_LINE_STIPPLE)
|
||||
@ -326,6 +328,7 @@ class SketchWidget:
|
||||
glPopAttrib()
|
||||
|
||||
def drawVertical(self, con):
|
||||
glColor(*self.constraint_color)
|
||||
l = 15.0
|
||||
glPushAttrib(GL_LINE_BIT)
|
||||
glEnable(GL_LINE_STIPPLE)
|
||||
|
Loading…
x
Reference in New Issue
Block a user