class neoscore.core.painted_object.PaintedObject[source]

Bases: PositionedObject

A PositionedObject which is painted with a pen (outline) and brush (fill).

This is mostly meant to be used as a superclass for other classes which need this behavior.

__init__(pos: PointDef, parent: Optional[PositionedObject], brush: Optional[BrushDef] = None, pen: Optional[PenDef] = None)[source]
  • pos – The position of the object relative to its parent

  • pen – The pen to draw outlines with.

  • brush – The brush to fill shapes with.

  • parent – The parent object or None

property pen: Pen

The pen to draw outlines with

property brush: Brush

The brush to draw outlines with.

As a convenience, this may be set with a hex color string for a solid color brush of that color. For brushes using alpha channels and non-solid-color fill patterns, a fully initialized brush must be passed to this.