AppStream.Image

g AppStream.Image AppStream.Image GObject.Object GObject.Object GObject.Object->AppStream.Image

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

get_height ()

get_kind ()

get_locale ()

get_scale ()

get_url ()

get_width ()

set_height (height)

set_kind (kind)

set_locale (locale)

set_scale (scale)

set_url (url)

set_width (width)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class AppStream.Image(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

AppStream.ImageClass

classmethod new()
Returns:

a AppStream.Image

Return type:

AppStream.Image

Creates a new AppStream.Image.

get_height()
Returns:

height in pixels

Return type:

int

Gets the image height.

get_kind()
Returns:

the AppStream.ImageKind

Return type:

AppStream.ImageKind

Gets the image kind.

get_locale()
Returns:

Locale string

Return type:

str

Get locale for this image.

New in version 0.9.5.

get_scale()
Returns:

the scale factor.

Return type:

int

Gets the image integer scale factor.

get_url()
Returns:

URL

Return type:

str

Gets the full qualified URL for the image, usually pointing at some mirror.

get_width()
Returns:

width in pixels

Return type:

int

Gets the image width.

set_height(height)
Parameters:

height (int) – the height in pixels.

Sets the image height.

set_kind(kind)
Parameters:

kind (AppStream.ImageKind) – the AppStream.ImageKind, e.g. AppStream.ImageKind.THUMBNAIL.

Sets the image kind.

set_locale(locale)
Parameters:

locale (str) – the BCP47 locale string.

Sets the locale for this image.

New in version 0.9.5.

set_scale(scale)
Parameters:

scale (int) – the integer scale factor, e.g. 2

Sets the image scale factor.

set_url(url)
Parameters:

url (str) – the URL.

Sets the fully-qualified mirror URL to use for the image.

set_width(width)
Parameters:

width (int) – the width in pixels.

Sets the image width.