Gtk2-ImageView
view release on metacpan or search on metacpan
ImageView.xs view on Meta::CPAN
XSRETURN_UNDEF;
RETVAL = ▭
OUTPUT:
RETVAL
=for apidoc
Reads the two colors used to draw transparent parts of images with an alpha
channel. Note that if the transp setting of the view is
GTK_IMAGE_TRANSP_BACKGROUND or GTK_IMAGE_TRANSP_COLOR, then both colors will be
equal.
=cut
## call as @check_colors = $view->get_check_colors
void
gtk_image_view_get_check_colors (view)
GtkImageView * view
PREINIT:
int check_color1;
int check_color2;
PPCODE:
gtk_image_view_get_check_colors (view, &check_color1, &check_color2);
XPUSHs(sv_2mortal(newSViv(check_color1)));
XPUSHs(sv_2mortal(newSViv(check_color2)));
=for apidoc
Converts a rectangle in image space coordinates to widget space coordinates.
If the view is not realized, or if it contains no pixbuf, then the conversion
was unsuccessful, FALSE is returned and rect_out is left unmodified.
Note that this function may return a rectangle that is not visible on the
widget.
=cut
## call as $rect_out = $view->image_to_widget_rect($rect_in)
## gboolean gtk_image_view_image_to_widget_rect (GtkImageView *view, GdkRectangle *rect_in, GdkRectangle *rect_out);
GdkRectangle_copy *
gtk_image_view_image_to_widget_rect (view, rect_in)
GtkImageView * view
GdkRectangle * rect_in
PREINIT:
GdkRectangle rect_out;
CODE:
if (!gtk_image_view_image_to_widget_rect(view, rect_in, &rect_out))
XSRETURN_UNDEF;
RETVAL = &rect_out;
OUTPUT:
RETVAL
=for apidoc
Sets the offset of where in the image the GtkImageView should begin displaying
image data.
The offset is clamped so that it will never cause the GtkImageView to display
pixels outside the pixbuf. Setting this attribute causes the widget to repaint
itself if it is realized.
If invalidate is TRUE, the views entire area will be invalidated instead of
redrawn immidiately. The view is then queued for redraw, which means that
additional operations can be performed on it before it is redrawn.
The difference can sometimes be important like when you are overlaying data and
get flicker or artifacts when setting the offset. If that happens, setting
invalidate to TRUE could fix the problem. See the source code to
GtkImageToolSelector for an example.
Normally, invalidate should always be FALSE because it is much faster to repaint
immidately than invalidating.
=over
=item view : a Gtk2::ImageView
=item x : X-component of the offset in zoom space coordinates.
=item y : Y-component of the offset in zoom space coordinates.
=item invalidate : whether to invalidate the view or redraw immediately,
default=FALSE.
=back
=cut
## call as $view->set_offset($x, $y, $invalidate)
void
gtk_image_view_set_offset (view, x, y, invalidate=FALSE)
GtkImageView * view
gdouble x
gdouble y
gboolean invalidate
CODE:
gtk_image_view_set_offset (view, x, y, invalidate);
=for apidoc
Sets how the view should draw transparent parts of images with an alpha channel.
If transp is GTK_IMAGE_TRANSP_COLOR, the specified color will be used. Otherwise
the transp_color argument is ignored. If it is GTK_IMAGE_TRANSP_BACKGROUND, the
background color of the widget will be used. If it is GTK_IMAGE_TRANSP_GRID,
then a grid with light and dark gray boxes will be drawn on the transparent
parts.
Calling this method causes the widget to immediately repaint. It also causes the
pixbuf-changed signal to be emitted. This is done so that other widgets (such as
GtkImageNav) will have a chance to render a view of the pixbuf with the new
transparency settings.
=over
=item view : a Gtk2::ImageView
=item transp : The Gtk2::ImageView::Transp to use when drawing transparent
images, default GTK_IMAGE_TRANSP_GRID.
=item transp_color : Color to use when drawing transparent images, default
0x000000.
=back
=cut
## call as $view->set_transp($transp, $transp_color)
void
gtk_image_view_set_transp (view, transp, transp_color=0x000000)
( run in 0.447 second using v1.01-cache-2.11-cpan-df04353d9ac )