| GIMP Application Reference Manual | ||||
|---|---|---|---|---|
GimpScanConvert;
GimpScanConvert* gimp_scan_convert_new (void);
void gimp_scan_convert_free (GimpScanConvert *sc);
void gimp_scan_convert_set_pixel_ratio (GimpScanConvert *sc,
gdouble ratio_xy);
void gimp_scan_convert_set_clip_rectangle
(GimpScanConvert *sc,
gint x,
gint y,
gint width,
gint height);
void gimp_scan_convert_add_polyline (GimpScanConvert *sc,
guint n_points,
const GimpVector2 *points,
gboolean closed);
void gimp_scan_convert_stroke (GimpScanConvert *sc,
gdouble width,
GimpJoinStyle join,
GimpCapStyle cap,
gdouble miter,
gdouble dash_offset,
GArray *dash_info);
void gimp_scan_convert_render (GimpScanConvert *sc,
TileManager *tile_manager,
gint off_x,
gint off_y,
gboolean antialias);
void gimp_scan_convert_render_full (GimpScanConvert *sc,
TileManager *tile_manager,
gint off_x,
gint off_y,
gboolean replace,
gboolean antialias,
guchar value);
void gimp_scan_convert_render_value (GimpScanConvert *sc,
TileManager *tile_manager,
gint off_x,
gint off_y,
guchar value);
void gimp_scan_convert_compose (GimpScanConvert *sc,
TileManager *tile_manager,
gint off_x,
gint off_y);
void gimp_scan_convert_compose_value (GimpScanConvert *sc,
TileManager *tile_manager,
gint off_x,
gint off_y,
gint value);
GimpScanConvert* gimp_scan_convert_new (void);
Create a new scan conversion context.
Returns : |
a newly allocated GimpScanConvert context. |
void gimp_scan_convert_free (GimpScanConvert *sc);
Frees the resources allocated for sc.
|
a GimpScanConvert context |
void gimp_scan_convert_set_pixel_ratio (GimpScanConvert *sc, gdouble ratio_xy);
Sets the pixel aspect ratio.
|
a GimpScanConvert context |
|
the aspect ratio of the major coordinate axes |
void gimp_scan_convert_set_clip_rectangle
(GimpScanConvert *sc,
gint x,
gint y,
gint width,
gint height);
Sets a clip rectangle on sc. Subsequent render operations will be
restricted to this area.
|
a GimpScanConvert context |
|
horizontal offset of clip rectangle |
|
vertical offset of clip rectangle |
|
width of clip rectangle |
|
height of clip rectangle |
void gimp_scan_convert_add_polyline (GimpScanConvert *sc, guint n_points, const GimpVector2 *points, gboolean closed);
Add a polyline with n_points points that may be open or closed.
Please note that you should use gimp_scan_convert_stroke() if you
specify open polygons.
|
a GimpScanConvert context |
|
number of points to add |
|
array of points to add |
|
whether to close the polyline and make it a polygon |
void gimp_scan_convert_stroke (GimpScanConvert *sc, gdouble width, GimpJoinStyle join, GimpCapStyle cap, gdouble miter, gdouble dash_offset, GArray *dash_info);
Stroke the content of a GimpScanConvert. The next
gimp_scan_convert_render() will result in the outline of the
polygon defined with the commands above.
You cannot add additional polygons after this command.
Note that if you have nonstandard resolution, "width" gives the width (in pixels) for a vertical stroke, i.e. use the X resolution to calculate the width of a stroke when operating with real world units.
|
a GimpScanConvert context |
|
line width in pixels |
|
how lines should be joined |
|
how to render the end of lines |
|
convert a mitered join to a bevelled join if the miter would
extend to a distance of more than miter times width from
the actual join point
|
|
offset to apply on the dash pattern |
|
dash pattern or NULL for a solid line
|
void gimp_scan_convert_render (GimpScanConvert *sc, TileManager *tile_manager, gint off_x, gint off_y, gboolean antialias);
This is a wrapper around gimp_scan_convert_render_full() that replaces the
content of the tile_manager with a rendered form of the path passed in.
You cannot add additional polygons after this command.
|
a GimpScanConvert context |
|
the TileManager to render to |
|
horizontal offset into the tile_manager
|
|
vertical offset into the tile_manager
|
|
whether to apply antialiasiing |
void gimp_scan_convert_render_full (GimpScanConvert *sc, TileManager *tile_manager, gint off_x, gint off_y, gboolean replace, gboolean antialias, guchar value);
This function renders the area described by the path to the tile_manager,
taking the offset off_x and off_y in the tilemanager into account.
The rendering can happen antialiased and be rendered on top of existing
content or replacing it completely. The value specifies the opacity value
to be used for the objects in the sc.
This function expects a tile manager of depth 1.
You cannot add additional polygons after this command.
|
a GimpScanConvert context |
|
the TileManager to render to |
|
horizontal offset into the tile_manager
|
|
vertical offset into the tile_manager
|
|
if true the original content of the tile_manager gets destroyed
|
|
if true the rendering happens antialiased |
|
value to use for covered pixels |
void gimp_scan_convert_render_value (GimpScanConvert *sc, TileManager *tile_manager, gint off_x, gint off_y, guchar value);
This is a wrapper around gimp_scan_convert_render_full() that doesn't do
antialiasing but gives control over the value that should be used for pixels
covered by the scan conversion. Uncovered pixels are set to zero.
You cannot add additional polygons after this command.
|
a GimpScanConvert context |
|
the TileManager to render to |
|
horizontal offset into the tile_manager
|
|
vertical offset into the tile_manager
|
|
value to use for covered pixels |
void gimp_scan_convert_compose (GimpScanConvert *sc, TileManager *tile_manager, gint off_x, gint off_y);
This is a wrapper around of gimp_scan_convert_render_full() that composes
the (aliased) scan conversion on top of the content of the tile_manager.
You cannot add additional polygons after this command.
|
a GimpScanConvert context |
|
the TileManager to render to |
|
horizontal offset into the tile_manager
|
|
vertical offset into the tile_manager
|
void gimp_scan_convert_compose_value (GimpScanConvert *sc, TileManager *tile_manager, gint off_x, gint off_y, gint value);
This is a wrapper around gimp_scan_convert_render_full() that
composes the (aliased) scan conversion with value value on top of the
content of the tile_manager.
You cannot add additional polygons after this command.
|
a GimpScanConvert context |
|
the TileManager to render to |
|
horizontal offset into the tile_manager
|
|
vertical offset into the tile_manager
|
|
value to use for covered pixels |