class documentation

class ImageView(Gtk.Layout): (source)

View In Hierarchy

Widget to show an image, scales the image and sets proper background.
Method __init__ Constructor @param bgcolor: background color as color hex code, (e.g. "#FFF")
Method on_size_allocate Undocumented
Method set_bgcolor Set background color @param bgcolor: background color as color hex code, (e.g. "#FFF")
Method set_file Set the image to display from a file @param file: a File object
Method set_pixbuf Set the image to display from a pixbuf @param pixbuf: a GdkPixbuf.Pixbuf or None to display a broken image icon.
Method set_scaling No summary
Constant SCALE_FIT Undocumented
Constant SCALE_STATIC Undocumented
Instance Variable factor Undocumented
Instance Variable scaling Undocumented
Method _render Undocumented
Instance Variable _image Undocumented
Instance Variable _pixbuf Undocumented
Instance Variable _render_size Undocumented
Instance Variable _render_timeout Undocumented
def __init__(self, bgcolor='#FFF'): (source)
Constructor
Parameters
bgcolorbackground color as color hex code, (e.g. "#FFF")
def on_size_allocate(self, allocation): (source)

Undocumented

def set_bgcolor(self, bgcolor): (source)
Set background color
Parameters
bgcolorbackground color as color hex code, (e.g. "#FFF")
def set_file(self, file): (source)
Set the image to display from a file
Parameters
filea File object
def set_pixbuf(self, pixbuf): (source)
Set the image to display from a pixbuf
Parameters
pixbufa GdkPixbuf.Pixbuf or None to display a broken image icon.
def set_scaling(self, scaling, factor=1): (source)
Set the scaling
Parameters
scalingSCALE_FIT to make the image scale down to the size of the view, or SCALE_STATIC to set scaling to a fixed factor.
factorstatic scaling factor (in combination with SCALE_STATIC)
SCALE_FIT: int = (source)

Undocumented

Value
1
SCALE_STATIC: int = (source)

Undocumented

Value
2
factor = (source)

Undocumented

scaling = (source)

Undocumented

def _render(self): (source)

Undocumented

_image = (source)

Undocumented

_pixbuf = (source)

Undocumented

_render_size = (source)

Undocumented

_render_timeout = (source)

Undocumented