original_docstring: Uses given canvas to draw arrow.
docstring: Uses given canvas to draw arrow.
docstring_tokens: Uses given canvas to draw arrow .
code: def draw(self, canvas, source=UNDEF, **overrides):
          """Uses given canvas to draw arrow."""
          
          # check if visible
          if not self.is_visible(source, overrides):
              return
          
          # get properties
          tag = self.get_property('tag', source, overrides)
          x = self.get_property('x', source, overrides)
          y = self.get_property('y', source, overrides)
          start_angle = AngleProperties.get_angle(self, 'start_', ANGLE_RAD, source, overrides)
          end_angle = AngleProperties.get_angle(self, 'end_', ANGLE_RAD, source, overrides)
          radius = self.get_property('radius', source, overrides)
          clockwise = self.get_property('clockwise', source, overrides)
          
          # make path
          path = Path()
          path.arc(x, y, radius, start_angle, end_angle, clockwise)
          
          # get coordinates
          x1 = x + radius * math.cos(start_angle)
          y1 = y + radius * math.sin(start_angle)
          x2 = x + radius * math.cos(end_angle)
          y2 = y + radius * math.sin(end_angle)
          
          direction = 1 if clockwise else -1
          start_angle = start_angle - 0.5*math.pi * direction
          end_angle = end_angle + 0.5*math.pi * direction
          
          # set pen and brush
          canvas.set_pen_by(self, source=source, overrides=overrides)
          canvas.fill_color = None
          
          # start drawing group
          canvas.group(tag, "arrow")
          
          # draw path
          canvas.draw_path(path)
          
          # draw heads
          self.draw_heads(canvas,
              source = source,
              start_head_x = x1,
              start_head_y = y1,
              start_head_angle = start_angle,
              start_head_angle_units = ANGLE_RAD,
              end_head_x = x2,
              end_head_y = y2,
              end_head_angle = end_angle,
              end_head_angle_units = ANGLE_RAD,
              **overrides)
          
          # end drawing group
          canvas.ungroup()
code_tokens: def draw ( self , canvas , source = UNDEF , ** overrides ) : if not self . is_visible ( source , overrides ) : return tag = self . get_property ( 'tag' , source , overrides ) x = self . get_property ( 'x' , source , overrides ) y = self . get_property ( 'y' , source , overrides ) start_angle = AngleProperties . get_angle ( self , 'start_' , ANGLE_RAD , source , overrides ) end_angle = AngleProperties . get_angle ( self , 'end_' , ANGLE_RAD , source , overrides ) radius = self . get_property ( 'radius' , source , overrides ) clockwise = self . get_property ( 'clockwise' , source , overrides ) path = Path ( ) path . arc ( x , y , radius , start_angle , end_angle , clockwise ) x1 = x + radius * math . cos ( start_angle ) y1 = y + radius * math . sin ( start_angle ) x2 = x + radius * math . cos ( end_angle ) y2 = y + radius * math . sin ( end_angle ) direction = 1 if clockwise else - 1 start_angle = start_angle - 0.5 * math . pi * direction end_angle = end_angle + 0.5 * math . pi * direction canvas . set_pen_by ( self , source = source , overrides = overrides ) canvas . fill_color = None canvas . group ( tag , "arrow" ) canvas . draw_path ( path ) self . draw_heads ( canvas , source = source , start_head_x = x1 , start_head_y = y1 , start_head_angle = start_angle , start_head_angle_units = ANGLE_RAD , end_head_x = x2 , end_head_y = y2 , end_head_angle = end_angle , end_head_angle_units = ANGLE_RAD , ** overrides ) canvas . ungroup ( )
short_docstring: Uses given canvas to draw arrow.
short_docstring_tokens: Uses given canvas to draw arrow .
comment: """Uses given canvas to draw arrow."""$SEP$# check if visible$SEP$# get properties$SEP$# make path$SEP$# get coordinates$SEP$# set pen and brush$SEP$# start drawing group$SEP$# draw path$SEP$# draw heads$SEP$# end drawing group