VectorSprite
Added in version 1.1.
Superclasses: Object
Implemented Interfaces: Paintable
, SymbolicPaintable
- Constructors:
VectorSprite(**properties)
new(source_paintable:Gdk.Paintable) -> Shumate.VectorSprite
new_full(source_paintable:Gdk.Paintable, width:int, height:int, scale_factor:float, source_rect:Gdk.Rectangle=None) -> Shumate.VectorSprite
Constructors
- class VectorSprite
- classmethod new(source_paintable: Paintable) VectorSprite
Creates a new
VectorSprite
using the paintable’s intrinsic size.Added in version 1.1.
- Parameters:
source_paintable – a
Paintable
- classmethod new_full(source_paintable: Paintable, width: int, height: int, scale_factor: float, source_rect: Rectangle | None = None) VectorSprite
Creates a new
VectorSprite
with the given size, scale factor, and area of the source paintable.Added in version 1.1.
- Parameters:
source_paintable – a
Paintable
width – the width of the sprite in pixels
height – the height of the sprite in pixels
scale_factor – the intended scale factor of the sprite
source_rect – the source rectangle of the sprite, or
None
to use the entire paintable
Methods
- class VectorSprite
-
- get_source_paintable() Paintable
Gets the source
Paintable
used to draw the sprite.Note that
VectorSprite
also implementsPaintable
. In most cases, you should draw the sprite rather than the original paintable.Added in version 1.1.