## GimpZoomPreview GimpZoomPreview |

## Synopsis

                        GimpZoomPreview;
    GtkWidget*          gimp_zoom_preview_new               (GimpDrawable *drawable);
    GtkWidget*          gimp_zoom_preview_new_with_model    (GimpDrawable *drawable,
                                                             GimpZoomModel *model);
    guchar*             gimp_zoom_preview_get_source        (GimpZoomPreview *preview,
                                                             gint *width,
                                                             gint *height,
                                                             gint *bpp);
    GimpDrawable*       gimp_zoom_preview_get_drawable      (GimpZoomPreview *preview);
    gdouble             gimp_zoom_preview_get_factor        (GimpZoomPreview *preview);
    GimpZoomModel*      gimp_zoom_preview_get_model         (GimpZoomPreview *preview);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkObject
                   +----GtkWidget
                         +----GtkContainer
                               +----GtkBox
                                     +----GtkVBox
                                           +----GimpPreview
                                                 +----GimpScrolledPreview
                                                       +----GimpZoomPreview

## Implemented Interfaces

GimpZoomPreview implements AtkImplementorIface and GtkBuildable.

## Properties

      "drawable"                 gpointer              : Read / Write / Construct Only
      "model"                    GimpZoomModel         : Read / Write / Construct Only

## Description

## Details

### GimpZoomPreview

    typedef struct _GimpZoomPreview GimpZoomPreview;

### gimp_zoom_preview_new ()

    GtkWidget*          gimp_zoom_preview_new               (GimpDrawable *drawable);

Creates a new GimpZoomPreview widget for `drawable`.

`drawable` : | a GimpDrawable
Returns : |

Since GIMP 2.4

### gimp_zoom_preview_new_with_model ()

    GtkWidget*          gimp_zoom_preview_new_with_model    (GimpDrawable *drawable,
                                                             GimpZoomModel *model);

Creates a new GimpZoomPreview widget for `drawable` using the given `model`.

This variant of `gimp_zoom_preview_new()` 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.

`drawable` : | a GimpDrawable
`model` : | a GimpZoomModel
Returns : |

Since GIMP 2.4

### gimp_zoom_preview_get_source ()

    guchar*             gimp_zoom_preview_get_source        (GimpZoomPreview *preview,
                                                             gint *width,
                                                             gint *height,
                                                             gint *bpp);

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

`preview` : | a GimpZoomPreview widget
`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
Returns : | newly allocated data that should be released using `g_free()` when it is not any longer needed

Since GIMP 2.4

### gimp_zoom_preview_get_drawable ()

    GimpDrawable*       gimp_zoom_preview_get_drawable      (GimpZoomPreview *preview);

Returns the GimpDrawable the GimpZoomPreview is attached to.

`preview` : | a GimpZoomPreview widget
Returns : | the GimpDrawable that was passed to `gimp_zoom_preview_new()`.

Since GIMP 2.4

### gimp_zoom_preview_get_factor ()

    gdouble             gimp_zoom_preview_get_factor        (GimpZoomPreview *preview);

Returns the zoom factor the preview is currently using.

`preview` : | a GimpZoomPreview widget
Returns : | the current zoom factor

Since GIMP 2.4

### gimp_zoom_preview_get_model ()

    GimpZoomModel*      gimp_zoom_preview_get_model         (GimpZoomPreview *preview);

Returns the GimpZoomModel the preview is using.

`preview` : | a GimpZoomPreview widget
Returns : | a pointer to the GimpZoomModel owned by the `preview`

Since GIMP 2.4

## Property Details

### The `"drawable"` property

      "drawable"                 gpointer              : Read / Write / Construct Only

The drawable the GimpZoomPreview is attached to.

Since GIMP 2.4

### The `"model"` property

      "model"                    GimpZoomModel         : Read / Write / Construct Only

The GimpZoomModel used by this GimpZoomPreview.

Since GIMP 2.4