fo-doc-commands

fo-doc-commands —

Synopsis




void        fo_doc_begin_page               (FoDoc *fo_doc,
                                             gdouble width,
                                             gdouble height,
                                             GError **error);
void        fo_doc_end_page                 (FoDoc *fo_doc);
FoDatatype* fo_doc_get_fill_color           (FoDoc *fo_doc);
void        fo_doc_set_fill_color           (FoDoc *fo_doc,
                                             FoDatatype *color);
FoDatatype* fo_doc_get_stroke_color         (FoDoc *fo_doc);
void        fo_doc_set_stroke_color         (FoDoc *fo_doc,
                                             FoDatatype *color);
FoDocLineCap fo_doc_get_line_cap            (FoDoc *fo_doc);
void        fo_doc_set_line_cap             (FoDoc *fo_doc,
                                             FoDocLineCap line_cap);
FoDocLineJoin fo_doc_get_line_join          (FoDoc *fo_doc);
void        fo_doc_set_line_join            (FoDoc *fo_doc,
                                             FoDocLineJoin line_join);
gdouble     fo_doc_get_line_width           (FoDoc *fo_doc);
void        fo_doc_set_line_width           (FoDoc *fo_doc,
                                             gdouble line_width);
void        fo_doc_set_dash                 (FoDoc *fo_doc,
                                             gdouble b,
                                             gdouble w);
void        fo_doc_translate                (FoDoc *fo_doc,
                                             gdouble x,
                                             gdouble y);
void        fo_doc_clip                     (FoDoc *fo_doc);
void        fo_doc_save                     (FoDoc *fo_doc);
void        fo_doc_restore                  (FoDoc *fo_doc);
void        fo_doc_line_to                  (FoDoc *fo_doc,
                                             gdouble x,
                                             gdouble y);
void        fo_doc_move_to                  (FoDoc *fo_doc,
                                             gdouble x,
                                             gdouble y);
void        fo_doc_line_stroked             (FoDoc *fo_doc,
                                             gdouble x0,
                                             gdouble y0,
                                             gdouble x1,
                                             gdouble y1);
void        fo_doc_rect_stroked             (FoDoc *fo_doc,
                                             gdouble x,
                                             gdouble y,
                                             gdouble width,
                                             gdouble height);
void        fo_doc_rect_filled              (FoDoc *fo_doc,
                                             gdouble x,
                                             gdouble y,
                                             gdouble width,
                                             gdouble height);
void        fo_doc_fill                     (FoDoc *fo_doc);
void        fo_doc_stroke                   (FoDoc *fo_doc);
void        fo_doc_fill_stroke              (FoDoc *fo_doc);
void        fo_doc_place_image              (FoDoc *fo_doc,
                                             FoImage *fo_image,
                                             gdouble x,
                                             gdouble y,
                                             gdouble xscale,
                                             gdouble yscale);
FoFontDesc* fo_doc_get_font_desc            (FoDoc *fo_doc);
void        fo_doc_render_layout_lines      (FoDoc *fo_doc,
                                             FoArea *area_layout,
                                             gdouble x,
                                             gdouble y);
void        fo_doc_render_layout            (FoDoc *fo_doc,
                                             FoArea *area_layout,
                                             gdouble x,
                                             gdouble y);

Description

Details

fo_doc_begin_page ()

void        fo_doc_begin_page               (FoDoc *fo_doc,
                                             gdouble width,
                                             gdouble height,
                                             GError **error);

Add a new page to fo_doc.

This must always be paired with a matching fo_doc_end_page call.

fo_doc : FoDoc.
width : Width of the new page.
height : Height of the new page.
error : Indication of any error that occurred.

fo_doc_end_page ()

void        fo_doc_end_page                 (FoDoc *fo_doc);

Finish the current page of fo_doc.

fo_doc : FoDoc.

fo_doc_get_fill_color ()

FoDatatype* fo_doc_get_fill_color           (FoDoc *fo_doc);

