# eric7.EricGraphics.EricArrowItem

Module implementing a graphics item subclass for an arrow.

### Global Attributes

ArrowheadAngleFactor

### Classes

EricArrowItem | Class implementing an arrow graphics item subclass.
EricArrowType | Class defining the arrow types.

### Functions

None

## EricArrowItem

Class implementing an arrow graphics item subclass.

### Derived from

QAbstractGraphicsShapeItem

### Class Attributes

None

### Class Methods

None

### Methods

EricArrowItem | Constructor
boundingRect | Public method to return the bounding rectangle.
paint | Public method to paint the item in local coordinates.
setEndPoint | Public method to set the end point.
setPoints | Public method to set the start and end points of the line.
setStartPoint | Public method to set the start point.

### Static Methods

None

#### EricArrowItem (Constructor)

EricArrowItem(origin=None, end=None, filled=False, arrowType=EricArrowType.NORMAL, colors=None, parent=None)

Constructor

origin (QPointF)
  origin of the arrow
end (QPointF)
  end point of the arrow
filled (bool)
  flag indicating a filled arrow head
arrowType (EricArrowType)
  arrow type
colors (tuple of (QColor, QColor))
  tuple containing the foreground and background colors
parent (QGraphicsItem)
  reference to the parent object

#### EricArrowItem.boundingRect

boundingRect()

Public method to return the bounding rectangle.

Return:
  bounding rectangle (QRectF)

#### EricArrowItem.paint

paint(painter, option, widget=None)

Public method to paint the item in local coordinates.

painter
  reference to the painter object (QPainter)
option
  style options (QStyleOptionGraphicsItem)
widget
  optional reference to the widget painted on (QWidget)

#### EricArrowItem.setEndPoint

setEndPoint(x, y)

Public method to set the end point.

Note: This method does not redraw the item.

x
  x-coordinate of the end point (float)
y
  y-coordinate of the end point (float)

#### EricArrowItem.setPoints

setPoints(xa, ya, xb, yb)

Public method to set the start and end points of the line.

Note: This method does not redraw the item.

xa
  x-coordinate of the start point (float)
ya
  y-coordinate of the start point (float)
xb
  x-coordinate of the end point (float)
yb
  y-coordinate of the end point (float)

#### EricArrowItem.setStartPoint

setStartPoint(x, y)

Public method to set the start point.

Note: This method does not redraw the item.

x
  x-coordinate of the start point (float)
y
  y-coordinate of the start point (float)

Up

## EricArrowType

Class defining the arrow types.

### Derived from

enum.Enum

### Class Attributes

NORMAL
WIDE

### Class Methods

None

### Methods

None

### Static Methods

None

Up