| GIMP Application Reference Manual | ||||
|---|---|---|---|---|
void gimp_display_shell_transform_coordinate (GimpDisplayShell *shell, GimpCoords *image_coords, GimpCoords *display_coords); void gimp_display_shell_untransform_coordinate (GimpDisplayShell *shell, GimpCoords *display_coords, GimpCoords *image_coords); void gimp_display_shell_transform_points (GimpDisplayShell *shell, const gdouble *points, GdkPoint *coords, gint n_points, gboolean use_offsets); void gimp_display_shell_transform_segments (GimpDisplayShell *shell, const BoundSeg *src_segs, GdkSegment *dest_segs, gint n_segs, gboolean use_offsets); void gimp_display_shell_transform_coords (GimpDisplayShell *shell, const GimpCoords *image_coords, GdkPoint *disp_coords, gint n_coords, gboolean use_offsets); void gimp_display_shell_transform_xy (GimpDisplayShell *shell, gdouble x, gdouble y, gint *nx, gint *ny, gboolean use_offsets); void gimp_display_shell_untransform_xy (GimpDisplayShell *shell, gint x, gint y, gint *nx, gint *ny, gboolean round, gboolean use_offsets); void gimp_display_shell_transform_xy_f (GimpDisplayShell *shell, gdouble x, gdouble y, gdouble *nx, gdouble *ny, gboolean use_offsets); void gimp_display_shell_untransform_xy_f (GimpDisplayShell *shell, gdouble x, gdouble y, gdouble *nx, gdouble *ny, gboolean use_offsets); void gimp_display_shell_untransform_viewport (GimpDisplayShell *shell, gint *x, gint *y, gint *width, gint *height);
void gimp_display_shell_transform_coordinate
(GimpDisplayShell *shell,
GimpCoords *image_coords,
GimpCoords *display_coords);
Transforms from image coordinates to display coordinates, so that objects can be rendered at the correct points on the display.
|
a GimpDisplayShell |
|
image coordinates |
|
returns the corresponding display coordinates |
void gimp_display_shell_untransform_coordinate
(GimpDisplayShell *shell,
GimpCoords *display_coords,
GimpCoords *image_coords);
Transforms from display coordinates to image coordinates, so that points on the display can be mapped to points in the image.
|
a GimpDisplayShell |
|
display coordinates |
|
returns the corresponding image coordinates |
void gimp_display_shell_transform_points (GimpDisplayShell *shell, const gdouble *points, GdkPoint *coords, gint n_points, gboolean use_offsets);
Transforms from image coordinates to display coordinates, so that objects can be rendered at the correct points on the display.
|
a GimpDisplayShell |
|
array of x, y coordinate pairs |
|
returns the corresponding display coordinates |
|
number of points |
|
if TRUE, the source coordinates are in the coordinate
system of the active drawable instead of the image
|
void gimp_display_shell_transform_segments
(GimpDisplayShell *shell,
const BoundSeg *src_segs,
GdkSegment *dest_segs,
gint n_segs,
gboolean use_offsets);
Transforms from image coordinates to display coordinates, so that objects can be rendered at the correct points on the display.
|
a GimpDisplayShell |
|
array of segments in image coordinates |
|
returns the corresponding segments in display coordinates |
|
number of segments |
|
if TRUE, the source coordinates are in the coordinate
system of the active drawable instead of the image
|
void gimp_display_shell_transform_coords (GimpDisplayShell *shell, const GimpCoords *image_coords, GdkPoint *disp_coords, gint n_coords, gboolean use_offsets);
Transforms from image coordinates to display coordinates, so that objects can be rendered at the correct points on the display.
|
a GimpDisplayShell |
|
array of image coordinates |
|
returns the corresponding display coordinates |
|
number of coordinates |
|
if TRUE, the source coordinates are in the coordinate
system of the active drawable instead of the image
|
void gimp_display_shell_transform_xy (GimpDisplayShell *shell, gdouble x, gdouble y, gint *nx, gint *ny, gboolean use_offsets);
|
|
|
|
|
|
|
|
|
|
|
void gimp_display_shell_untransform_xy (GimpDisplayShell *shell, gint x, gint y, gint *nx, gint *ny, gboolean round, gboolean use_offsets);
Transform from display coordinates to image coordinates, so that points on the display can be mapped to the corresponding points in the image.
|
a GimpDisplayShell |
|
x coordinate in display coordinates |
|
y coordinate in display coordinates |
|
returns x oordinate in image coordinates |
|
returns y coordinate in image coordinates |
|
if TRUE, round the results to the nearest integer;
if FALSE, simply cast them to gint.
|
|
if TRUE, nx and ny will be returned in the coordinate
system of the active drawable instead of the image
|
void gimp_display_shell_transform_xy_f (GimpDisplayShell *shell, gdouble x, gdouble y, gdouble *nx, gdouble *ny, gboolean use_offsets);
This function is identical to gimp_display_shell_transfrom_xy(),
except that it returns its results as doubles rather than ints.
|
a GimpDisplayShell |
|
x coordinate of point in image coordinates |
|
y coordinate of point in image coordinate |
|
returns the transformed x coordinate |
|
returns the transformed y coordinate |
|
if TRUE, the x and y coordinates are in the coordinate
system of the active drawable instead of the image
|
void gimp_display_shell_untransform_xy_f (GimpDisplayShell *shell, gdouble x, gdouble y, gdouble *nx, gdouble *ny, gboolean use_offsets);
This function is identical to gimp_display_shell_untransform_xy(),
except that the input and output coordinates are doubles rather than
ints, and consequently there is no option related to rounding.
|
a GimpDisplayShell |
|
x coordinate in display coordinates |
|
y coordinate in display coordinates |
|
place to return x coordinate in image coordinates |
|
place to return y coordinate in image coordinates |
|
if TRUE, nx and ny will be returned in the coordinate
system of the active drawable instead of the image
|
void gimp_display_shell_untransform_viewport
(GimpDisplayShell *shell,
gint *x,
gint *y,
gint *width,
gint *height);
This function calculates the part of the image, im image coordinates, that corresponds to the display viewport.
|
a GimpDisplayShell |
|
returns image x coordinate of display upper left corner |
|
returns image y coordinate of display upper left corner |
|
returns width of display measured in image coordinates |
|
returns height of display measured in image coordinates |