Get the current fill color of fo_doc.

fo_doc : FoDoc.
Returns : FoDatatype for the current fill color.

fo_doc_set_fill_color ()

void        fo_doc_set_fill_color           (FoDoc *fo_doc,
                                             FoDatatype *color);

Set the fill color of fo_doc to color.

fo_doc : FoDoc.
color : FoDatatype for new fill color.

fo_doc_get_stroke_color ()

FoDatatype* fo_doc_get_stroke_color         (FoDoc *fo_doc);

Get the current stroke color of fo_doc.

fo_doc : FoDoc.
Returns : FoDatatype for the current stroke color.

fo_doc_set_stroke_color ()

void        fo_doc_set_stroke_color         (FoDoc *fo_doc,
                                             FoDatatype *color);

Set the stroke color of fo_doc to color.

fo_doc : FoDoc.
color : FoDatatype for new stroke color.

fo_doc_get_line_cap ()

FoDocLineCap fo_doc_get_line_cap            (FoDoc *fo_doc);

Get the current "linecap" parameter value of fo_doc.

fo_doc : FoDoc.
Returns : Current "linecap" parameter value.

fo_doc_set_line_cap ()

void        fo_doc_set_line_cap             (FoDoc *fo_doc,
                                             FoDocLineCap line_cap);

Set the "linecap" parameter value of fo_doc.

fo_doc : FoDoc.
line_cap : New "linecap" parameter value.

fo_doc_get_line_join ()

FoDocLineJoin fo_doc_get_line_join          (FoDoc *fo_doc);

Get the current "linejoin" parameter value of fo_doc.

fo_doc : FoDoc.
Returns : Current "linejoin" parameter value.

fo_doc_set_line_join ()

void        fo_doc_set_line_join            (FoDoc *fo_doc,
                                             FoDocLineJoin line_join);

Set the "linejoin" parameter value of fo_doc.

fo_doc : FoDoc.
line_join : New "linejoin" parameter value.

fo_doc_get_line_width ()

gdouble     fo_doc_get_line_width           (FoDoc *fo_doc);

Get the current line width of fo_doc.

fo_doc : FoDoc.
Returns : Current line width.

fo_doc_set_line_width ()

void        fo_doc_set_line_width           (FoDoc *fo_doc,
                                             gdouble line_width);

Set the line width of fo_doc.

fo_doc : FoDoc.
line_width : New line width value.

fo_doc_set_dash ()

void        fo_doc_set_dash                 (FoDoc *fo_doc,
                                             gdouble b,
                                             gdouble w);

Set the current dash pattern of fo_doc.

The dash pattern is the ratio of b to w.

Set b and w to 0 to produce a solid line.

The dash pattern is set to solid (b = w = 0) at the beginning of each page.

fo_doc : FoDoc.
b : Number of black units.
w : Number of white units.

fo_doc_translate ()

void        fo_doc_translate                (FoDoc *fo_doc,
                                             gdouble x,
                                             gdouble y);

Translate the origin of the coordinate system of fo_doc.

x and y are measured in the old coordinate system.

fo_doc : FoDoc.
x : X-coordinate of the new origin of the coordinate system.
y : Y-coordinate of the new origin of the coordinate system.

fo_doc_clip ()

void        fo_doc_clip                     (FoDoc *fo_doc);

Use the current path of fo_doc as its clipping path.

fo_doc : FoDoc.

fo_doc_save ()

void        fo_doc_save                     (FoDoc *fo_doc);

Save the current graphics state of fo_doc.

fo_doc : FoDoc.

fo_doc_restore ()

void        fo_doc_restore                  (FoDoc *fo_doc);

Restore the most recently saved graphics state of fo_doc.

fo_doc : FoDoc.

fo_doc_line_to ()

void        fo_doc_line_to                  (FoDoc *fo_doc,
                                             gdouble x,
                                             gdouble y);

Draw a line from the current point to another point.

