Shumate.VectorSprite¶
- Subclasses:
None
Methods¶
- Inherited:
GObject.Object (37), Gdk.Paintable (10), Gtk.SymbolicPaintable (1)
- Structs:
class |
|
class |
|
|
|
|
Virtual Methods¶
- Inherited:
GObject.Object (7), Gdk.Paintable (6), Gtk.SymbolicPaintable (1)
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
height |
||
r/w/co |
scale-factor |
||
r/w/co |
source-paintable |
||
r/w/co |
source-rect |
||
r/w/co |
width |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Shumate.VectorSprite(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A sprite used to draw textures or icons.
- Symbolic icons
If a sprite is created from a [iface`Gtk`.SymbolicPaintable] source, such as a symbolic icon, then when the sprite is part of a symbol layer it will be drawn using the icon-color property (or the text color, if the sprite is part of a formatted string).
New in version 1.1.
- classmethod new(source_paintable)¶
- Parameters:
source_paintable (
Gdk.Paintable
) – a [iface`Gdk`.Paintable]- Return type:
Creates a new [class`VectorSprite`] using the paintable’s intrinsic size.
New in version 1.1.
- classmethod new_full(source_paintable, width, height, scale_factor, source_rect)¶
- Parameters:
source_paintable (
Gdk.Paintable
) – a [iface`Gdk`.Paintable]width (
int
) – the width of the sprite in pixelsheight (
int
) – the height of the sprite in pixelsscale_factor (
float
) – the intended scale factor of the spritesource_rect (
Gdk.Rectangle
orNone
) – the source rectangle of the sprite, orNone
to use the entire paintable
- Return type:
Creates a new [class`VectorSprite`] with the given size, scale factor, and area of the source paintable.
New in version 1.1.
- get_height()¶
- Returns:
the sprite’s height in pixels
- Return type:
Gets the height at which the sprite should be drawn.
New in version 1.1.
- get_scale_factor()¶
- Returns:
the sprite’s scale factor
- Return type:
Gets the intended scale factor of the sprite.
New in version 1.1.
- get_source_paintable()¶
- Returns:
the source paintable
- Return type:
Gets the source [iface`Gdk`.Paintable] used to draw the sprite.
Note that [class`VectorSprite`] also implements [iface`Gdk`.Paintable]. In most cases, you should draw the sprite rather than the original paintable.
New in version 1.1.
Property Details¶
- Shumate.VectorSprite.props.height¶
- Name:
height
- Type:
- Default Value:
0
- Flags:
The height at which the sprite should be drawn, in pixels.
New in version 1.1.
- Shumate.VectorSprite.props.scale_factor¶
- Name:
scale-factor
- Type:
- Default Value:
1.0
- Flags:
The intended scale factor of the sprite.
New in version 1.1.
- Shumate.VectorSprite.props.source_paintable¶
- Name:
source-paintable
- Type:
- Default Value:
- Flags:
The [iface`Gdk`.Paintable] used to draw the sprite.
New in version 1.1.
- Shumate.VectorSprite.props.source_rect¶
- Name:
source-rect
- Type:
- Default Value:
- Flags:
The area of the source rectangle to draw, or
None
to use the entire paintable.New in version 1.1.
- Shumate.VectorSprite.props.width¶
- Name:
width
- Type:
- Default Value:
0
- Flags:
The width at which the sprite should be drawn, in pixels.
New in version 1.1.