gnome-canvas-util

Name

gnome-canvas-util -- 

Synopsis


#include <libgnomecanvas/libgnomecanvas.h>


#define     GNOME_CANVAS_EPSILON
#define     GNOME_CANVAS_COLOR              (r, g, b)
#define     GNOME_CANVAS_COLOR_A            (r, g, b, a)

typedef     GnomeCanvasPoints;
GnomeCanvasPoints* gnome_canvas_points_new  (int num_points);
GnomeCanvasPoints* gnome_canvas_points_ref  (GnomeCanvasPoints *points);
#define     gnome_canvas_points_unref
void        gnome_canvas_points_free        (GnomeCanvasPoints *points);
int         gnome_canvas_get_miter_points   (double x1,
                                             double y1,
                                             double x2,
                                             double y2,
                                             double x3,
                                             double y3,
                                             double width,
                                             double *mx1,
                                             double *my1,
                                             double *mx2,
                                             double *my2);
void        gnome_canvas_get_butt_points    (double x1,
                                             double y1,
                                             double x2,
                                             double y2,
                                             double width,
                                             int project,
                                             double *bx1,
                                             double *by1,
                                             double *bx2,
                                             double *by2);
double      gnome_canvas_polygon_to_point   (double *poly,
                                             int num_points,
                                             double x,
                                             double y);
void        gnome_canvas_render_svp         (GnomeCanvasBuf *buf,
                                             ArtSVP *svp,
                                             guint32 rgba);
void        gnome_canvas_update_svp         (GnomeCanvas *canvas,
                                             ArtSVP **p_svp,
                                             ArtSVP *new_svp);
void        gnome_canvas_update_svp_clip    (GnomeCanvas *canvas,
                                             ArtSVP **p_svp,
                                             ArtSVP *new_svp,
                                             ArtSVP *clip_svp);
void        gnome_canvas_item_reset_bounds  (GnomeCanvasItem *item);
void        gnome_canvas_item_update_svp    (GnomeCanvasItem *item,
                                             ArtSVP **p_svp,
                                             ArtSVP *new_svp);
void        gnome_canvas_item_update_svp_clip
                                            (GnomeCanvasItem *item,
                                             ArtSVP **p_svp,
                                             ArtSVP *new_svp,
                                             ArtSVP *clip_svp);
void        gnome_canvas_item_request_redraw_svp
                                            (GnomeCanvasItem *item,
                                             const ArtSVP *svp);
void        gnome_canvas_update_bbox        (GnomeCanvasItem *item,
                                             int x1,
                                             int y1,
                                             int x2,
                                             int y2);
void        gnome_canvas_buf_ensure_buf     (GnomeCanvasBuf *buf);
ArtPathStrokeJoinType gnome_canvas_join_gdk_to_art
                                            (GdkJoinStyle gdk_join);
ArtPathStrokeCapType gnome_canvas_cap_gdk_to_art
                                            (GdkCapStyle gdk_cap);

Description

Details

GNOME_CANVAS_EPSILON

#define GNOME_CANVAS_EPSILON 1e-10


GNOME_CANVAS_COLOR()

#define     GNOME_CANVAS_COLOR(r, g, b)


GNOME_CANVAS_COLOR_A()

#define     GNOME_CANVAS_COLOR_A(r, g, b, a)


GnomeCanvasPoints

typedef struct {
	double *coords;
	int num_points;
	int ref_count;
} GnomeCanvasPoints;


gnome_canvas_points_new ()

GnomeCanvasPoints* gnome_canvas_points_new  (int num_points);

Creates a structure that should be used to pass an array of points to items.


gnome_canvas_points_ref ()

GnomeCanvasPoints* gnome_canvas_points_ref  (GnomeCanvasPoints *points);

Increases the reference count of the specified points structure.


gnome_canvas_points_unref

#define     gnome_canvas_points_unref


gnome_canvas_points_free ()

void        gnome_canvas_points_free        (GnomeCanvasPoints *points);

Decreases the reference count of the specified points structure. If it reaches zero, then the structure is freed.


