[cairo-commit] goocanvas/docs .cvsignore, 1.1, 1.2 Makefile.am, 1.4, 1.5 goocanvas-docs.sgml, 1.7, 1.8 wysiwyg.xml, NONE, 1.1
Damon Chaplin
commit at pdx.freedesktop.org
Thu Mar 27 05:57:00 PDT 2008
Committed by: damon
Update of /cvs/cairo/goocanvas/docs
In directory kemper:/tmp/cvs-serv20894/docs
Modified Files:
.cvsignore Makefile.am goocanvas-docs.sgml
Added Files:
wysiwyg.xml
Log Message:
2008-03-27 Damon Chaplin <damon at gnome.org>
* docs/wysiwyg.xml: new section to document WYSIWYG stuff.
Index: .cvsignore
===================================================================
RCS file: /cvs/cairo/goocanvas/docs/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- .cvsignore 12 Apr 2006 10:42:20 -0000 1.1
+++ .cvsignore 27 Mar 2008 13:00:49 -0000 1.2
@@ -2,6 +2,7 @@
Makefile.in
goocanvas-decl-list.txt
goocanvas-decl.txt
+goocanvas-undeclared.txt
goocanvas-undocumented.txt
goocanvas-unused.txt
goocanvas.args
Index: Makefile.am
===================================================================
RCS file: /cvs/cairo/goocanvas/docs/Makefile.am,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Makefile.am 8 Feb 2007 22:56:45 -0000 1.4
+++ Makefile.am 27 Mar 2008 13:00:49 -0000 1.5
@@ -60,6 +60,7 @@
overview.xml \
simple-canvas.xml \
model-view-canvas.xml \
+ wysiwyg.xml \
creating-items.xml
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
Index: goocanvas-docs.sgml
===================================================================
RCS file: /cvs/cairo/goocanvas/docs/goocanvas-docs.sgml,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- goocanvas-docs.sgml 8 Feb 2007 22:56:45 -0000 1.7
+++ goocanvas-docs.sgml 27 Mar 2008 13:00:49 -0000 1.8
@@ -11,6 +11,7 @@
<xi:include href="xml/overview.xml"/>
<xi:include href="xml/simple-canvas.xml"/>
<xi:include href="xml/model-view-canvas.xml"/>
+ <xi:include href="xml/wysiwyg.xml"/>
<xi:include href="xml/creating-items.xml"/>
</chapter>
--- NEW FILE: wysiwyg.xml ---
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="goocanvas-wysiwyg">
<refmeta>
<refentrytitle>WYSIWYG Printing</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GOOCANVAS Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>WYSIWYG Printing</refname>
<refpurpose>how to use the canvas to create accurate printed output.</refpurpose>
</refnamediv>
<refsect1 id="wysiwyg">
<title>WYSIWYG Printing</title>
<refsect2 id="resolution">
<title>Screen Resolution</title>
<para>
The GooCanvas #GooCanvas:resolution-x and #GooCanvas:resolution-y
properties must be set correctly. They both default to 96dpi, which
corresponds with a typical monitor. To get a more accurate figure you
might be able to use gdk_screen_get_resolution(), but this isn't always
guaranteed to be correct. If accuracy is very important a method should
be provided for the user to calibrate the screen.
</para>
</refsect2>
<refsect2 id="units">
<title>Units</title>
<para>
The GooCanvas #GooCanvas:units property must be set to one of %GTK_UNIT_MM,
%GTK_UNIT_POINTS or %GTK_UNIT_INCH (it defaults to %GTK_UNIT_PIXEL).
All values used within the canvas are assumed to be in the specified
units, including font sizes.
</para>
</refsect2>
<refsect2 id="fonts">
<title>Font Sizes</title>
<para>
Absolute font sizes must be used (to prevent the fonts being mistakenly
scaled by Pango as well as by GooCanvas). To specify absolute font sizes
add "px" after the font size, e.g. instead of "Sans 9" use "Sans 9px".
</para>
<para>
Font sizes must be converted to the units used by the canvas.
For example, if a 9 point "Sans" font is desired but #GooCanvas:units
is set to %GTK_UNIT_MM, then the size must first be converted into
millimeters: (9 / 72) * 25.4 = 3.175mm.
So the font used would be "Sans 3.175px".
</para>
</refsect2>
<refsect2 id="example">
<title>Example Code</title>
<para>
The units-demo application that comes with the GooCanvas source code
demonstrates the use of different units and absolute font sizes.
</para>
</refsect2>
</refsect1>
</refentry>
More information about the cairo-commit
mailing list