GimpDisplayShell-scroll

GimpDisplayShell-scroll

Synopsis

void                gimp_display_shell_scroll_center_image_coordinate
                                                        (GimpDisplayShell *shell,
                                                         gdouble image_x,
                                                         gdouble image_y);
void                gimp_display_shell_scroll           (GimpDisplayShell *shell,
                                                         gint x_offset,
                                                         gint y_offset);
void                gimp_display_shell_scroll_set_offset
                                                        (GimpDisplayShell *shell,
                                                         gint offset_x,
                                                         gint offset_y);
void                gimp_display_shell_scroll_clamp_offsets
                                                        (GimpDisplayShell *shell);
void                gimp_display_shell_scroll_clamp_and_update
                                                        (GimpDisplayShell *shell);
void                gimp_display_shell_scroll_unoverscrollify
                                                        (GimpDisplayShell *shell,
                                                         gint in_offset_x,
                                                         gint in_offset_y,
                                                         gint *out_offset_x,
                                                         gint *out_offset_y);
void                gimp_display_shell_scroll_center_image
                                                        (GimpDisplayShell *shell,
                                                         gboolean horizontally,
                                                         gboolean vertically);
void                gimp_display_shell_scroll_center_image_on_next_size_allocate
                                                        (GimpDisplayShell *shell,
                                                         gboolean horizontally,
                                                         gboolean vertically);
void                gimp_display_shell_scroll_get_scaled_viewport
                                                        (const GimpDisplayShell *shell,
                                                         gint *x,
                                                         gint *y,
                                                         gint *w,
                                                         gint *h);
void                gimp_display_shell_scroll_get_viewport
                                                        (const GimpDisplayShell *shell,
                                                         gdouble *x,
                                                         gdouble *y,
                                                         gdouble *w,
                                                         gdouble *h);
void                gimp_display_shell_scroll_get_disp_offset
                                                        (const GimpDisplayShell *shell,
                                                         gint *disp_xoffset,
                                                         gint *disp_yoffset);
void                gimp_display_shell_scroll_get_render_start_offset
                                                        (const GimpDisplayShell *shell,
                                                         gint *offset_x,
                                                         gint *offset_y);
void                gimp_display_shell_scroll_setup_hscrollbar
                                                        (GimpDisplayShell *shell,
                                                         gdouble value);
void                gimp_display_shell_scroll_setup_vscrollbar
                                                        (GimpDisplayShell *shell,
                                                         gdouble value);

Description

Details

gimp_display_shell_scroll_center_image_coordinate ()

void                gimp_display_shell_scroll_center_image_coordinate
                                                        (GimpDisplayShell *shell,
                                                         gdouble image_x,
                                                         gdouble image_y);

Center the viewport around the passed image coordinate


gimp_display_shell_scroll ()

void                gimp_display_shell_scroll           (GimpDisplayShell *shell,
                                                         gint x_offset,
                                                         gint y_offset);


gimp_display_shell_scroll_set_offset ()

void                gimp_display_shell_scroll_set_offset
                                                        (GimpDisplayShell *shell,
                                                         gint offset_x,
                                                         gint offset_y);


gimp_display_shell_scroll_clamp_offsets ()

void                gimp_display_shell_scroll_clamp_offsets
                                                        (GimpDisplayShell *shell);


gimp_display_shell_scroll_clamp_and_update ()

void                gimp_display_shell_scroll_clamp_and_update
                                                        (GimpDisplayShell *shell);

Helper function for calling two functions that are commonly called in pairs.


gimp_display_shell_scroll_unoverscrollify ()

void                gimp_display_shell_scroll_unoverscrollify
                                                        (GimpDisplayShell *shell,
                                                         gint in_offset_x,
                                                         gint in_offset_y,
                                                         gint *out_offset_x,
                                                         gint *out_offset_y);

Takes a scroll offset and returns the offset that will not result in a scroll beyond the image border. If the image is already overscrolled, the return value is 0 for that given axis.


gimp_display_shell_scroll_center_image ()

void                gimp_display_shell_scroll_center_image
                                                        (GimpDisplayShell *shell,
                                                         gboolean horizontally,
                                                         gboolean vertically);

Centers the image in the display shell on the desired axes.


gimp_display_shell_scroll_center_image_on_next_size_allocate ()

void                gimp_display_shell_scroll_center_image_on_next_size_allocate
                                                        (GimpDisplayShell *shell,
                                                         gboolean horizontally,
                                                         gboolean vertically);

Centers the image in the display as soon as the canvas has got its new size.

Only call this if you are sure the canvas size will change. (Otherwise the signal connection and centering will lurk until the canvas size is changed e.g. by toggling the rulers.)


gimp_display_shell_scroll_get_scaled_viewport ()

void                gimp_display_shell_scroll_get_scaled_viewport
                                                        (const GimpDisplayShell *shell,
                                                         gint *x,
                                                         gint *y,
                                                         gint *w,
                                                         gint *h);

Gets the viewport in screen coordinates, with origin at (0, 0) in the image


gimp_display_shell_scroll_get_viewport ()

void                gimp_display_shell_scroll_get_viewport
                                                        (const GimpDisplayShell *shell,
                                                         gdouble *x,
                                                         gdouble *y,
                                                         gdouble *w,
                                                         gdouble *h);

Gets the viewport in image coordinates


gimp_display_shell_scroll_get_disp_offset ()

void                gimp_display_shell_scroll_get_disp_offset
                                                        (const GimpDisplayShell *shell,
                                                         gint *disp_xoffset,
                                                         gint *disp_yoffset);

In viewport coordinates, get the offset of where to start rendering the scaled image.


gimp_display_shell_scroll_get_render_start_offset ()

void                gimp_display_shell_scroll_get_render_start_offset
                                                        (const GimpDisplayShell *shell,
                                                         gint *offset_x,
                                                         gint *offset_y);

Get the offset into the scaled image that we should start render from


gimp_display_shell_scroll_setup_hscrollbar ()

void                gimp_display_shell_scroll_setup_hscrollbar
                                                        (GimpDisplayShell *shell,
                                                         gdouble value);

Setup the limits of the horizontal scrollbar


gimp_display_shell_scroll_setup_vscrollbar ()

void                gimp_display_shell_scroll_setup_vscrollbar
                                                        (GimpDisplayShell *shell,
                                                         gdouble value);

Setup the limits of the vertical scrollbar