gnome_canvas_get_miter_points ()

int         gnome_canvas_get_miter_points   (double x1,
                                             double y1,
                                             double x2,
                                             double y2,
                                             double x3,
                                             double y3,
                                             double width,
                                             double *mx1,
                                             double *my1,
                                             double *mx2,
                                             double *my2);

Given three points forming an angle, computes the coordinates of the inside and outside points of the mitered corner formed by a line of a given width at that angle.


gnome_canvas_get_butt_points ()

void        gnome_canvas_get_butt_points    (double x1,
                                             double y1,
                                             double x2,
                                             double y2,
                                             double width,
                                             int project,
                                             double *bx1,
                                             double *by1,
                                             double *bx2,
                                             double *by2);

Computes the butt points of a line segment.


gnome_canvas_polygon_to_point ()

double      gnome_canvas_polygon_to_point   (double *poly,
                                             int num_points,
                                             double x,
                                             double y);

Computes the distance between a point and a polygon.


gnome_canvas_render_svp ()

void        gnome_canvas_render_svp         (GnomeCanvasBuf *buf,
                                             ArtSVP *svp,
                                             guint32 rgba);

Render the svp over the buf.


gnome_canvas_update_svp ()

void        gnome_canvas_update_svp         (GnomeCanvas *canvas,
                                             ArtSVP **p_svp,
                                             ArtSVP *new_svp);

Sets the svp to the new value, requesting repaint on what's changed. This function takes responsibility for freeing new_svp.


gnome_canvas_update_svp_clip ()

void        gnome_canvas_update_svp_clip    (GnomeCanvas *canvas,
                                             ArtSVP **p_svp,
                                             ArtSVP *new_svp,
                                             ArtSVP *clip_svp);

Sets the svp to the new value, clipping if necessary, and requesting repaint on what's changed. This function takes responsibility for freeing new_svp.


gnome_canvas_item_reset_bounds ()

void        gnome_canvas_item_reset_bounds  (GnomeCanvasItem *item);

Resets the bounding box of a canvas item to an empty rectangle.


gnome_canvas_item_update_svp ()

void        gnome_canvas_item_update_svp    (GnomeCanvasItem *item,
                                             ArtSVP **p_svp,
                                             ArtSVP *new_svp);

Sets the svp to the new value, requesting repaint on what's changed. This function takes responsibility for freeing new_svp. This routine also adds the svp's bbox to the item's.


gnome_canvas_item_update_svp_clip ()

void        gnome_canvas_item_update_svp_clip
                                            (GnomeCanvasItem *item,
                                             ArtSVP **p_svp,
                                             ArtSVP *new_svp,
                                             ArtSVP *clip_svp);

Sets the svp to the new value, clipping if necessary, and requesting repaint on what's changed. This function takes responsibility for freeing new_svp.


gnome_canvas_item_request_redraw_svp ()

void        gnome_canvas_item_request_redraw_svp
                                            (GnomeCanvasItem *item,
                                             const ArtSVP *svp);

Request redraw of the svp if in aa mode, or the entire item in in xlib mode.


gnome_canvas_update_bbox ()

void        gnome_canvas_update_bbox        (GnomeCanvasItem *item,
                                             int x1,
                                             int y1,
                                             int x2,
                                             int y2);

Sets the bbox to the new value, requesting full repaint.


gnome_canvas_buf_ensure_buf ()

void        gnome_canvas_buf_ensure_buf     (GnomeCanvasBuf *buf);

Ensure that the buffer is in RGB format, suitable for compositing.


gnome_canvas_join_gdk_to_art ()

ArtPathStrokeJoinType gnome_canvas_join_gdk_to_art
                                            (GdkJoinStyle gdk_join);

Convert from GDK line join specifier to libart.


gnome_canvas_cap_gdk_to_art ()

ArtPathStrokeCapType gnome_canvas_cap_gdk_to_art
                                            (GdkCapStyle gdk_cap);

Convert from GDK line cap specifier to libart.