anim.plane.circle

class anim.plane.circle(radius, color='grey', stroke=None, thickness=0, linestyle='-', group=None, x=0, y=0, position=None, zvalue=0, draggable=False, clickable=False)

A circle item is defined by its:

  • radius

  • position of the point of reference

  • styling

Parameters ══════════

  • name

    str The circle’s name

  • group

    anim.plane.group default: None The circle’s group. If None, the position of the reference point is in absolute coordinates. Otherwise, the position is relative to the group’s reference point.

─── size ────────────────────────────────────

  • radius

    float The circle’s radius.

─── position ────────────────────────────────

  • x

    float default: 0 x-position of the center point.

  • y

    float default: 0 y-position of the center point.

  • position

    (float, float), [float, float], complex default: [0,0] Position of the center point. The user can define either x, y or the position. In case of conflict, the position attribute wins.

─── transformations ─────────────────────────

  • draggable

    bool default: False Boolean specifying if the item can be dragged. If True, the dragging callback is defined in the ‘itemChange’ method of the event class, which is transfered to the canva’s ‘event’ method (recommended).

─── stack ───────────────────────────────────

  • zvalue

    float default: 0 Z-value (stack order) of the circle.

─── style ────────────────────────────────

  • color

    None, str, QColor default: ‘grey’ Fill color. None stands for transparency.

  • stroke

    None, str, QColor default: None Stroke color. None stands for transparency.

  • thickness

    float default: 0 Stroke thickness, in scene units. When it is equal to 0, the stroke has the minimal thickness of 1 pixel.

  • linestyle

    ‘solid’/’-’, ‘dash’/’–’, ‘dot’/’..’/’:’, ‘dashdot’/’-.’ default: ‘-’ Stroke style.

__init__(radius, color='grey', stroke=None, thickness=0, linestyle='-', group=None, x=0, y=0, position=None, zvalue=0, draggable=False, clickable=False)

Circle item constructor

Methods

Lx()

Ly()

__init__(radius[, color, stroke, thickness, ...])

Circle item constructor

initialize()

Initialize the circle

rotate(angle)

Relative rotation

setColor()

Color styling

setGeometry()

Set the circle's geometry

setOrientation()

Set the qitem orientation

setPosition([position])

Sets the qitem's position.

setStroke()

Stroke styling

translate(dx[, dy])

Relative translation

Attributes

center_of_rotation

clickable

color

draggable

group

linestyle

orientation

position

radius

stroke

thickness

x

y

zvalue