graphics/GraphicCommons.py
changeset 1828 396da88d7b5c
parent 1782 5b6ad7a7fd9d
child 1832 0f1081928d65
equal deleted inserted replaced
1827:b8b47f9b5e56 1828:396da88d7b5c
  2650     # Draws the highlightment of this element if it is highlighted
  2650     # Draws the highlightment of this element if it is highlighted
  2651     def DrawHighlightment(self, dc):
  2651     def DrawHighlightment(self, dc):
  2652         scalex, scaley = dc.GetUserScale()
  2652         scalex, scaley = dc.GetUserScale()
  2653         dc.SetUserScale(1, 1)
  2653         dc.SetUserScale(1, 1)
  2654         # If user trying to connect wire with wrong input, highlight will become red.
  2654         # If user trying to connect wire with wrong input, highlight will become red.
  2655         if self.ErrHighlight and not (self.EndConnected):
  2655         if self.ErrHighlight and not self.EndConnected:
  2656             highlightcolor = wx.RED
  2656             highlightcolor = wx.RED
  2657         else:
  2657         else:
  2658             highlightcolor = HIGHLIGHTCOLOR
  2658             highlightcolor = HIGHLIGHTCOLOR
  2659         dc.SetPen(MiterPen(highlightcolor, (2 * scalex + 5)))
  2659         dc.SetPen(MiterPen(highlightcolor, (2 * scalex + 5)))
  2660         dc.SetBrush(wx.Brush(highlightcolor))
  2660         dc.SetBrush(wx.Brush(highlightcolor))