fo_doc : FoDoc.
x : X-coordinate of the new current point.
y : Y-coordinate of the new current point.

fo_doc_move_to ()

void        fo_doc_move_to                  (FoDoc *fo_doc,
                                             gdouble x,
                                             gdouble y);

Set the current point of fo_doc to (x, y).

fo_doc : FoDoc.
x : X-coordinate of the new current point.
y : Y-coordinate of the new current point.

fo_doc_line_stroked ()

void        fo_doc_line_stroked             (FoDoc *fo_doc,
                                             gdouble x0,
                                             gdouble y0,
                                             gdouble x1,
                                             gdouble y1);

Draw a line from (x0,y0) to (x1,y1).

fo_doc : FoDoc.
x0 : X-coordinate of the start of the line.
y0 : Y-coordinate of the start of the line.
x1 : X-coordinate of the end of the line.
y1 : Y-coordinate of the end of the line.

fo_doc_rect_stroked ()

void        fo_doc_rect_stroked             (FoDoc *fo_doc,
                                             gdouble x,
                                             gdouble y,
                                             gdouble width,
                                             gdouble height);

Draw an outline rectangle.

fo_doc : FoDoc.
x : X-coordinate of the lower-left corner of the rectangle.
y : Y-coordinate of the lower-left corner of the rectangle.
width : Width of the rectangle.
height : Height of the rectangle.

fo_doc_rect_filled ()

void        fo_doc_rect_filled              (FoDoc *fo_doc,
                                             gdouble x,
                                             gdouble y,
                                             gdouble width,
                                             gdouble height);

Draw a filled rectangle.

fo_doc : FoDoc.
x : X-coordinate of the lower-left corner of the rectangle.
y : Y-coordinate of the lower-left corner of the rectangle.
width : Width of the rectangle.
height : Height of the rectangle.

fo_doc_fill ()

void        fo_doc_fill                     (FoDoc *fo_doc);

Fill the interior of the path of fo_doc with the current fill color.

fo_doc : FoDoc.

fo_doc_stroke ()

void        fo_doc_stroke                   (FoDoc *fo_doc);

Stroke the path of fo_doc and clear the path.

fo_doc : FoDoc.

fo_doc_fill_stroke ()

void        fo_doc_fill_stroke              (FoDoc *fo_doc);

Fill and stroke the path of fo_doc with the current fill and stroke colors.

fo_doc : FoDoc.

fo_doc_place_image ()

void        fo_doc_place_image              (FoDoc *fo_doc,
                                             FoImage *fo_image,
                                             gdouble x,
                                             gdouble y,
                                             gdouble xscale,
                                             gdouble yscale);

Places fo_image in fo_doc at position given by x and y with image scaled by xscale and yscale.

fo_doc : FoDoc in which to place image
fo_image : FoImage
x : X-offset
y : Y-offset
xscale : Scale to apply to X dimension of image
yscale : Scale to apply to Y dimension of image

fo_doc_get_font_desc ()

FoFontDesc* fo_doc_get_font_desc            (FoDoc *fo_doc);

Get the PangoFontDescription in fo_doc.

fo_doc : FoDoc.
Returns : PangoFontDescription in fo_doc.

fo_doc_render_layout_lines ()

void        fo_doc_render_layout_lines      (FoDoc *fo_doc,
                                             FoArea *area_layout,
                                             gdouble x,
                                             gdouble y);

Renders the lines in area_layout at position (x, y) on current page of fo_doc.

fo_doc : FoDoc for which to render lines.
area_layout : FoArea containing lines.
x : X-offset
y : Y-offset

fo_doc_render_layout ()

void        fo_doc_render_layout            (FoDoc *fo_doc,
                                             FoArea *area_layout,
                                             gdouble x,
                                             gdouble y);

Renders area_layout at position (x, y) on current page of fo_doc.

fo_doc : FoDoc to which to render.
area_layout : FoArea containing lines.
x : X-offset
y : Y-offset