mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-02-15 13:50:32 +01:00
added functions to describe the new backends, added text_extents function
This commit is contained in:
parent
0232902958
commit
f1b56497b1
8 changed files with 295 additions and 1 deletions
|
|
@ -11,6 +11,10 @@
|
|||
<!ENTITY cairo_pop_group SYSTEM "xml/cairo_pop_group.xml">
|
||||
<!ENTITY cairo_set_target_surface SYSTEM "xml/cairo_set_target_surface.xml">
|
||||
<!ENTITY cairo_set_target_image SYSTEM "xml/cairo_set_target_image.xml">
|
||||
<!ENTITY cairo_set_target_ps SYSTEM "xml/cairo_set_target_ps.xml">
|
||||
<!ENTITY cairo_set_target_drawable SYSTEM "xml/cairo_set_target_drawable.xml">
|
||||
<!ENTITY cairo_set_target_xcb SYSTEM "xml/cairo_set_target_xcb.xml">
|
||||
<!ENTITY cairo_set_target_png SYSTEM "xml/cairo_set_target_png.xml">
|
||||
<!ENTITY cairo_set_operator SYSTEM "xml/cairo_set_operator.xml">
|
||||
<!ENTITY cairo_set_rgb_color SYSTEM "xml/cairo_set_rgb_color.xml">
|
||||
<!ENTITY cairo_set_alpha SYSTEM "xml/cairo_set_alpha.xml">
|
||||
|
|
@ -46,6 +50,7 @@
|
|||
<!ENTITY cairo_select_font SYSTEM "xml/cairo_select_font.xml">
|
||||
<!ENTITY cairo_scale_font SYSTEM "xml/cairo_scale_font.xml">
|
||||
<!ENTITY cairo_show_text SYSTEM "xml/cairo_show_text.xml">
|
||||
<!ENTITY cairo_text_extents SYSTEM "xml/cairo_text_extents.xml">
|
||||
<!ENTITY cairo_current_operator SYSTEM "xml/cairo_current_operator.xml">
|
||||
<!ENTITY cairo_current_rgb_color SYSTEM "xml/cairo_current_rgb_color.xml">
|
||||
<!ENTITY cairo_current_alpha SYSTEM "xml/cairo_current_alpha.xml">
|
||||
|
|
@ -85,6 +90,7 @@
|
|||
<!ENTITY cairo_operator_t SYSTEM "xml/cairo_operator_t.xml">
|
||||
<!ENTITY cairo_fill_rule_t SYSTEM "xml/cairo_fill_rule_t.xml">
|
||||
<!ENTITY cairo_line_cap_t SYSTEM "xml/cairo_line_cap_t.xml">
|
||||
<!ENTITY cairo_text_extents_t SYSTEM "xml/cairo_text_extents_t.xml">
|
||||
]>
|
||||
<book lang="en">
|
||||
<title>Cairo: A Vector Graphics Library</title>
|
||||
|
|
@ -102,6 +108,10 @@
|
|||
&cairo_pop_group;
|
||||
&cairo_set_target_surface;
|
||||
&cairo_set_target_image;
|
||||
&cairo_set_target_ps;
|
||||
&cairo_set_target_png;
|
||||
&cairo_set_target_drawable;
|
||||
&cairo_set_target_xcb;
|
||||
&cairo_set_operator;
|
||||
&cairo_set_rgb_color;
|
||||
&cairo_set_alpha;
|
||||
|
|
@ -137,6 +147,7 @@
|
|||
&cairo_select_font;
|
||||
&cairo_scale_font;
|
||||
&cairo_show_text;
|
||||
&cairo_text_extents;
|
||||
&cairo_current_operator;
|
||||
&cairo_current_rgb_color;
|
||||
&cairo_current_alpha;
|
||||
|
|
@ -179,6 +190,7 @@
|
|||
&cairo_operator_t;
|
||||
&cairo_fill_rule_t;
|
||||
&cairo_line_cap_t;
|
||||
&cairo_text_extents_t;
|
||||
</reference>
|
||||
</book>
|
||||
|
||||
|
|
|
|||
45
doc/reference/xml/cairo_set_target_drawable.xml
Normal file
45
doc/reference/xml/cairo_set_target_drawable.xml
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<refentry id="cairo_set_target_drawable">
|
||||
<refmeta>
|
||||
<refentrytitle>cairo_set_target_drawable</refentrytitle>
|
||||
<manvolnum>3</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>cairo_set_target_drawable</refname>
|
||||
<refpurpose>set surface for painting operations </refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv>
|
||||
<programlisting>void cairo_set_target_drawable (<link linkend="cairo_t">cairo_t</link> *cr, Display *dpy, Drawable drawable);</programlisting>
|
||||
<variablelist role="params">
|
||||
<varlistentry>
|
||||
<term><parameter>cr</parameter> :</term>
|
||||
<listitem>
|
||||
<simpara>a <link linkend="cairo_t">cairo_t</link></simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>dpy</parameter> :</term>
|
||||
<listitem>
|
||||
<simpara>X Display</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>drawable</parameter> :</term>
|
||||
<listitem>
|
||||
<simpara>an X onscreen or offscreen drawable</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsynopsisdiv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<para>
|
||||
<indexterm>
|
||||
<primary>functions</primary>
|
||||
<secondary>cairo_set_target_drawable</secondary>
|
||||
</indexterm>
|
||||
<indexterm>
|
||||
<primary/>
|
||||
</indexterm>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
51
doc/reference/xml/cairo_set_target_png.xml
Normal file
51
doc/reference/xml/cairo_set_target_png.xml
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
<refentry id="cairo_set_target_png">
|
||||
<refmeta>
|
||||
<refentrytitle>cairo_set_target_png</refentrytitle>
|
||||
<manvolnum>3</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>cairo_set_target_png</refname>
|
||||
<refpurpose>set surface for painting operations </refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv>
|
||||
<programlisting>void cairo_set_target_png (<link linkend="cairo_t">cairo_t</link> *cr, FILE *file, <link linkend="cairo_format_t">cairo_format_t</link> format, int width, int height);</programlisting>
|
||||
<variablelist role="params">
|
||||
<varlistentry>
|
||||
<term><parameter>cr</parameter> :</term>
|
||||
<listitem>
|
||||
<simpara>a <link linkend="cairo_t">cairo_t</link></simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>FILE</parameter> :</term>
|
||||
<listitem>
|
||||
<simpara>an open, writeable file</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter><link linkend="cairo_format_t">cairo_format_t</link></parameter> :</term>
|
||||
<listitem>
|
||||
<simpara>determines the color-depth of the resulting png image</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>width, height</parameter> :</term>
|
||||
<listitem>
|
||||
<simpara>sets width and height of resulting png image </simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsynopsisdiv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<para>
|
||||
<indexterm>
|
||||
<primary>functions</primary>
|
||||
<secondary>cairo_set_target_png</secondary>
|
||||
</indexterm>
|
||||
<indexterm>
|
||||
<primary/>
|
||||
</indexterm>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
52
doc/reference/xml/cairo_set_target_ps.xml
Normal file
52
doc/reference/xml/cairo_set_target_ps.xml
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
<refentry id="cairo_set_target_ps">
|
||||
<refmeta>
|
||||
<refentrytitle>cairo_set_target_ps</refentrytitle>
|
||||
<manvolnum>3</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>cairo_set_target_ps</refname>
|
||||
<refpurpose>set surface for painting operations </refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv>
|
||||
<programlisting>
|
||||
void cairo_set_target_ps (<link linkend="cairo_t">cairo_t</link> *cr,FILE *file, double width_inches, double height_inches, double x_pixels_per_inch, double y_pixels_per_inch);</programlisting>
|
||||
<variablelist role="params">
|
||||
<varlistentry>
|
||||
<term><parameter>cr</parameter> :</term>
|
||||
<listitem>
|
||||
<simpara>a <link linkend="cairo_t">cairo_t</link></simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>FILE</parameter> :</term>
|
||||
<listitem>
|
||||
<simpara>an open, writeable file</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>width_inches, height_inches</parameter> :</term>
|
||||
<listitem>
|
||||
<simpara>width and height of an output page in inches</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>x_pixels_per_inch, y_pixels_per_inch</parameter> :</term>
|
||||
<listitem>
|
||||
<simpara>Resolution of the postscript file. Right now cairo dumps an entire image on every page, so this parameters define the resolution of the resulting image.</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsynopsisdiv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<para>
|
||||
<indexterm>
|
||||
<primary>functions</primary>
|
||||
<secondary>cairo_set_target_ps</secondary>
|
||||
</indexterm>
|
||||
<indexterm>
|
||||
<primary/>
|
||||
</indexterm>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
@ -35,7 +35,7 @@ void cairo_set_target_surface (<link linkend="cairo_t">cairo_t</link> *cr, <link
|
|||
<indexterm>
|
||||
<primary/>
|
||||
</indexterm>
|
||||
Selects <varname>surfacee</varname> as the surface to draw on. If there already is a surface set, it will be substituted by <varname>surface</varname>. It references <varname>surface</varname>e to ensure that it will be valid at least until another surface was selected or the <link linkend="cairo_t">cairo_t</link> is destroyed.
|
||||
Selects <varname>surface</varname> as the surface to draw on. If there already is a surface set, it will be substituted by <varname>surface</varname>. It references <varname>surface</varname>e to ensure that it will be valid at least until another surface was selected or the <link linkend="cairo_t">cairo_t</link> is destroyed.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
|
|||
58
doc/reference/xml/cairo_set_target_xcb.xml
Normal file
58
doc/reference/xml/cairo_set_target_xcb.xml
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
<refentry id="cairo_set_target_xcb">
|
||||
<refmeta>
|
||||
<refentrytitle>cairo_set_target_xcb</refentrytitle>
|
||||
<manvolnum>3</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>cairo_set_target_xcb</refname>
|
||||
<refpurpose>set surface for painting operations </refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv>
|
||||
<programlisting>void
|
||||
cairo_set_target_xcb (<link linkend="cairo_t">cairo_t</link> *cr, XCBConnection *dpy, DRAWABLE drawable, VISUALTYPE *visual, <link linkend="cairo_format_t">cairo_format_t</link> format);</programlisting>
|
||||
<variablelist role="params">
|
||||
<varlistentry>
|
||||
<term><parameter>cr</parameter> :</term>
|
||||
<listitem>
|
||||
<simpara>a <link linkend="cairo_t">cairo_t</link></simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>dpy</parameter> :</term>
|
||||
<listitem>
|
||||
<simpara>...</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>drawable</parameter> :</term>
|
||||
<listitem>
|
||||
<simpara>an X onscreen or offscreen drawable</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>visual</parameter> :</term>
|
||||
<listitem>
|
||||
<simpara>...</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>format</parameter> :</term>
|
||||
<listitem>
|
||||
<simpara>...</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsynopsisdiv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<para>
|
||||
<indexterm>
|
||||
<primary>functions</primary>
|
||||
<secondary>cairo_set_target_xcb</secondary>
|
||||
</indexterm>
|
||||
<indexterm>
|
||||
<primary/>
|
||||
</indexterm>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
47
doc/reference/xml/cairo_text_extents.xml
Normal file
47
doc/reference/xml/cairo_text_extents.xml
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
|
||||
<refentry id="cairo_text_extents">
|
||||
<refmeta>
|
||||
<refentrytitle>cairo_text_extents</refentrytitle>
|
||||
<manvolnum>3</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>cairo_text_extents</refname>
|
||||
<refpurpose>determine extents of a utf8 string</refpurpose>
|
||||
</refnamediv>
|
||||
<refsynopsisdiv>
|
||||
<programlisting>void cairo_text_extents (<link linkend="cairo_t">cairo_t</link> *ct, const unsigned char *utf8, <link linkend="cairo_text_extents_t">cairo_text_extents_t</link> *extents);</programlisting>
|
||||
<variablelist role="params">
|
||||
<varlistentry>
|
||||
<term><parameter>cr</parameter> :</term>
|
||||
<listitem>
|
||||
<simpara>a <link linkend="cairo_t">cairo_t</link></simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>utf8</parameter> :</term>
|
||||
<listitem>
|
||||
<simpara>utf8 encoded string</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>extents</parameter> :</term>
|
||||
<listitem>
|
||||
<simpara>a <link linkend="cairo_text_extents_t">cairo_text_extents_t</link> structure</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsynopsisdiv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<para>
|
||||
<indexterm>
|
||||
<primary>functions</primary>
|
||||
<secondary>cairo_text_extents</secondary>
|
||||
</indexterm>
|
||||
<indexterm>
|
||||
<primary/>
|
||||
</indexterm>
|
||||
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
29
doc/reference/xml/cairo_text_extents_t.xml
Normal file
29
doc/reference/xml/cairo_text_extents_t.xml
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
|
||||
<refentry id="cairo_text_extents_t">
|
||||
<refmeta>
|
||||
<refentrytitle>cairo_text_extents_t</refentrytitle>
|
||||
<manvolnum>3</manvolnum>
|
||||
</refmeta>
|
||||
<refnamediv>
|
||||
<refname>cairo_text_extents_t</refname>
|
||||
<refpurpose>struct to store extents of a string</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<para><indexterm><primary>types</primary><secondary>cairo_text_extents_t</secondary></indexterm><indexterm><primary/></indexterm>
|
||||
<programlisting>
|
||||
typedef struct {
|
||||
double x_bearing;
|
||||
double y_bearing;
|
||||
double width;
|
||||
double height;
|
||||
double x_advance;
|
||||
double y_advance;
|
||||
} cairo_text_extents_t;
|
||||
</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
XXX. not sure what the status is right know.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
Loading…
Add table
Reference in a new issue