mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-02-03 14:50:30 +01:00
configure.in Makefile.am docs/Makefile.am docs/public/*: Add framework for doing docs via gtk-doc.
src/cairo.[ch] src/cairo-matrix.c: Add some inline docs for arcs and matrices. gtk-doc.m4 acinclude.m4: Check in files from gtk-doc to make the dependency on gtk-doc optional. Add --enable-gtk-doc to the default args.
This commit is contained in:
parent
17ec6f1482
commit
0f5b7d82de
32 changed files with 2782 additions and 3 deletions
14
ChangeLog
14
ChangeLog
|
|
@ -1,3 +1,17 @@
|
|||
2005-01-27 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* configure.in Makefile.am docs/Makefile.am docs/public/*:
|
||||
Add framework for doing docs via gtk-doc.
|
||||
|
||||
* src/cairo.[ch] src/cairo-matrix.c: Add some inline docs
|
||||
for arcs and matrices.
|
||||
|
||||
* gtk-doc.m4 acinclude.m4: Check in files from gtk-doc
|
||||
to make the dependency on gtk-doc optional.
|
||||
|
||||
* autogen.sh (LANG): Add --enable-gtk-doc to the default
|
||||
args.
|
||||
|
||||
2005-01-27 Kristian Høgsberg <krh@redhat.com>
|
||||
|
||||
The overall idea of this rewrite is that we want to pass the
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
SUBDIRS = src test
|
||||
SUBDIRS = src test doc
|
||||
|
||||
EXTRA_DIST = \
|
||||
COPYING \
|
||||
|
|
|
|||
53
acinclude.m4
Normal file
53
acinclude.m4
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
dnl -*- mode: autoconf -*-
|
||||
|
||||
# serial 1
|
||||
|
||||
dnl Usage:
|
||||
dnl GTK_DOC_CHECK([minimum-gtk-doc-version])
|
||||
AC_DEFUN([GTK_DOC_CHECK],
|
||||
[
|
||||
AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
|
||||
AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
|
||||
dnl for overriding the documentation installation directory
|
||||
AC_ARG_WITH(html-dir,
|
||||
AC_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
|
||||
[with_html_dir='${datadir}/gtk-doc/html'])
|
||||
HTML_DIR="$with_html_dir"
|
||||
AC_SUBST(HTML_DIR)
|
||||
|
||||
dnl enable/disable documentation building
|
||||
AC_ARG_ENABLE(gtk-doc,
|
||||
AC_HELP_STRING([--enable-gtk-doc],
|
||||
[use gtk-doc to build documentation [default=no]]),,
|
||||
enable_gtk_doc=no)
|
||||
|
||||
have_gtk_doc=no
|
||||
if test x$enable_gtk_doc = xyes; then
|
||||
if test -z "$PKG_CONFIG"; then
|
||||
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
||||
fi
|
||||
if test "$PKG_CONFIG" != "no" && $PKG_CONFIG --exists gtk-doc; then
|
||||
have_gtk_doc=yes
|
||||
fi
|
||||
|
||||
dnl do we want to do a version check?
|
||||
ifelse([$1],[],,
|
||||
[gtk_doc_min_version=$1
|
||||
if test "$have_gtk_doc" = yes; then
|
||||
AC_MSG_CHECKING([gtk-doc version >= $gtk_doc_min_version])
|
||||
if $PKG_CONFIG --atleast-version $gtk_doc_min_version gtk-doc; then
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
have_gtk_doc=no
|
||||
fi
|
||||
fi
|
||||
])
|
||||
if test "$have_gtk_doc" != yes; then
|
||||
enable_gtk_doc=no
|
||||
fi
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
|
||||
AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL, test -n "$LIBTOOL")
|
||||
])
|
||||
|
|
@ -133,4 +133,4 @@ do_cmd $AUTOMAKE $AUTOMAKE_FLAGS
|
|||
|
||||
do_cmd $AUTOCONF
|
||||
|
||||
do_cmd ./configure --enable-maintainer-mode ${1+"$@"} && echo "Now type \`make' to compile" || exit 1
|
||||
do_cmd ./configure --enable-maintainer-mode --enable-gtk-doc ${1+"$@"} && echo "Now type \`make' to compile" || exit 1
|
||||
|
|
|
|||
|
|
@ -346,6 +346,9 @@ AC_SUBST(CAIRO_CFLAGS)
|
|||
AC_SUBST(CAIRO_LIBS)
|
||||
|
||||
dnl ===========================================================================
|
||||
dnl Check for gtk-doc and docbook
|
||||
|
||||
GTK_DOC_CHECK([1.3])
|
||||
|
||||
AC_OUTPUT([
|
||||
cairo.pc
|
||||
|
|
@ -353,6 +356,8 @@ Makefile
|
|||
src/Makefile
|
||||
src/cairo-features.h
|
||||
test/Makefile
|
||||
doc/Makefile
|
||||
doc/public/Makefile
|
||||
])
|
||||
|
||||
dnl ===========================================================================
|
||||
|
|
|
|||
2
doc/.cvsignore
Normal file
2
doc/.cvsignore
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
Makefile
|
||||
Makefile.in
|
||||
2
doc/Makefile.am
Normal file
2
doc/Makefile.am
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
SUBDIRS=public
|
||||
|
||||
15
doc/public/.cvsignore
Normal file
15
doc/public/.cvsignore
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
*.stamp
|
||||
Makefile
|
||||
Makefile.in
|
||||
cairo-decl-list.txt
|
||||
cairo-decl.txt
|
||||
cairo-undocumented.txt
|
||||
cairo-unused.txt
|
||||
cairo.hierarchy
|
||||
cairo.interfaces
|
||||
cairo.prerequisites
|
||||
cairo.args
|
||||
cairo.signals
|
||||
html
|
||||
xml
|
||||
|
||||
45
doc/public/Makefile.am
Normal file
45
doc/public/Makefile.am
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
## Process this file with automake to create Makefile.in.
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.7
|
||||
|
||||
# The name of the module.
|
||||
DOC_MODULE=cairo
|
||||
|
||||
# The top-level SGML file.
|
||||
DOC_MAIN_SGML_FILE=cairo-docs.xml
|
||||
|
||||
# Extra options to supply to gtkdoc-scan
|
||||
SCAN_OPTIONS=--deprecated-guards="CAIRO_DISABLE_DEPRECATED"
|
||||
|
||||
# The directory containing the source code. Relative to $(srcdir)
|
||||
DOC_SOURCE_DIR=../../src
|
||||
|
||||
# Used for dependencies
|
||||
HFILE_GLOB=$(top_srcdir)/src/*.h
|
||||
CFILE_GLOB=$(top_srcdir)/src/*.c $(top_srcdir)/src/*.h
|
||||
|
||||
# Headers to ignore
|
||||
IGNORE_HFILES= \
|
||||
cairo-features.h \
|
||||
cairoft-private.h \
|
||||
cairoint.h \
|
||||
cairo-wideint.h
|
||||
|
||||
# CFLAGS and LDFLAGS for compiling scan program. Only needed
|
||||
# if $(DOC_MODULE).types is non-empty.
|
||||
INCLUDES =
|
||||
GTKDOC_LIBS =
|
||||
|
||||
# Extra options to supply to gtkdoc-mkdb
|
||||
MKDB_OPTIONS=--sgml-mode --output-format=xml
|
||||
|
||||
# Non-autogenerated SGML files to be included in $(DOC_MAIN_SGML_FILE)
|
||||
content_files =
|
||||
|
||||
# Images to copy into HTML directory
|
||||
HTML_IMAGES =
|
||||
|
||||
# Extra options to supply to gtkdoc-fixref
|
||||
FIXXREF_OPTIONS=
|
||||
|
||||
include $(top_srcdir)/gtk-doc.make
|
||||
30
doc/public/cairo-docs.xml
Normal file
30
doc/public/cairo-docs.xml
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
|
||||
<book lang="en" id="libglade" xmlns:xi="http://www.w3.org/2003/XInclude">
|
||||
<title>Cairo: A Vector Graphics Library</title>
|
||||
<part>
|
||||
<title>Tutorial</title>
|
||||
</part>
|
||||
<part>
|
||||
<title>Reference</title>
|
||||
<xi:include href="xml/cairo.xml"/>
|
||||
<xi:include href="xml/cairo-surface.xml"/>
|
||||
<xi:include href="xml/cairo-pattern.xml"/>
|
||||
<xi:include href="xml/cairo-matrix.xml"/>
|
||||
<xi:include href="xml/cairo-atsui.xml"/>
|
||||
<xi:include href="xml/cairo-ft.xml"/>
|
||||
<xi:include href="xml/cairo-glitz.xml"/>
|
||||
<xi:include href="xml/cairo-pdf.xml"/>
|
||||
<xi:include href="xml/cairo-png.xml"/>
|
||||
<xi:include href="xml/cairo-ps.xml"/>
|
||||
<xi:include href="xml/cairo-quartz.xml"/>
|
||||
<xi:include href="xml/cairo-xcb.xml"/>
|
||||
<xi:include href="xml/cairo-xlib.xml"/>
|
||||
</part>
|
||||
</book>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
0
doc/public/cairo-overrides.txt
Normal file
0
doc/public/cairo-overrides.txt
Normal file
238
doc/public/cairo-sections.txt
Normal file
238
doc/public/cairo-sections.txt
Normal file
|
|
@ -0,0 +1,238 @@
|
|||
<SECTION>
|
||||
<FILE>cairo-atsui</FILE>
|
||||
<TITLE>ATSUI Fonts</TITLE>
|
||||
cairo_atsui_font_create
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>cairo-ft</FILE>
|
||||
<TITLE>FreeType Fonts</TITLE>
|
||||
cairo_ft_font_create
|
||||
cairo_ft_font_create_for_ft_face
|
||||
cairo_ft_font_lock_face
|
||||
cairo_ft_font_unlock_face
|
||||
cairo_ft_font_get_pattern
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>cairo-glitz</FILE>
|
||||
<TITLE>Glitz backend</TITLE>
|
||||
cairo_set_target_glitz
|
||||
cairo_glitz_surface_create
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>cairo-pdf</FILE>
|
||||
<TITLE>PDF Backend</TITLE>
|
||||
cairo_set_target_pdf
|
||||
cairo_pdf_surface_create
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>cairo-png</FILE>
|
||||
<TITLE>PNG Backend</TITLE>
|
||||
cairo_set_target_png
|
||||
cairo_png_surface_create
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>cairo-ps</FILE>
|
||||
<TITLE>PS Backend</TITLE>
|
||||
cairo_set_target_ps
|
||||
cairo_ps_surface_create
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>cairo-quartz</FILE>
|
||||
<TITLE>Quartz Backend</TITLE>
|
||||
cairo_set_target_quartz_context
|
||||
cairo_quartz_surface_create
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>cairo-xcb</FILE>
|
||||
<TITLE>XCB Backend</TITLE>
|
||||
cairo_set_target_xcb
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>cairo-xlib</FILE>
|
||||
<TITLE>XLib Backend</TITLE>
|
||||
cairo_set_target_drawable
|
||||
cairo_xlib_surface_create
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>cairo-surface</FILE>
|
||||
<TITLE>cairo_surface_t</TITLE>
|
||||
cairo_surface_t
|
||||
cairo_surface_create_for_image
|
||||
cairo_surface_create_similar
|
||||
cairo_surface_reference
|
||||
cairo_surface_destroy
|
||||
cairo_surface_set_repeat
|
||||
cairo_surface_set_matrix
|
||||
cairo_surface_get_matrix
|
||||
cairo_surface_set_filter
|
||||
cairo_surface_get_filter
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>cairo-pattern</FILE>
|
||||
<TITLE>cairo_pattern_t</TITLE>
|
||||
cairo_pattern_t
|
||||
cairo_pattern_create_for_surface
|
||||
cairo_pattern_create_linear
|
||||
cairo_pattern_create_radial
|
||||
cairo_pattern_reference
|
||||
cairo_pattern_destroy
|
||||
cairo_pattern_add_color_stop
|
||||
cairo_pattern_set_matrix
|
||||
cairo_pattern_get_matrix
|
||||
cairo_extend_t
|
||||
cairo_pattern_set_extend
|
||||
cairo_pattern_get_extend
|
||||
cairo_pattern_set_filter
|
||||
cairo_pattern_get_filter
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>cairo-matrix</FILE>
|
||||
<TITLE>cairo_matrix_t</TITLE>
|
||||
cairo_matrix_t
|
||||
cairo_matrix_create
|
||||
cairo_matrix_destroy
|
||||
cairo_matrix_copy
|
||||
cairo_matrix_set_identity
|
||||
cairo_matrix_set_affine
|
||||
cairo_matrix_get_affine
|
||||
cairo_matrix_translate
|
||||
cairo_matrix_scale
|
||||
cairo_matrix_rotate
|
||||
cairo_matrix_invert
|
||||
cairo_matrix_multiply
|
||||
cairo_matrix_transform_distance
|
||||
cairo_matrix_transform_point
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>cairo</FILE>
|
||||
<TITLE>cairo_t</TITLE>
|
||||
cairo_t
|
||||
cairo_create
|
||||
cairo_reference
|
||||
cairo_destroy
|
||||
cairo_save
|
||||
cairo_restore
|
||||
cairo_copy
|
||||
cairo_set_target_surface
|
||||
cairo_format_t
|
||||
cairo_set_target_image
|
||||
cairo_operator_t
|
||||
cairo_set_operator
|
||||
cairo_set_rgb_color
|
||||
cairo_set_pattern
|
||||
cairo_set_alpha
|
||||
cairo_set_tolerance
|
||||
cairo_fill_rule_t
|
||||
cairo_set_fill_rule
|
||||
cairo_set_line_width
|
||||
cairo_line_cap_t
|
||||
cairo_set_line_cap
|
||||
cairo_line_join_t
|
||||
cairo_set_line_join
|
||||
cairo_set_dash
|
||||
cairo_set_miter_limit
|
||||
cairo_translate
|
||||
cairo_scale
|
||||
cairo_rotate
|
||||
cairo_concat_matrix
|
||||
cairo_set_matrix
|
||||
cairo_default_matrix
|
||||
cairo_identity_matrix
|
||||
cairo_transform_point
|
||||
cairo_transform_distance
|
||||
cairo_inverse_transform_point
|
||||
cairo_inverse_transform_distance
|
||||
cairo_new_path
|
||||
cairo_move_to
|
||||
cairo_line_to
|
||||
cairo_curve_to
|
||||
cairo_arc
|
||||
cairo_arc_negative
|
||||
cairo_rel_move_to
|
||||
cairo_rel_line_to
|
||||
cairo_rel_curve_to
|
||||
cairo_rectangle
|
||||
cairo_close_path
|
||||
cairo_stroke
|
||||
cairo_fill
|
||||
cairo_copy_page
|
||||
cairo_show_page
|
||||
cairo_in_stroke
|
||||
cairo_in_fill
|
||||
cairo_stroke_extents
|
||||
cairo_fill_extents
|
||||
cairo_init_clip
|
||||
cairo_clip
|
||||
cairo_font_t
|
||||
cairo_glyph_t
|
||||
cairo_text_extents_t
|
||||
cairo_font_extents_t
|
||||
cairo_font_slant_t
|
||||
cairo_font_weight_t
|
||||
cairo_select_font
|
||||
cairo_scale_font
|
||||
cairo_transform_font
|
||||
cairo_show_text
|
||||
cairo_show_glyphs
|
||||
cairo_current_font
|
||||
cairo_current_font_extents
|
||||
cairo_set_font
|
||||
cairo_text_extents
|
||||
cairo_glyph_extents
|
||||
cairo_text_path
|
||||
cairo_glyph_path
|
||||
cairo_font_reference
|
||||
cairo_font_destroy
|
||||
cairo_font_glyph_extents
|
||||
cairo_show_surface
|
||||
cairo_current_operator
|
||||
cairo_current_rgb_color
|
||||
cairo_current_pattern
|
||||
cairo_current_alpha
|
||||
cairo_current_tolerance
|
||||
cairo_current_point
|
||||
cairo_current_fill_rule
|
||||
cairo_current_line_width
|
||||
cairo_current_line_cap
|
||||
cairo_current_line_join
|
||||
cairo_current_miter_limit
|
||||
cairo_current_matrix
|
||||
cairo_current_target_surface
|
||||
cairo_current_path
|
||||
cairo_current_path_flat
|
||||
cairo_status_t
|
||||
cairo_status
|
||||
cairo_status_string
|
||||
cairo_filter_t
|
||||
cairo_image_surface_create
|
||||
cairo_image_surface_create_for_data
|
||||
<SUBSECTION Private>
|
||||
CAIRO_BEGIN_DECLS
|
||||
CAIRO_END_DECLS
|
||||
cairo_get_operator
|
||||
cairo_get_rgb_color
|
||||
cairo_get_alpha
|
||||
cairo_get_tolerance
|
||||
cairo_get_current_point
|
||||
cairo_get_fill_rule
|
||||
cairo_get_line_width
|
||||
cairo_get_line_cap
|
||||
cairo_get_line_join
|
||||
cairo_get_miter_limit
|
||||
cairo_get_matrix
|
||||
cairo_get_target_surface
|
||||
cairo_get_status
|
||||
cairo_get_status_string
|
||||
</SECTION>
|
||||
0
doc/public/cairo.types
Normal file
0
doc/public/cairo.types
Normal file
1
doc/public/tmpl/.cvsignore
Normal file
1
doc/public/tmpl/.cvsignore
Normal file
|
|
@ -0,0 +1 @@
|
|||
cairo-unused.sgml
|
||||
25
doc/public/tmpl/cairo-atsui.sgml
Normal file
25
doc/public/tmpl/cairo-atsui.sgml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<!-- ##### SECTION Title ##### -->
|
||||
ATSUI Fonts
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION cairo_atsui_font_create ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@style:
|
||||
@Returns:
|
||||
|
||||
|
||||
63
doc/public/tmpl/cairo-ft.sgml
Normal file
63
doc/public/tmpl/cairo-ft.sgml
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
<!-- ##### SECTION Title ##### -->
|
||||
FreeType Fonts
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION cairo_ft_font_create ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pattern:
|
||||
@scale:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_ft_font_create_for_ft_face ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@face:
|
||||
@load_flags:
|
||||
@scale:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_ft_font_lock_face ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@ft_font:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_ft_font_unlock_face ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@ft_font:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_ft_font_get_pattern ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@ft_font:
|
||||
@Returns:
|
||||
|
||||
|
||||
34
doc/public/tmpl/cairo-glitz.sgml
Normal file
34
doc/public/tmpl/cairo-glitz.sgml
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<!-- ##### SECTION Title ##### -->
|
||||
Glitz backend
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION cairo_set_target_glitz ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cr:
|
||||
@surface:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_glitz_surface_create ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@surface:
|
||||
@Returns:
|
||||
|
||||
|
||||
193
doc/public/tmpl/cairo-matrix.sgml
Normal file
193
doc/public/tmpl/cairo-matrix.sgml
Normal file
|
|
@ -0,0 +1,193 @@
|
|||
<!-- ##### SECTION Title ##### -->
|
||||
cairo_matrix_t
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
Transformation matrices
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
|
||||
<para><indexterm><primary>types</primary><secondary>cairo_matrix</secondary></indexterm><indexterm><primary/></indexterm>
|
||||
<structname>cairo_matrix_t</structname> is used throughout
|
||||
Cairo to represents between different coordinates spaces.
|
||||
A <structname>cairo_matrix</structname> holds an affine
|
||||
transformation, such as a scale, rotation, or shear, or a
|
||||
combination of those. Mathematically, the effect of an affine
|
||||
transformation on a point (<literal>x</literal>,<literal>y</literal>) is given by:
|
||||
</para>
|
||||
<programlisting>
|
||||
x_new = x * a + y * c + tx;
|
||||
y_new = x * b + y * d + ty;
|
||||
</programlisting>
|
||||
<para>
|
||||
The parameters <literal>a</literal>, <literal>b</literal>,
|
||||
<literal>c</literal>, <literal>d</literal>, <literal>tx</literal>,
|
||||
<literal>ty</literal> can be retrieved with
|
||||
cairo_matrix_get_affine() and set with cairo_matrix_get_affine().
|
||||
</para>
|
||||
<para>
|
||||
The primary use of transformation matrices in Cairo is as the
|
||||
current transformation matrix in a #cairo_t. The current
|
||||
transformation matrix gives the transformation from user space
|
||||
coordinates to device coordinates. See cairo_set_matrix(),
|
||||
cairo_current_matrix().
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### TYPEDEF cairo_matrix_t ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_matrix_create ##### -->
|
||||
<para>
|
||||
>
|
||||
</para>
|
||||
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_matrix_destroy ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@matrix:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_matrix_copy ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@matrix:
|
||||
@other:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_matrix_set_identity ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@matrix:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_matrix_set_affine ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@matrix:
|
||||
@a:
|
||||
@b:
|
||||
@c:
|
||||
@d:
|
||||
@tx:
|
||||
@ty:
|
||||
@Returns:
|
||||
<!-- # Unused Parameters # -->
|
||||
@cr:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_matrix_get_affine ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@matrix:
|
||||
@a:
|
||||
@b:
|
||||
@c:
|
||||
@d:
|
||||
@tx:
|
||||
@ty:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_matrix_translate ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@matrix:
|
||||
@tx:
|
||||
@ty:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_matrix_scale ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@matrix:
|
||||
@sx:
|
||||
@sy:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_matrix_rotate ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@matrix:
|
||||
@radians:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_matrix_invert ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@matrix:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_matrix_multiply ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@result:
|
||||
@a:
|
||||
@b:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_matrix_transform_distance ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@matrix:
|
||||
@dx:
|
||||
@dy:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_matrix_transform_point ##### -->
|
||||
<para>
|
||||
</para>
|
||||
|
||||
@matrix:
|
||||
@x:
|
||||
@y:
|
||||
@Returns:
|
||||
|
||||
<!--
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-parent-document: ("../cairo-docs.xml" "book" "refsect2" "")
|
||||
End:
|
||||
-->
|
||||
|
||||
|
||||
154
doc/public/tmpl/cairo-pattern.sgml
Normal file
154
doc/public/tmpl/cairo-pattern.sgml
Normal file
|
|
@ -0,0 +1,154 @@
|
|||
<!-- ##### SECTION Title ##### -->
|
||||
cairo_pattern_t
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### TYPEDEF cairo_pattern_t ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_pattern_create_for_surface ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@surface:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_pattern_create_linear ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@x0:
|
||||
@y0:
|
||||
@x1:
|
||||
@y1:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_pattern_create_radial ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cx0:
|
||||
@cy0:
|
||||
@radius0:
|
||||
@cx1:
|
||||
@cy1:
|
||||
@radius1:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_pattern_reference ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pattern:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_pattern_destroy ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pattern:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_pattern_add_color_stop ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pattern:
|
||||
@offset:
|
||||
@red:
|
||||
@green:
|
||||
@blue:
|
||||
@alpha:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_pattern_set_matrix ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pattern:
|
||||
@matrix:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_pattern_get_matrix ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pattern:
|
||||
@matrix:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### ENUM cairo_extend_t ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@CAIRO_EXTEND_NONE:
|
||||
@CAIRO_EXTEND_REPEAT:
|
||||
@CAIRO_EXTEND_REFLECT:
|
||||
|
||||
<!-- ##### FUNCTION cairo_pattern_set_extend ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pattern:
|
||||
@extend:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_pattern_get_extend ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pattern:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_pattern_set_filter ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pattern:
|
||||
@filter:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_pattern_get_filter ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@pattern:
|
||||
@Returns:
|
||||
|
||||
|
||||
42
doc/public/tmpl/cairo-pdf.sgml
Normal file
42
doc/public/tmpl/cairo-pdf.sgml
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<!-- ##### SECTION Title ##### -->
|
||||
PDF Backend
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION cairo_set_target_pdf ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cr:
|
||||
@file:
|
||||
@width_inches:
|
||||
@height_inches:
|
||||
@x_pixels_per_inch:
|
||||
@y_pixels_per_inch:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_pdf_surface_create ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@file:
|
||||
@width_inches:
|
||||
@height_inches:
|
||||
@x_pixels_per_inch:
|
||||
@y_pixels_per_inch:
|
||||
@Returns:
|
||||
|
||||
|
||||
40
doc/public/tmpl/cairo-png.sgml
Normal file
40
doc/public/tmpl/cairo-png.sgml
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<!-- ##### SECTION Title ##### -->
|
||||
PNG Backend
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION cairo_set_target_png ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cr:
|
||||
@file:
|
||||
@format:
|
||||
@width:
|
||||
@height:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_png_surface_create ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@file:
|
||||
@format:
|
||||
@width:
|
||||
@height:
|
||||
@Returns:
|
||||
|
||||
|
||||
42
doc/public/tmpl/cairo-ps.sgml
Normal file
42
doc/public/tmpl/cairo-ps.sgml
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<!-- ##### SECTION Title ##### -->
|
||||
PS Backend
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION cairo_set_target_ps ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cr:
|
||||
@file:
|
||||
@width_inches:
|
||||
@height_inches:
|
||||
@x_pixels_per_inch:
|
||||
@y_pixels_per_inch:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_ps_surface_create ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@file:
|
||||
@width_inches:
|
||||
@height_inches:
|
||||
@x_pixels_per_inch:
|
||||
@y_pixels_per_inch:
|
||||
@Returns:
|
||||
|
||||
|
||||
38
doc/public/tmpl/cairo-quartz.sgml
Normal file
38
doc/public/tmpl/cairo-quartz.sgml
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<!-- ##### SECTION Title ##### -->
|
||||
Quartz Backend
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION cairo_set_target_quartz_context ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cr:
|
||||
@context:
|
||||
@width:
|
||||
@height:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_quartz_surface_create ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@context:
|
||||
@width:
|
||||
@height:
|
||||
@Returns:
|
||||
|
||||
|
||||
112
doc/public/tmpl/cairo-surface.sgml
Normal file
112
doc/public/tmpl/cairo-surface.sgml
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
<!-- ##### SECTION Title ##### -->
|
||||
cairo_surface_t
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### TYPEDEF cairo_surface_t ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_surface_create_for_image ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@data:
|
||||
@format:
|
||||
@width:
|
||||
@height:
|
||||
@stride:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_surface_create_similar ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@other:
|
||||
@format:
|
||||
@width:
|
||||
@height:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_surface_reference ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@surface:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_surface_destroy ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@surface:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_surface_set_repeat ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@surface:
|
||||
@repeat:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_surface_set_matrix ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@surface:
|
||||
@matrix:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_surface_get_matrix ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@surface:
|
||||
@matrix:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_surface_set_filter ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@surface:
|
||||
@filter:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_surface_get_filter ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@surface:
|
||||
@Returns:
|
||||
|
||||
|
||||
28
doc/public/tmpl/cairo-xcb.sgml
Normal file
28
doc/public/tmpl/cairo-xcb.sgml
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<!-- ##### SECTION Title ##### -->
|
||||
XCB Backend
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION cairo_set_target_xcb ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cr:
|
||||
@dpy:
|
||||
@drawable:
|
||||
@visual:
|
||||
@format:
|
||||
|
||||
|
||||
39
doc/public/tmpl/cairo-xlib.sgml
Normal file
39
doc/public/tmpl/cairo-xlib.sgml
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<!-- ##### SECTION Title ##### -->
|
||||
XLib Backend
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION cairo_set_target_drawable ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@cr:
|
||||
@dpy:
|
||||
@drawable:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION cairo_xlib_surface_create ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@dpy:
|
||||
@drawable:
|
||||
@visual:
|
||||
@format:
|
||||
@colormap:
|
||||
@Returns:
|
||||
|
||||
|
||||
1012
doc/public/tmpl/cairo.sgml
Normal file
1012
doc/public/tmpl/cairo.sgml
Normal file
File diff suppressed because it is too large
Load diff
157
gtk-doc.make
Normal file
157
gtk-doc.make
Normal file
|
|
@ -0,0 +1,157 @@
|
|||
#
|
||||
# *** NOTE *** this file is checked into CVS for convenience only.
|
||||
# DO NOT EDIT. Rather get changes into upstream gtk-doc and then
|
||||
# update this version from the gtk-doc version.
|
||||
#
|
||||
|
||||
# -*- mode: makefile -*-
|
||||
|
||||
####################################
|
||||
# Everything below here is generic #
|
||||
####################################
|
||||
|
||||
if GTK_DOC_USE_LIBTOOL
|
||||
GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS)
|
||||
GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS)
|
||||
else
|
||||
GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS)
|
||||
GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS)
|
||||
endif
|
||||
|
||||
# We set GPATH here; this gives us semantics for GNU make
|
||||
# which are more like other make's VPATH, when it comes to
|
||||
# whether a source that is a target of one rule is then
|
||||
# searched for in VPATH/GPATH.
|
||||
#
|
||||
GPATH = $(srcdir)
|
||||
|
||||
TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(content_files) \
|
||||
$(HTML_IMAGES) \
|
||||
$(DOC_MAIN_SGML_FILE) \
|
||||
$(DOC_MODULE).types \
|
||||
$(DOC_MODULE)-sections.txt \
|
||||
$(DOC_MODULE)-overrides.txt
|
||||
|
||||
DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
|
||||
$(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
|
||||
|
||||
SCANOBJ_FILES = \
|
||||
$(DOC_MODULE).args \
|
||||
$(DOC_MODULE).hierarchy \
|
||||
$(DOC_MODULE).interfaces \
|
||||
$(DOC_MODULE).prerequisites \
|
||||
$(DOC_MODULE).signals
|
||||
|
||||
CLEANFILES = $(SCANOBJ_FILES) $(DOC_MODULE)-unused.txt $(DOC_STAMPS)
|
||||
|
||||
if ENABLE_GTK_DOC
|
||||
all-local: html-build.stamp
|
||||
|
||||
#### scan ####
|
||||
|
||||
scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
|
||||
@echo '*** Scanning header files ***'
|
||||
@-chmod -R u+w $(srcdir)
|
||||
if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
|
||||
CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
|
||||
else \
|
||||
cd $(srcdir) ; \
|
||||
for i in $(SCANOBJ_FILES) ; do \
|
||||
test -f $$i || touch $$i ; \
|
||||
done \
|
||||
fi
|
||||
cd $(srcdir) && \
|
||||
gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
|
||||
touch scan-build.stamp
|
||||
|
||||
$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
|
||||
@true
|
||||
|
||||
#### templates ####
|
||||
|
||||
tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
|
||||
@echo '*** Rebuilding template files ***'
|
||||
@-chmod -R u+w $(srcdir)
|
||||
cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
|
||||
touch tmpl-build.stamp
|
||||
|
||||
tmpl.stamp: tmpl-build.stamp
|
||||
@true
|
||||
|
||||
#### xml ####
|
||||
|
||||
sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml
|
||||
@echo '*** Building XML ***'
|
||||
@-chmod -R u+w $(srcdir)
|
||||
cd $(srcdir) && \
|
||||
gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml $(MKDB_OPTIONS)
|
||||
touch sgml-build.stamp
|
||||
|
||||
sgml.stamp: sgml-build.stamp
|
||||
@true
|
||||
|
||||
#### html ####
|
||||
|
||||
html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
|
||||
@echo '*** Building HTML ***'
|
||||
@-chmod -R u+w $(srcdir)
|
||||
rm -rf $(srcdir)/html
|
||||
mkdir $(srcdir)/html
|
||||
cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
|
||||
test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
|
||||
@echo '-- Fixing Crossreferences'
|
||||
cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
|
||||
touch html-build.stamp
|
||||
else
|
||||
all-local:
|
||||
endif
|
||||
|
||||
##############
|
||||
|
||||
clean-local:
|
||||
rm -f *~ *.bak
|
||||
rm -rf .libs
|
||||
|
||||
maintainer-clean-local: clean
|
||||
cd $(srcdir) && rm -rf xml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
|
||||
|
||||
install-data-local:
|
||||
installfiles=`echo $(srcdir)/html/*`; \
|
||||
if test "$$installfiles" = '$(srcdir)/html/*'; \
|
||||
then echo '-- Nothing to install' ; \
|
||||
else \
|
||||
$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \
|
||||
for i in $$installfiles; do \
|
||||
echo '-- Installing '$$i ; \
|
||||
$(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
|
||||
done; \
|
||||
echo '-- Installing $(srcdir)/html/index.sgml' ; \
|
||||
$(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) || :; \
|
||||
fi
|
||||
|
||||
uninstall-local:
|
||||
rm -f $(DESTDIR)$(TARGET_DIR)/*
|
||||
|
||||
#
|
||||
# Require gtk-doc when making dist
|
||||
#
|
||||
if ENABLE_GTK_DOC
|
||||
dist-check-gtkdoc:
|
||||
else
|
||||
dist-check-gtkdoc:
|
||||
@echo "*** gtk-doc must be installed and enabled in order to make dist"
|
||||
@false
|
||||
endif
|
||||
|
||||
dist-hook: dist-check-gtkdoc dist-hook-local
|
||||
mkdir $(distdir)/tmpl
|
||||
mkdir $(distdir)/xml
|
||||
mkdir $(distdir)/html
|
||||
-cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
|
||||
-cp $(srcdir)/xml/*.xml $(distdir)/xml
|
||||
-cp $(srcdir)/html/* $(distdir)/html
|
||||
|
||||
.PHONY : dist-hook-local
|
||||
|
|
@ -54,6 +54,14 @@ _cairo_matrix_scalar_multiply (cairo_matrix_t *matrix, double scalar);
|
|||
static void
|
||||
_cairo_matrix_compute_adjoint (cairo_matrix_t *matrix);
|
||||
|
||||
/**
|
||||
* cairo_matrix_create:
|
||||
*
|
||||
* Creates a new identity matrix.
|
||||
*
|
||||
* Return value: a newly created matrix; free with cairo_matrix_destroy(),
|
||||
* or %NULL if memory couldn't be allocated.
|
||||
**/
|
||||
cairo_matrix_t *
|
||||
cairo_matrix_create (void)
|
||||
{
|
||||
|
|
@ -80,6 +88,12 @@ _cairo_matrix_fini (cairo_matrix_t *matrix)
|
|||
/* nothing to do here */
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_matrix_destroy:
|
||||
* @matrix: a #cairo_matrix_t
|
||||
*
|
||||
* Frees a matrix created with cairo_matrix_create.
|
||||
**/
|
||||
void
|
||||
cairo_matrix_destroy (cairo_matrix_t *matrix)
|
||||
{
|
||||
|
|
@ -87,6 +101,15 @@ cairo_matrix_destroy (cairo_matrix_t *matrix)
|
|||
free (matrix);
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_matrix_copy:
|
||||
* @matrix: a #cairo_matrix_t
|
||||
* @other: another #cairo_
|
||||
*
|
||||
* Modifies @matrix to be identical to @other.
|
||||
*
|
||||
* Return value: %CAIRO_STATUS_SUCCESS, always.
|
||||
**/
|
||||
cairo_status_t
|
||||
cairo_matrix_copy (cairo_matrix_t *matrix, const cairo_matrix_t *other)
|
||||
{
|
||||
|
|
@ -96,6 +119,14 @@ cairo_matrix_copy (cairo_matrix_t *matrix, const cairo_matrix_t *other)
|
|||
}
|
||||
slim_hidden_def(cairo_matrix_copy);
|
||||
|
||||
/**
|
||||
* cairo_matrix_set_identity:
|
||||
* @matrix: a #cairo_matrix_t
|
||||
*
|
||||
* Modifies @matrix to be an identity transformation.
|
||||
*
|
||||
* Return value: %CAIRO_STATUS_SUCCESS, always.
|
||||
**/
|
||||
cairo_status_t
|
||||
cairo_matrix_set_identity (cairo_matrix_t *matrix)
|
||||
{
|
||||
|
|
@ -105,6 +136,26 @@ cairo_matrix_set_identity (cairo_matrix_t *matrix)
|
|||
}
|
||||
slim_hidden_def(cairo_matrix_set_identity);
|
||||
|
||||
/**
|
||||
* cairo_matrix_set_affine:
|
||||
* @matrix: a cairo_matrix_t
|
||||
* @a: a component of the affine transformation
|
||||
* @b: b component of the affine transformation
|
||||
* @c: c component of the affine transformation
|
||||
* @d: d component of the affine transformation
|
||||
* @tx: X translation component of the affine transformation
|
||||
* @ty: Y translation component of the affine transformation
|
||||
*
|
||||
* Sets @matrix to be the affine transformation given by
|
||||
* @a, b, @c, @d, @tx, @ty. The transformation is given
|
||||
* by:
|
||||
* <programlisting>
|
||||
* x_new = x * a + y * c + tx;
|
||||
* y_new = x * b + y * d + ty;
|
||||
* </programlisting>
|
||||
*
|
||||
* Return value: %CAIRO_STATUS_SUCCESS, always.
|
||||
**/
|
||||
cairo_status_t
|
||||
cairo_matrix_set_affine (cairo_matrix_t *matrix,
|
||||
double a, double b,
|
||||
|
|
@ -119,6 +170,21 @@ cairo_matrix_set_affine (cairo_matrix_t *matrix,
|
|||
}
|
||||
slim_hidden_def(cairo_matrix_set_affine);
|
||||
|
||||
/**
|
||||
* cairo_matrix_get_affine:
|
||||
* @matrix: a @cairo_matrix_t
|
||||
* @a: location to store a component of affine transformation, or %NULL
|
||||
* @b: location to store b component of affine transformation, or %NULL
|
||||
* @c: location to store c component of affine transformation, or %NULL
|
||||
* @d: location to store d component of affine transformation, or %NULL
|
||||
* @tx: location to store X-translation component of affine transformation, or %NULL
|
||||
* @ty: location to store Y-translation component of affine transformation, or %NULL
|
||||
*
|
||||
* Gets the matrix values for the affine tranformation that @matrix represents.
|
||||
* See cairo_matrix_set_affine().
|
||||
*
|
||||
* Return value: %CAIRO_STATUS_SUCCESS, always.
|
||||
**/
|
||||
cairo_status_t
|
||||
cairo_matrix_get_affine (cairo_matrix_t *matrix,
|
||||
double *a, double *b,
|
||||
|
|
@ -153,6 +219,18 @@ _cairo_matrix_set_translate (cairo_matrix_t *matrix,
|
|||
tx, ty);
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_matrix_translate:
|
||||
* @matrix: a cairo_matrix_t
|
||||
* @tx: amount to rotate in the X direction
|
||||
* @ty: amount to rotate in the Y direction
|
||||
*
|
||||
* Applies a translation by @tx, @ty to the transformation in
|
||||
* @matrix. The new transformation is given by first translating by
|
||||
* @tx, @ty then applying the original transformation
|
||||
*
|
||||
* Return value: %CAIRO_STATUS_SUCCESS, always.
|
||||
**/
|
||||
cairo_status_t
|
||||
cairo_matrix_translate (cairo_matrix_t *matrix, double tx, double ty)
|
||||
{
|
||||
|
|
@ -173,6 +251,18 @@ _cairo_matrix_set_scale (cairo_matrix_t *matrix,
|
|||
0, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_matrix_scale:
|
||||
* @matrix: a #cairo_matrix_t
|
||||
* @sx: Scale factor in the X direction
|
||||
* @sy: Scale factor in the Y direction
|
||||
*
|
||||
* Applies scaling by @tx, @ty to the transformation in
|
||||
* @matrix. The new transformation is given by first scaling by @sx
|
||||
* and @sy then applying the original transformation
|
||||
*
|
||||
* Return value: %CAIRO_STATUS_SUCCESS, always.
|
||||
**/
|
||||
cairo_status_t
|
||||
cairo_matrix_scale (cairo_matrix_t *matrix, double sx, double sy)
|
||||
{
|
||||
|
|
@ -202,6 +292,21 @@ _cairo_matrix_set_rotate (cairo_matrix_t *matrix,
|
|||
0, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_matrix_rotate:
|
||||
* @matrix: a @cairo_matrix_t
|
||||
* @radians: angle of rotation, in radians. Angles are defined
|
||||
* so that an angle of 90 degrees (%M_PI radians) rotates the
|
||||
* positive X axis into the positive Y axis. With the default
|
||||
* Cairo choice of axis orientation, positive rotations are
|
||||
* clockwise.
|
||||
*
|
||||
* Applies rotation by @radians to the transformation in
|
||||
* @matrix. The new transformation is given by first rotating by
|
||||
* @radians then applying the original transformation
|
||||
*
|
||||
* Return value: %CAIRO_STATUS_SUCCESS, always.
|
||||
**/
|
||||
cairo_status_t
|
||||
cairo_matrix_rotate (cairo_matrix_t *matrix, double radians)
|
||||
{
|
||||
|
|
@ -212,6 +317,19 @@ cairo_matrix_rotate (cairo_matrix_t *matrix, double radians)
|
|||
return cairo_matrix_multiply (matrix, &tmp, matrix);
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_matrix_multiply:
|
||||
* @result: a @cairo_matrix_t in which to store the result
|
||||
* @a: a @cairo_matrix_t
|
||||
* @b: a @cairo_matrix_t
|
||||
*
|
||||
* Multiplies the affine transformations in @a and @b together
|
||||
* and stores the result in @result. The resulting transformation
|
||||
* is given by first applying the transformation in @b then
|
||||
* applying the transformation in @a.
|
||||
*
|
||||
* Return value: %CAIRO_STATUS_SUCCESS, always.
|
||||
**/
|
||||
cairo_status_t
|
||||
cairo_matrix_multiply (cairo_matrix_t *result, const cairo_matrix_t *a, const cairo_matrix_t *b)
|
||||
{
|
||||
|
|
@ -238,6 +356,27 @@ cairo_matrix_multiply (cairo_matrix_t *result, const cairo_matrix_t *a, const ca
|
|||
}
|
||||
slim_hidden_def(cairo_matrix_multiply);
|
||||
|
||||
/**
|
||||
* cairo_matrix_transform_distance:
|
||||
* @matrix: a @cairo_matrix_t
|
||||
* @dx: a distance in the X direction. An in/out parameter
|
||||
* @dy: a distance in the Y direction. An in/out parameter
|
||||
*
|
||||
* Transforms the vector (@dx,@dy) by @matrix. Translation is
|
||||
* ignored. In terms of the components of the affine transformation:
|
||||
*
|
||||
* <programlisting>
|
||||
* dx2 = dx1 * a + dy1 * c;
|
||||
* dy2 = dx1 * b + dy1 * d;
|
||||
* </programlisting>
|
||||
*
|
||||
* Affine transformations are position invariant, so the same vector
|
||||
* always transforms to the same vector. If (@x1,@y1) transforms
|
||||
* to (@x2,@y2) then (@x1+@dx1,@y1+@dy1) will transform to
|
||||
* (@x1+@dx2,@y1+@dy2) for all values of @x1 and @x2.
|
||||
*
|
||||
* Return value: %CAIRO_STATUS_SUCCESS, always.
|
||||
**/
|
||||
cairo_status_t
|
||||
cairo_matrix_transform_distance (cairo_matrix_t *matrix, double *dx, double *dy)
|
||||
{
|
||||
|
|
@ -255,6 +394,16 @@ cairo_matrix_transform_distance (cairo_matrix_t *matrix, double *dx, double *dy)
|
|||
}
|
||||
slim_hidden_def(cairo_matrix_transform_distance);
|
||||
|
||||
/**
|
||||
* cairo_matrix_transform_point:
|
||||
* @matrix: a @cairo_matrix_t
|
||||
* @x: X position. An in/out parameter
|
||||
* @y: Y position. An in/out parameter
|
||||
*
|
||||
* Transforms the point (@x, @y) by @matrix.
|
||||
*
|
||||
* Return value: %CAIRO_STATUS_SUCCESS, always.
|
||||
**/
|
||||
cairo_status_t
|
||||
cairo_matrix_transform_point (cairo_matrix_t *matrix, double *x, double *y)
|
||||
{
|
||||
|
|
@ -351,6 +500,19 @@ _cairo_matrix_compute_adjoint (cairo_matrix_t *matrix)
|
|||
c*ty - d*tx, b*tx - a*ty);
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_matrix_invert:
|
||||
* @matrix: a @cairo_matrix_t
|
||||
*
|
||||
* Changes @matrix to be the inverse of it's original value. Not
|
||||
* all transformation matrices have inverses; if the matrix
|
||||
* collapses points together (it is <firstterm>degenerate</firstterm>),
|
||||
* then it has no inverse and this function will fail.
|
||||
*
|
||||
* Returns: If @matrix has an inverse, modifies @matrix to
|
||||
* be the inverse matrix and returns %CAIRO_STATUS_SUCCESS. Otherwise,
|
||||
* returns %CAIRO_STATUS_INVALID_MATRIX.
|
||||
**/
|
||||
cairo_status_t
|
||||
cairo_matrix_invert (cairo_matrix_t *matrix)
|
||||
{
|
||||
|
|
|
|||
47
src/cairo.c
47
src/cairo.c
|
|
@ -569,6 +569,39 @@ cairo_curve_to (cairo_t *cr,
|
|||
CAIRO_CHECK_SANITY (cr);
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_arc:
|
||||
* @cr: a Cairo context
|
||||
* @xc: X position of the center of the arc
|
||||
* @yc: Y position of the center of the arc
|
||||
* @radius: the radius of the arc
|
||||
* @angle1: the start angle, in radians
|
||||
* @angle2: the end angle, in radians
|
||||
*
|
||||
* Adds an arc from @angle1 to @angle2 to the current path. If there
|
||||
* is a current point, that point is connected to the start of the arc
|
||||
* by a straight line segment. Angles are measured in radians with an
|
||||
* angle of 0 along the X axis and an angle of %M_PI radians (90
|
||||
* degrees) along the Y axis, so with the default transformation
|
||||
* matrix, positive angles are clockwise. (To convert from degrees to
|
||||
* radians, use <literal>degrees * (M_PI / 180.)</literal>.) This
|
||||
* function gives the arc in the direction of increasing angle; see
|
||||
* cairo_arc_negative() to get the arc in the direction of decreasing
|
||||
* angle.
|
||||
*
|
||||
* A full arc is drawn as a circle. To make an oval arc, you can scale
|
||||
* the current transformation matrix by different amounts in the X and
|
||||
* Y directions. For example, to draw a full oval in the box given
|
||||
* by @x, @y, @width, @height:
|
||||
|
||||
* <informalexample><programlisting>
|
||||
* cairo_save (cr);
|
||||
* cairo_translate (x + width / 2., y + height / 2.);
|
||||
* cairo_scale (1. / (height / 2.), 1. / (width / 2.));
|
||||
* cairo_arc (cr, 0., 0., 1., 0., 2 * M_PI);
|
||||
* cairo_restore (cr);
|
||||
* </programlisting></informalexample>
|
||||
**/
|
||||
void
|
||||
cairo_arc (cairo_t *cr,
|
||||
double xc, double yc,
|
||||
|
|
@ -586,6 +619,20 @@ cairo_arc (cairo_t *cr,
|
|||
CAIRO_CHECK_SANITY (cr);
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_arc_negative:
|
||||
* @cr: a Cairo context
|
||||
* @xc: X position of the center of the arc
|
||||
* @yc: Y position of the center of the arc
|
||||
* @radius: the radius of the arc
|
||||
* @angle1: the start angle, in radians
|
||||
* @angle2: the end angle, in radians
|
||||
*
|
||||
* Adds an arc from @angle1 to @angle2 to the current path. The
|
||||
* function behaves identically to cairo_arc() except that instead of
|
||||
* giving the arc in the direction of increasing angle, it gives
|
||||
* the arc in the direction of decreasing angle.
|
||||
**/
|
||||
void
|
||||
cairo_arc_negative (cairo_t *cr,
|
||||
double xc, double yc,
|
||||
|
|
|
|||
26
src/cairo.h
26
src/cairo.h
|
|
@ -50,8 +50,23 @@
|
|||
|
||||
CAIRO_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* cairo_t
|
||||
*
|
||||
* A #cairo_t contains the current state of the rendering device,
|
||||
* including coordinates of yet to be drawn shapes.
|
||||
**/
|
||||
typedef struct _cairo cairo_t;
|
||||
|
||||
typedef struct _cairo_surface cairo_surface_t;
|
||||
|
||||
/**
|
||||
* cairo_t
|
||||
*
|
||||
* A <structname>cairo_matrix</structname> holds an affine
|
||||
* transformation, such as a scale, rotation, or shear, or a
|
||||
* combination of those.
|
||||
**/
|
||||
typedef struct _cairo_matrix cairo_matrix_t;
|
||||
typedef struct _cairo_pattern cairo_pattern_t;
|
||||
|
||||
|
|
@ -166,6 +181,15 @@ cairo_set_fill_rule (cairo_t *cr, cairo_fill_rule_t fill_rule);
|
|||
void
|
||||
cairo_set_line_width (cairo_t *cr, double width);
|
||||
|
||||
|
||||
/**
|
||||
* cairo_line_cap_t
|
||||
* @CAIRO_LINE_CAP_BUTT: start(stop) the line exactly at the start(end) point
|
||||
* @CAIRO_LINE_CAP_ROUND: use a round ending, the center of the circle is the end point
|
||||
* @CAIRO_LINE_CAP_SQUARE: use squared ending, the center of the square is the end point
|
||||
*
|
||||
* enumeration for style of line-endings
|
||||
**/
|
||||
typedef enum cairo_line_cap {
|
||||
CAIRO_LINE_CAP_BUTT,
|
||||
CAIRO_LINE_CAP_ROUND,
|
||||
|
|
@ -676,7 +700,7 @@ cairo_status_t
|
|||
cairo_matrix_set_identity (cairo_matrix_t *matrix);
|
||||
|
||||
cairo_status_t
|
||||
cairo_matrix_set_affine (cairo_matrix_t *cr,
|
||||
cairo_matrix_set_affine (cairo_matrix_t *matrix,
|
||||
double a, double b,
|
||||
double c, double d,
|
||||
double tx, double ty);
|
||||
|
|
|
|||
|
|
@ -54,6 +54,14 @@ _cairo_matrix_scalar_multiply (cairo_matrix_t *matrix, double scalar);
|
|||
static void
|
||||
_cairo_matrix_compute_adjoint (cairo_matrix_t *matrix);
|
||||
|
||||
/**
|
||||
* cairo_matrix_create:
|
||||
*
|
||||
* Creates a new identity matrix.
|
||||
*
|
||||
* Return value: a newly created matrix; free with cairo_matrix_destroy(),
|
||||
* or %NULL if memory couldn't be allocated.
|
||||
**/
|
||||
cairo_matrix_t *
|
||||
cairo_matrix_create (void)
|
||||
{
|
||||
|
|
@ -80,6 +88,12 @@ _cairo_matrix_fini (cairo_matrix_t *matrix)
|
|||
/* nothing to do here */
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_matrix_destroy:
|
||||
* @matrix: a #cairo_matrix_t
|
||||
*
|
||||
* Frees a matrix created with cairo_matrix_create.
|
||||
**/
|
||||
void
|
||||
cairo_matrix_destroy (cairo_matrix_t *matrix)
|
||||
{
|
||||
|
|
@ -87,6 +101,15 @@ cairo_matrix_destroy (cairo_matrix_t *matrix)
|
|||
free (matrix);
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_matrix_copy:
|
||||
* @matrix: a #cairo_matrix_t
|
||||
* @other: another #cairo_
|
||||
*
|
||||
* Modifies @matrix to be identical to @other.
|
||||
*
|
||||
* Return value: %CAIRO_STATUS_SUCCESS, always.
|
||||
**/
|
||||
cairo_status_t
|
||||
cairo_matrix_copy (cairo_matrix_t *matrix, const cairo_matrix_t *other)
|
||||
{
|
||||
|
|
@ -96,6 +119,14 @@ cairo_matrix_copy (cairo_matrix_t *matrix, const cairo_matrix_t *other)
|
|||
}
|
||||
slim_hidden_def(cairo_matrix_copy);
|
||||
|
||||
/**
|
||||
* cairo_matrix_set_identity:
|
||||
* @matrix: a #cairo_matrix_t
|
||||
*
|
||||
* Modifies @matrix to be an identity transformation.
|
||||
*
|
||||
* Return value: %CAIRO_STATUS_SUCCESS, always.
|
||||
**/
|
||||
cairo_status_t
|
||||
cairo_matrix_set_identity (cairo_matrix_t *matrix)
|
||||
{
|
||||
|
|
@ -105,6 +136,26 @@ cairo_matrix_set_identity (cairo_matrix_t *matrix)
|
|||
}
|
||||
slim_hidden_def(cairo_matrix_set_identity);
|
||||
|
||||
/**
|
||||
* cairo_matrix_set_affine:
|
||||
* @matrix: a cairo_matrix_t
|
||||
* @a: a component of the affine transformation
|
||||
* @b: b component of the affine transformation
|
||||
* @c: c component of the affine transformation
|
||||
* @d: d component of the affine transformation
|
||||
* @tx: X translation component of the affine transformation
|
||||
* @ty: Y translation component of the affine transformation
|
||||
*
|
||||
* Sets @matrix to be the affine transformation given by
|
||||
* @a, b, @c, @d, @tx, @ty. The transformation is given
|
||||
* by:
|
||||
* <programlisting>
|
||||
* x_new = x * a + y * c + tx;
|
||||
* y_new = x * b + y * d + ty;
|
||||
* </programlisting>
|
||||
*
|
||||
* Return value: %CAIRO_STATUS_SUCCESS, always.
|
||||
**/
|
||||
cairo_status_t
|
||||
cairo_matrix_set_affine (cairo_matrix_t *matrix,
|
||||
double a, double b,
|
||||
|
|
@ -119,6 +170,21 @@ cairo_matrix_set_affine (cairo_matrix_t *matrix,
|
|||
}
|
||||
slim_hidden_def(cairo_matrix_set_affine);
|
||||
|
||||
/**
|
||||
* cairo_matrix_get_affine:
|
||||
* @matrix: a @cairo_matrix_t
|
||||
* @a: location to store a component of affine transformation, or %NULL
|
||||
* @b: location to store b component of affine transformation, or %NULL
|
||||
* @c: location to store c component of affine transformation, or %NULL
|
||||
* @d: location to store d component of affine transformation, or %NULL
|
||||
* @tx: location to store X-translation component of affine transformation, or %NULL
|
||||
* @ty: location to store Y-translation component of affine transformation, or %NULL
|
||||
*
|
||||
* Gets the matrix values for the affine tranformation that @matrix represents.
|
||||
* See cairo_matrix_set_affine().
|
||||
*
|
||||
* Return value: %CAIRO_STATUS_SUCCESS, always.
|
||||
**/
|
||||
cairo_status_t
|
||||
cairo_matrix_get_affine (cairo_matrix_t *matrix,
|
||||
double *a, double *b,
|
||||
|
|
@ -153,6 +219,18 @@ _cairo_matrix_set_translate (cairo_matrix_t *matrix,
|
|||
tx, ty);
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_matrix_translate:
|
||||
* @matrix: a cairo_matrix_t
|
||||
* @tx: amount to rotate in the X direction
|
||||
* @ty: amount to rotate in the Y direction
|
||||
*
|
||||
* Applies a translation by @tx, @ty to the transformation in
|
||||
* @matrix. The new transformation is given by first translating by
|
||||
* @tx, @ty then applying the original transformation
|
||||
*
|
||||
* Return value: %CAIRO_STATUS_SUCCESS, always.
|
||||
**/
|
||||
cairo_status_t
|
||||
cairo_matrix_translate (cairo_matrix_t *matrix, double tx, double ty)
|
||||
{
|
||||
|
|
@ -173,6 +251,18 @@ _cairo_matrix_set_scale (cairo_matrix_t *matrix,
|
|||
0, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_matrix_scale:
|
||||
* @matrix: a #cairo_matrix_t
|
||||
* @sx: Scale factor in the X direction
|
||||
* @sy: Scale factor in the Y direction
|
||||
*
|
||||
* Applies scaling by @tx, @ty to the transformation in
|
||||
* @matrix. The new transformation is given by first scaling by @sx
|
||||
* and @sy then applying the original transformation
|
||||
*
|
||||
* Return value: %CAIRO_STATUS_SUCCESS, always.
|
||||
**/
|
||||
cairo_status_t
|
||||
cairo_matrix_scale (cairo_matrix_t *matrix, double sx, double sy)
|
||||
{
|
||||
|
|
@ -202,6 +292,21 @@ _cairo_matrix_set_rotate (cairo_matrix_t *matrix,
|
|||
0, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_matrix_rotate:
|
||||
* @matrix: a @cairo_matrix_t
|
||||
* @radians: angle of rotation, in radians. Angles are defined
|
||||
* so that an angle of 90 degrees (%M_PI radians) rotates the
|
||||
* positive X axis into the positive Y axis. With the default
|
||||
* Cairo choice of axis orientation, positive rotations are
|
||||
* clockwise.
|
||||
*
|
||||
* Applies rotation by @radians to the transformation in
|
||||
* @matrix. The new transformation is given by first rotating by
|
||||
* @radians then applying the original transformation
|
||||
*
|
||||
* Return value: %CAIRO_STATUS_SUCCESS, always.
|
||||
**/
|
||||
cairo_status_t
|
||||
cairo_matrix_rotate (cairo_matrix_t *matrix, double radians)
|
||||
{
|
||||
|
|
@ -212,6 +317,19 @@ cairo_matrix_rotate (cairo_matrix_t *matrix, double radians)
|
|||
return cairo_matrix_multiply (matrix, &tmp, matrix);
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_matrix_multiply:
|
||||
* @result: a @cairo_matrix_t in which to store the result
|
||||
* @a: a @cairo_matrix_t
|
||||
* @b: a @cairo_matrix_t
|
||||
*
|
||||
* Multiplies the affine transformations in @a and @b together
|
||||
* and stores the result in @result. The resulting transformation
|
||||
* is given by first applying the transformation in @b then
|
||||
* applying the transformation in @a.
|
||||
*
|
||||
* Return value: %CAIRO_STATUS_SUCCESS, always.
|
||||
**/
|
||||
cairo_status_t
|
||||
cairo_matrix_multiply (cairo_matrix_t *result, const cairo_matrix_t *a, const cairo_matrix_t *b)
|
||||
{
|
||||
|
|
@ -238,6 +356,27 @@ cairo_matrix_multiply (cairo_matrix_t *result, const cairo_matrix_t *a, const ca
|
|||
}
|
||||
slim_hidden_def(cairo_matrix_multiply);
|
||||
|
||||
/**
|
||||
* cairo_matrix_transform_distance:
|
||||
* @matrix: a @cairo_matrix_t
|
||||
* @dx: a distance in the X direction. An in/out parameter
|
||||
* @dy: a distance in the Y direction. An in/out parameter
|
||||
*
|
||||
* Transforms the vector (@dx,@dy) by @matrix. Translation is
|
||||
* ignored. In terms of the components of the affine transformation:
|
||||
*
|
||||
* <programlisting>
|
||||
* dx2 = dx1 * a + dy1 * c;
|
||||
* dy2 = dx1 * b + dy1 * d;
|
||||
* </programlisting>
|
||||
*
|
||||
* Affine transformations are position invariant, so the same vector
|
||||
* always transforms to the same vector. If (@x1,@y1) transforms
|
||||
* to (@x2,@y2) then (@x1+@dx1,@y1+@dy1) will transform to
|
||||
* (@x1+@dx2,@y1+@dy2) for all values of @x1 and @x2.
|
||||
*
|
||||
* Return value: %CAIRO_STATUS_SUCCESS, always.
|
||||
**/
|
||||
cairo_status_t
|
||||
cairo_matrix_transform_distance (cairo_matrix_t *matrix, double *dx, double *dy)
|
||||
{
|
||||
|
|
@ -255,6 +394,16 @@ cairo_matrix_transform_distance (cairo_matrix_t *matrix, double *dx, double *dy)
|
|||
}
|
||||
slim_hidden_def(cairo_matrix_transform_distance);
|
||||
|
||||
/**
|
||||
* cairo_matrix_transform_point:
|
||||
* @matrix: a @cairo_matrix_t
|
||||
* @x: X position. An in/out parameter
|
||||
* @y: Y position. An in/out parameter
|
||||
*
|
||||
* Transforms the point (@x, @y) by @matrix.
|
||||
*
|
||||
* Return value: %CAIRO_STATUS_SUCCESS, always.
|
||||
**/
|
||||
cairo_status_t
|
||||
cairo_matrix_transform_point (cairo_matrix_t *matrix, double *x, double *y)
|
||||
{
|
||||
|
|
@ -351,6 +500,19 @@ _cairo_matrix_compute_adjoint (cairo_matrix_t *matrix)
|
|||
c*ty - d*tx, b*tx - a*ty);
|
||||
}
|
||||
|
||||
/**
|
||||
* cairo_matrix_invert:
|
||||
* @matrix: a @cairo_matrix_t
|
||||
*
|
||||
* Changes @matrix to be the inverse of it's original value. Not
|
||||
* all transformation matrices have inverses; if the matrix
|
||||
* collapses points together (it is <firstterm>degenerate</firstterm>),
|
||||
* then it has no inverse and this function will fail.
|
||||
*
|
||||
* Returns: If @matrix has an inverse, modifies @matrix to
|
||||
* be the inverse matrix and returns %CAIRO_STATUS_SUCCESS. Otherwise,
|
||||
* returns %CAIRO_STATUS_INVALID_MATRIX.
|
||||
**/
|
||||
cairo_status_t
|
||||
cairo_matrix_invert (cairo_matrix_t *matrix)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue