GimpUi.ZoomPreview

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.Orientable Gtk.Orientable GObject.GInterface->Gtk.Orientable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned GimpUi.Preview GimpUi.Preview GimpUi.ScrolledPreview GimpUi.ScrolledPreview GimpUi.Preview->GimpUi.ScrolledPreview GimpUi.ZoomPreview GimpUi.ZoomPreview GimpUi.ScrolledPreview->GimpUi.ZoomPreview Gtk.Box Gtk.Box Gtk.Box->GimpUi.Preview Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.Container->Gtk.Box Gtk.Orientable->Gtk.Box Gtk.Widget->Gtk.Container

Subclasses:

None

Methods

Inherited:

GimpUi.ScrolledPreview (5), GimpUi.Preview (20), Gtk.Box (14), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Orientable (2)

Structs:

Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)

class

new_from_drawable (drawable)

class

new_with_model_from_drawable (drawable, model)

get_drawable ()

get_factor ()

get_model ()

get_source ()

Virtual Methods

Inherited:

GimpUi.Preview (7), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)

Properties

Inherited:

GimpUi.Preview (1), Gtk.Box (3), Gtk.Container (3), Gtk.Widget (39), Gtk.Orientable (1)

Name

Type

Flags

Short Description

drawable

Gimp.Drawable

r/w/co

The drawable this preview is attached to

model

GimpUi.ZoomModel

r/w/co

The zoom preview’s GimpUi.ZoomModel

Child Properties

Inherited:

Gtk.Box (5)

Style Properties

Inherited:

GimpUi.Preview (1), Gtk.Widget (17)

Signals

Inherited:

GimpUi.Preview (1), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Fields

Inherited:

GimpUi.Preview (1), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Class Details

class GimpUi.ZoomPreview(*args, **kwargs)
Bases:

GimpUi.ScrolledPreview

Abstract:

No

Structure:

GimpUi.ZoomPreviewClass

A drawable preview with zooming capabilities.

classmethod new_from_drawable(drawable)
Parameters:

drawable (Gimp.Drawable) – a drawable

Returns:

a new GimpUi.ZoomPreview.

Return type:

Gtk.Widget

Creates a new GimpUi.ZoomPreview widget for drawable.

New in version 3.0.

classmethod new_with_model_from_drawable(drawable, model)
Parameters:
Returns:

a new GimpUi.ZoomPreview.

Return type:

Gtk.Widget

Creates a new GimpUi.ZoomPreview widget for drawable using the given model.

This variant of GimpUi.ZoomPreview.new_from_drawable() allows you to create a preview using an existing zoom model. This may be useful if for example you want to have two zoom previews that keep their zoom factor in sync.

New in version 2.10.

get_drawable()
Returns:

the drawable that was passed to GimpUi.ZoomPreview.new_from_drawable().

Return type:

Gimp.Drawable

Returns the drawable the GimpUi.ZoomPreview is attached to.

New in version 3.0.

get_factor()
Returns:

the current zoom factor

Return type:

float

Returns the zoom factor the preview is currently using.

New in version 2.4.

get_model()
Returns:

a pointer to the GimpUi.ZoomModel owned by the self

Return type:

GimpUi.ZoomModel

Returns the GimpUi.ZoomModel the preview is using.

New in version 2.4.

get_source()
Returns:

newly allocated data that should be released using GLib.free() when it is not any longer needed

width:

a pointer to an int where the current width of the zoom widget will be put.

height:

a pointer to an int where the current width of the zoom widget will be put.

bpp:

return location for the number of bytes per pixel

Return type:

(bytes, width: int, height: int, bpp: int)

Returns the scaled image data of the part of the drawable the GimpUi.ZoomPreview is currently showing, as a newly allocated array of guchar. This function also allow to get the current width, height and bpp of the GimpUi.ZoomPreview.

New in version 2.4.

Property Details

GimpUi.ZoomPreview.props.drawable
Name:

drawable

Type:

Gimp.Drawable

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The drawable this preview is attached to

GimpUi.ZoomPreview.props.model
Name:

model

Type:

GimpUi.ZoomModel

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The GimpUi.ZoomModel used by this GimpUi.ZoomPreview.

New in version 2.4.