Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
cairo-path-data-private.h File Reference
#include "cairoint.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

cairo_private cairo_path_t_cairo_path_data_create (cairo_path_fixed_t *path, cairo_gstate_t *gstate)
 _cairo_path_data_create: : a fixed-point, device-space path to be converted and copied : the current graphics state
cairo_private cairo_path_t_cairo_path_data_create_flat (cairo_path_fixed_t *path, cairo_gstate_t *gstate)
 _cairo_path_data_create_flat: : a fixed-point, device-space path to be flattened, converted and copied : the current graphics state
cairo_private cairo_status_t _cairo_path_data_append_to_context (cairo_path_t *path, cairo_t *cr)
 _cairo_path_data_append_to_context: : the path data to be appended : a cairo context

Variables

const cairo_private cairo_path_t _cairo_path_nil

Function Documentation

_cairo_path_data_append_to_context: : the path data to be appended : a cairo context

Append to the current path within .

Return value: CAIRO_STATUS_INVALID_PATH_DATA if the data in is invalid, and CAIRO_STATUS_SUCCESS otherwise.

Definition at line 447 of file cairo-path-data.c.

{
    int i;
    cairo_path_data_t *p;

    for (i=0; i < path->num_data; i += path->data[i].header.length) {
       p = &path->data[i];
       switch (p->header.type) {
       case CAIRO_PATH_MOVE_TO:
           if (p->header.length != 2)
              return CAIRO_STATUS_INVALID_PATH_DATA;
           cairo_move_to (cr,
                        p[1].point.x, p[1].point.y);
           break;
       case CAIRO_PATH_LINE_TO:
           if (p->header.length != 2)
              return CAIRO_STATUS_INVALID_PATH_DATA;
           cairo_line_to (cr,
                        p[1].point.x, p[1].point.y);
           break;
       case CAIRO_PATH_CURVE_TO:
           if (p->header.length != 4)
              return CAIRO_STATUS_INVALID_PATH_DATA;
           cairo_curve_to (cr,
                         p[1].point.x, p[1].point.y,
                         p[2].point.x, p[2].point.y,
                         p[3].point.x, p[3].point.y);
           break;
       case CAIRO_PATH_CLOSE_PATH:
           if (p->header.length != 1)
              return CAIRO_STATUS_INVALID_PATH_DATA;
           cairo_close_path (cr);
           break;
       default:
           return CAIRO_STATUS_INVALID_PATH_DATA;
       }
    }

    return CAIRO_STATUS_SUCCESS;
}

Here is the caller graph for this function:

cairo_private cairo_path_t* _cairo_path_data_create ( cairo_path_fixed_t *  path,
cairo_gstate_t *  gstate 
)

_cairo_path_data_create: : a fixed-point, device-space path to be converted and copied : the current graphics state

Creates a user-space cairo_path_t copy of the given device-space . The parameter provides the inverse CTM for the conversion.

Return value: the new copy of the path. If there is insufficient memory a pointer to a special static cairo_path_nil will be returned instead with status==CAIRO_STATUS_NO_MEMORY and data==NULL.

Definition at line 408 of file cairo-path-data.c.

Here is the call graph for this function:

Here is the caller graph for this function:

cairo_private cairo_path_t* _cairo_path_data_create_flat ( cairo_path_fixed_t *  path,
cairo_gstate_t *  gstate 
)

_cairo_path_data_create_flat: : a fixed-point, device-space path to be flattened, converted and copied : the current graphics state

Creates a flattened, user-space cairo_path_t copy of the given device-space . The parameter provide the inverse CTM for the conversion, as well as the tolerance value to control the accuracy of the flattening.

Return value: the flattened copy of the path. If there is insufficient memory a pointer to a special static cairo_path_nil will be returned instead with status==CAIRO_STATUS_NO_MEMORY and data==NULL.

Definition at line 430 of file cairo-path-data.c.

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 40 of file cairo-path-data.c.