neoscore.core.brush

class neoscore.core.brush.Brush[source]

Bases: object

A brush describing how shapes are filled in.

__init__(color: Optional[ColorDef] = None, pattern: BrushPattern = BrushPattern.SOLID)[source]
Parameters
  • color – The brush color. Defaults to black unless changed globally by neoscore.set_default_color.

  • pattern – The brush fill pattern.

classmethod from_existing(brush: Brush, color: Optional[ColorDef] = None, pattern: Optional[BrushPattern] = None) Brush[source]

Derive a Brush from another, overriding any provided fields.

classmethod from_def(brush_def: BrushDef) Brush[source]
classmethod no_brush() Brush[source]

Create a non-drawing brush.

property color: Color

The color for the brush

property pattern: BrushPattern

The fill pattern.

property interface: BrushInterface
neoscore.core.brush.BrushDef

A Brush or a color hex string to be passed to an otherwise default Brush.

alias of Union[Brush, str]