[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[dotgnu-pnet-commits] libCrayons ./AUTHORS ./ChangeLog ./Makefile.am ...
From: |
Richard Baumann |
Subject: |
[dotgnu-pnet-commits] libCrayons ./AUTHORS ./ChangeLog ./Makefile.am ... |
Date: |
Mon, 06 Mar 2006 20:05:15 +0000 |
CVSROOT: /cvsroot/dotgnu-pnet
Module name: libCrayons
Branch:
Changes by: Richard Baumann <address@hidden> 06/03/06 20:05:14
Modified files:
. : AUTHORS ChangeLog Makefile.am acinclude.m4
auto_gen.sh configure.ac missing
include : .cvsignore CAffineTransform.h CBitmapSurface.h
CBlend.h CBrush.h CHatchBrush.h CImage.h
CNoThreadMutex.h CPThreadMutex.h CPath.h
CRegion.h CStroker.h CSurface.h CUtils.h
CX11Surface.h Crayons.h CrayonsConfig.h.in
CrayonsInternal.h Makefile.am
samples : Makefile.am
src : .cvsignore CAffineTransform.c CBezier.c
CBitmap.c CBitmapSurface.c CBlend.c CBrush.c
CColorPalette.c CFiller.c CFlattener.c
CGraphics.c CGraphicsPipeline.c CHatchBrush.c
CImage.c CLineBrush.c CMath.c CMatrix.c
CMemory.c CMutex.c CPThreadMutex.c CPath.c
CPathBrush.c CPathInterpreter.c CPen.c
CPointArray.c CPolygon.c CRegion.c
CRegionCloner.c CRegionDisposer.c
CRegionInterpreter.c CRegionRasterizer.c
CRegionStack.c CRegionTransformer.c
CRegionTranslator.c CSolidBrush.c
CStringFormat.c CStroker.c CSurface.c
CTextureBrush.c CTrapezoids.c CUtils.c
CX11Surface.c Makefile.am
Added files:
. : compile
include : CCache.h CFont.h CFontCollection.h CFontFace.h
CFontFamily.h CFontFamilyTable.h CGlyphCache.h
CHashTable.h CTempFileList.h
CUnicodeHashTable.h CrayonsFeatures.h.in
CrayonsSurfaceX11.h
samples : .cvsignore sampleX11.c
src : CCache.c CFont.c CFontCollection.c CFontFace.c
CFontFamily.c CFontFamilyTable.c CGlyphCache.c
CHashTable.c CTempFileList.c
CUnicodeHashTable.c
Removed files:
include : CConfig.h.in
samples : sample1.c
src : CFTFont.c
Log message:
Various fixes and additions (see ChangeLog).
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/AUTHORS.diff?tr1=1.1.1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/ChangeLog.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/Makefile.am.diff?tr1=1.1.1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/acinclude.m4.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/auto_gen.sh.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/compile?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/configure.ac.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/missing.diff?tr1=1.1.1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/.cvsignore.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/CAffineTransform.h.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/CBitmapSurface.h.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/CBlend.h.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/CBrush.h.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/CCache.h?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/CFont.h?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/CFontCollection.h?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/CFontFace.h?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/CFontFamily.h?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/CFontFamilyTable.h?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/CGlyphCache.h?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/CHashTable.h?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/CHatchBrush.h.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/CImage.h.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/CNoThreadMutex.h.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/CPThreadMutex.h.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/CPath.h.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/CRegion.h.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/CStroker.h.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/CSurface.h.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/CTempFileList.h?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/CUnicodeHashTable.h?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/CUtils.h.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/CX11Surface.h.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/Crayons.h.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/CrayonsConfig.h.in.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/CrayonsFeatures.h.in?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/CrayonsInternal.h.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/CrayonsSurfaceX11.h?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/include/Makefile.am.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/samples/.cvsignore?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/samples/Makefile.am.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/samples/sampleX11.c?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/.cvsignore.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CAffineTransform.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CBezier.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CBitmap.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CBitmapSurface.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CBlend.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CBrush.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CCache.c?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CColorPalette.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CFiller.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CFlattener.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CFont.c?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CFontCollection.c?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CFontFace.c?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CFontFamily.c?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CFontFamilyTable.c?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CGlyphCache.c?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CGraphics.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CGraphicsPipeline.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CHashTable.c?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CHatchBrush.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CImage.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CLineBrush.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CMath.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CMatrix.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CMemory.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CMutex.c.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CPThreadMutex.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CPath.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CPathBrush.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CPathInterpreter.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CPen.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CPointArray.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CPolygon.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CRegion.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CRegionCloner.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CRegionDisposer.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CRegionInterpreter.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CRegionRasterizer.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CRegionStack.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CRegionTransformer.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CRegionTranslator.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CSolidBrush.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CStringFormat.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CStroker.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CSurface.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CTempFileList.c?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CTextureBrush.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CTrapezoids.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CUnicodeHashTable.c?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CUtils.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/CX11Surface.c.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/dotgnu-pnet/libCrayons/src/Makefile.am.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
Patches:
Index: libCrayons/AUTHORS
diff -u libCrayons/AUTHORS:1.1.1.1 libCrayons/AUTHORS:1.2
--- libCrayons/AUTHORS:1.1.1.1 Mon Oct 17 18:19:20 2005
+++ libCrayons/AUTHORS Mon Mar 6 20:05:14 2006
@@ -0,0 +1 @@
+Richard Baumann <address@hidden>
Index: libCrayons/ChangeLog
diff -u libCrayons/ChangeLog:1.6 libCrayons/ChangeLog:1.7
--- libCrayons/ChangeLog:1.6 Sun Dec 11 13:08:34 2005
+++ libCrayons/ChangeLog Mon Mar 6 20:05:14 2006
@@ -1,3 +1,99 @@
+2006-03-06 Richard Baumann <address@hidden>
+
+ * src/CBrush.c: fix memory leak in brush destruction
+
+ * src/CPThreadMutex.c: fix memory leak in mutex destruction
+
+ * include/CPThreadMutex.h: fix static mutex initializer
+
+ * src/CRegionStack.c: fix push function
+
+ * src/CRegionRasterizer.c: fix union operator
+
+ * src/CRegion.c: fix region destructor and update to new
+ affine transformation api
+
+ * src/CFlattener.c: fix path flattening code
+
+ * src/CLineBrush.c, src/CPathBrush.c src/CMath.c,
+ src/CMemory.c, src/CMutex.c: fix includes
+
+ * include/Crayons.h, src/CMatrix.c: add matrix destructor
+
+ * include/CAffineTransform.h, src/CAffineTransform.c,
+ src/CMatrix.c: clean up the affine transformation api
+
+ * include/CCache.h, src/CCache.c: add a general purpose
+ cache implementation
+
+ * include/CHashTable.h, src/CHashTable.c: add a general
+ purpose hash table implementation
+
+ * include/CTempFileList.h, src/CTempFileList.c: implement a
+ simple list for managing temporary file clean up
+
+ * include/CFontCollection.h, include/CFontFamily.h,
+ include/CFontFace.h, include/CFont.h, include/CGlyphCache.h,
+ include/CFontFamilyTable.h, include/CUnicodeHashTable.h,
+ include/Crayons.h, src/CFontCollection.c, src/CFontFamily.c,
+ src/CFontFace.c, src/CFont.c, src/CGlyphCache.c,
+ src/CFontFamilyTable.c, src/CUnicodeHashTable.c,
+ src/CGraphics.c: implement font support and basic text
+ measurement and rendering
+
+ * include/Crayons.h, src/CGraphics.c: reference surfaces on
+ graphics context creation, add locking to public functions,
+ use the new surface resolution getters, fix compositing,
+ and implement xbm glyph compositing using the new hatch
+ pattern creation code
+
+ * include/CHatchBrush.h, include/CHatchBrush.c: switch to the
+ new hatch pattern creation code
+
+ * include/CUtils.h, src/CUtils.c: implement new UTF encoding
+ conversions and update existing conversions to the current
+ specification, implement hashing functions and macros,
+ implement portable functions for temporary file creation
+ and file input/output, implement functions for handling
+ endian detection and conversion, add a function to find
+ twin primes, and implement a hatch pattern creation function
+ for use as a general xbm glyph pattern constructor
+
+ * include/Crayons.h, include/CSurface.h, src/CSurface.c: trim
+ the public surface api
+
+ * include/CStroker.h, src/CStroker.c, src/CPath.c: special
+ case curveless path stroking and add additional special
+ casing for thin line stroking
+
+ * include/CImage.h, include/CRegion.h: add declarations for
+ missing methods
+
+ * include/CBitmapSurface.h, include/CSurface.h,
+ include/CX11Surface.h, src/CBitmapSurface.c, src/CSurface.c,
+ src/CX11Surface.c: add resolution getters
+
+ * include/CrayonsInternal.h: add new convenience macros,
+ fix existing macros, and add unary and binary operator and
+ predicate types
+
+ * auto_gen.sh, acinclude.m4, configure.ac, Makefile.am,
+ src/Makefile.am, include/Makefile.am, samples/Makefile.am,
+ include/CrayonsFeatures.h.in, include/Crayons.h,
+ include/CrayonsSurfaceX11.h: update and clean up the build
+ and clean up the installed headers scheme
+
+ * include/CConfig.h.in, samples/sample1.c, src/CFTFont.c:
+ remove unused files
+
+ * src/.cvsignore, samples/.cvsignore, include/.cvsignore:
+ update cvs ignores
+
+ * src/*, include/*: fix the formatting to compensate for the
+ changes from 'SD' to 'C'
+
+ * AUTHORS: add my name
+
2005-12-11 Deryk Robosson <address@hidden>
* doc/, samples/: Addition of directories.
Index: libCrayons/Makefile.am
diff -u libCrayons/Makefile.am:1.1.1.1 libCrayons/Makefile.am:1.2
--- libCrayons/Makefile.am:1.1.1.1 Mon Oct 17 18:19:17 2005
+++ libCrayons/Makefile.am Mon Mar 6 20:05:14 2006
@@ -1,2 +1,4 @@
## Process this file with automake to produce Makefile.in
-SUBDIRS = . include src
+SUBDIRS = . include src samples
+
+EXTRA_DIST = include/CrayonsFeatures.h.in
Index: libCrayons/acinclude.m4
diff -u libCrayons/acinclude.m4:1.2 libCrayons/acinclude.m4:1.3
--- libCrayons/acinclude.m4:1.2 Mon Nov 14 13:26:16 2005
+++ libCrayons/acinclude.m4 Mon Mar 6 20:05:14 2006
@@ -1,31 +1,371 @@
-##
-## Determine the size of types at build time.
-##
-dnl Available from the GNU Autoconf Macro Archive at:
-dnl http://autoconf-archive.cryp.to/ac_compile_check_sizeof.html
-dnl
-AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
-[changequote(<<, >>)dnl
-dnl The name to #define.
-define(<<AC_TYPE_NAME>>, translit(c_sizeof_$1, [a-z *], [A-Z_P]))dnl
-dnl The cache variable name.
-define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
-changequote([, ])dnl
-AC_MSG_CHECKING(size of $1)
-AC_CACHE_VAL(AC_CV_NAME,
-[for ac_size in 4 8 1 2 12 16 $2 ; do # List sizes in rough order of
prevalence.
- AC_TRY_COMPILE([#include "confdefs.h"
-#include <sys/types.h>
-$2
-], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
- if test x$AC_CV_NAME != x ; then break; fi
-done
-])
-if test x$AC_CV_NAME = x ; then
- AC_MSG_ERROR([cannot determine a size for $1])
-fi
-AC_MSG_RESULT($AC_CV_NAME)
-AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
-undefine([AC_TYPE_NAME])dnl
-undefine([AC_CV_NAME])dnl
-])
+dnl
+dnl Determine the size of types on the build target.
+dnl
+dnl $1 - type (e.g. unsigned int)
+dnl
+dnl NOTE: this function defines CRAYONS_SIZEOF_{TYPE} (where
+dnl {TYPE} is equal to $1 with the type name converted
+dnl to upper-case, spaces converted to underscores, and
+dnl asterisks converted to 'P') to the size of the type
+dnl in bytes; in addition, the cache variable
+dnl crayons_cv_sizeof_{type} (where {type} is equal to
+dnl {TYPE}, with all characters in lower-case) is also
+dnl set to the size of the type in bytes
+dnl
+AC_DEFUN(
+ [CRAYONS_COMPILE_CHECK_SIZEOF],
+ [m4_define(
+ [CRAYONS_TYPE_NAME],
+ [m4_translit([crayons_sizeof_$1], [[a-z *]], [[A-Z_P]])])dnl
+ m4_define(
+ [CRAYONS_CV_NAME],
+ [m4_translit([crayons_cv_sizeof_$1], [[ *]], [[_p]])])dnl
+ AC_CACHE_CHECK(
+ [the size of $1],
+ [CRAYONS_CV_NAME],
+ [for crayons_size in 4 8 1 2 16; do
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include "confdefs.h"
+ #include <sys/types.h>],
+ [switch(0) case 0: case (sizeof($1) ==
$crayons_size):;])],
+ [CRAYONS_CV_NAME=$crayons_size])
+ if test x$CRAYONS_CV_NAME != x; then break; fi
+ done])
+ if test x$CRAYONS_CV_NAME = x; then
+ AC_MSG_ERROR([cannot determine the size of $1])
+ fi
+ AC_DEFINE_UNQUOTED(
+ [CRAYONS_TYPE_NAME],
+ [$CRAYONS_CV_NAME],
+ [The size in bytes of $1.])
+ m4_undefine([CRAYONS_TYPE_NAME])dnl
+ m4_undefine([CRAYONS_CV_NAME])])
+
+dnl
+dnl Determine the type for a given size in bytes.
+dnl
+dnl $1 - class of type (e.g. "integer", "floating point")
+dnl $2 - prefix (e.g. "i" for integers)
+dnl $3 - size in bytes
+dnl $4 - prologue for use in AC_LANG_PROGRAM
+dnl $5 - types (e.g. "int" "long" "long long")
+dnl
+dnl NOTE: this function sets crayons_type_{prefix}{size} (where
+dnl {prefix} is equal to $2 and {size} is equal to $3) to
+dnl the type (among those in $5) which is exactly {size}
+dnl bytes in size, using the class of type (i.e. $1) for
+dnl printing checking and error messages
+dnl
+AC_DEFUN(
+ [CRAYONS_CHECK_TYPE_FOR_SIZE],
+ [m4_define(
+ [CRAYONS_TYPE_NAME],
+ [crayons_type_$2$3])dnl
+ m4_define(
+ [CRAYONS_CV_NAME],
+ [crayons_cv_type_$2$3])dnl
+ m4_define(
+ [CRAYONS_CLASS_NAME],
+ [crayons_class_type_$2$3])dnl
+ m4_ifvaln(
+ [$1],
+ [CRAYONS_CLASS_NAME="$1 type"],
+ [CRAYONS_CLASS_NAME="type"])dnl
+ AC_CACHE_CHECK(
+ [the $CRAYONS_CLASS_NAME which is exactly $3 bytes in size],
+ [CRAYONS_CV_NAME],
+ [for crayons_type in $5; do
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [$4],
+ [switch(0) case 0: case
(sizeof($crayons_type) == $3):;])],
+ [CRAYONS_CV_NAME=$crayons_type])
+ if test "x$CRAYONS_CV_NAME" != "x"; then break; fi
+ done])
+ if test "x$CRAYONS_CV_NAME" = "x"; then
+ AC_MSG_ERROR([cannot determine the $CRAYONS_CLASS_NAME which is
exactly $3 bytes in size])
+ fi
+ CRAYONS_TYPE_NAME=$CRAYONS_CV_NAME
+ m4_undefine([CRAYONS_TYPE_NAME])dnl
+ m4_undefine([CRAYONS_CV_NAME])])
+
+dnl
+dnl Determine the integer type for a given size in bytes.
+dnl
+dnl $1 - size in bytes
+dnl
+dnl NOTE: this function sets crayons_type_i{size} (where
+dnl {size} is equal to $1) to the integer type which
+dnl is exactly {size} bytes in size
+dnl
+AC_DEFUN(
+ [CRAYONS_CHECK_INTEGER_FOR_SIZE],
+ [CRAYONS_CHECK_TYPE_FOR_SIZE(
+ [integer],
+ [i],
+ [$1],
+ [],
+ ["char" "short" "int" "long" "long long" "__int8" "__int16"
"__int32" "__int64"])])
+
+dnl
+dnl Make enable/disable checks easier to write.
+dnl
+dnl $1 - feature (e.g. foo for --enable-foo)
+dnl $2 - description (for use in help string)
+dnl $3 - default ('yes' or 'no')
+dnl $4 - action if enabled (optional)
+dnl $5 - action if disabled (optional)
+dnl
+dnl NOTE: this function sets crayons_enable_{feature} (where
+dnl {feature} is equal to $1 with all '-' characters
+dnl converted to '_') to 'yes' or 'no' based on user
+dnl input and the provided default, and handles
+dnl erroneous user input by printing an error message
+dnl and exiting with a non-zero value
+dnl
+AC_DEFUN(
+ [CRAYONS_ARG_ENABLE],
+ [AC_ARG_ENABLE(
+ [$1],
+ [m4_if(
+ [$3],
+ [no],
+ [AS_HELP_STRING(
+ [--enable-$1],
+ [$2 @<:@default=no@:>@])],
+ [AS_HELP_STRING(
+ [--disable-$1],
+ [$2 @<:@default=no@:>@])])],
+ [if test "x${enableval}" = "xyes" || test "x${enableval}" =
"xno"; then
+ [crayons_enable_]m4_bpatsubst([$1], -, _)=${enableval}
+ else
+ AC_MSG_ERROR([invalid value (${enableval}) for
--enable-$1])
+ fi],
+ [[crayons_enable_]m4_bpatsubst([$1], -, _)=$3])
+ m4_ifvaln(
+ [$4],
+ [if test "[$crayons_enable_]m4_bpatsubst([$1], -, _)" == "yes";
then
+ $4
+ fi])dnl
+ m4_ifvaln(
+ [$5],
+ [if test "[$crayons_enable_]m4_bpatsubst([$1], -, _)" == "no";
then
+ $5
+ fi])])
+
+dnl
+dnl Perform actions based on the availability of the const keyword in C.
+dnl
+dnl $1 - action if available (optional)
+dnl $2 - action if not available (optional)
+dnl
+dnl NOTE: this function performs the default AC_C_CONST
+dnl behavior in addition to any provided actions,
+dnl and this function sets the environment variable
+dnl CRAYONS_HAVE_C_CONST to yes or no based on the
+dnl availability of the const keyword in C
+dnl
+AC_DEFUN(
+ [CRAYONS_IF_C_CONST],
+ [AC_REQUIRE([AC_C_CONST])dnl
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include "confdefs.h"],
+ [#ifdef const
+ #error "const is missing"
+ #endif])],
+ [m4_ifvaln([$1], [$1])dnl
+ CRAYONS_HAVE_C_CONST="yes"],
+ [m4_ifvaln([$1], [$1])dnl
+ CRAYONS_HAVE_C_CONST="no"])])
+
+dnl
+dnl Perform actions based on the availability of Xlib.
+dnl
+dnl $1 - action if available (optional)
+dnl $2 - action if not available (optional)
+dnl
+dnl NOTE: this function performs the default AC_PATH_XTRA
+dnl behavior in addition to any provided actions,
+dnl and this function sets the environment variable
+dnl CRAYONS_HAVE_XLIB to yes or no based on the
+dnl availability of Xlib
+dnl
+AC_DEFUN(
+ [CRAYONS_IF_XLIB],
+ [AC_REQUIRE([AC_PATH_XTRA])dnl
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include "confdefs.h"],
+ [#ifdef X_DISPLAY_MISSING
+ #error "X display is missing"
+ #endif])],
+ [m4_ifvaln([$1], [$1])dnl
+ CRAYONS_HAVE_XLIB="yes"],
+ [m4_ifvaln([$2], [$2])dnl
+ CRAYONS_HAVE_XLIB="no"])])
+
+dnl
+dnl Perform actions based on the availability of pthreads.
+dnl
+dnl $1 - action if available (optional)
+dnl $2 - action if not available (optional)
+dnl
+dnl NOTE: this function performs the default AC_CHECK_LIB
+dnl behavior in addition to any provided actions,
+dnl and this function sets the environment variable
+dnl CRAYONS_HAVE_PTHREADS to yes or no based on the
+dnl availability of libpthread
+dnl
+AC_DEFUN(
+ [CRAYONS_IF_PTHREADS],
+ [AC_CHECK_LIB([pthread], [pthread_mutex_init])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include "confdefs.h"],
+ [#ifndef HAVE_LIBPTHREAD
+ #error "pthread library is not available"
+ #endif])],
+ [m4_ifvaln([$1], [$1])dnl
+ CRAYONS_HAVE_PTHREADS="yes"],
+ [m4_ifvaln([$2], [$2])dnl
+ CRAYONS_HAVE_PTHREADS="no"])])
+
+dnl
+dnl Perform actions based on the availability of the math library.
+dnl
+dnl $1 - action if available (optional)
+dnl $2 - action if not available (optional)
+dnl
+dnl NOTE: this function performs the default AC_CHECK_LIB
+dnl behavior in addition to any provided actions,
+dnl and this function sets the environment variable
+dnl CRAYONS_HAVE_MATH to yes or no based on the
+dnl availability of libm
+dnl
+AC_DEFUN(
+ [CRAYONS_IF_MATH],
+ [AC_CHECK_LIB([m], [cos])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include "confdefs.h"],
+ [#ifndef HAVE_LIBM
+ #error "math library is not available"
+ #endif])],
+ [m4_ifvaln([$1], [$1])dnl
+ CRAYONS_HAVE_MATH="yes"],
+ [m4_ifvaln([$2], [$2])dnl
+ CRAYONS_HAVE_MATH="no"])])
+
+dnl
+dnl Perform actions based on the availability of the pixman library.
+dnl
+dnl $1 - action if available (optional)
+dnl $2 - action if not available (optional)
+dnl
+dnl NOTE: this function performs the default AC_CHECK_LIB
+dnl behavior in addition to any provided actions,
+dnl and this function sets the environment variable
+dnl CRAYONS_HAVE_PIXMAN to yes or no based on the
+dnl availability of libpixman
+dnl
+AC_DEFUN(
+ [CRAYONS_IF_PIXMAN],
+ [AC_CHECK_LIB([pixman], [pixman_image_create])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include "confdefs.h"],
+ [#ifndef HAVE_LIBPIXMAN
+ #error "pixman library is not available"
+ #endif])],
+ [m4_ifvaln([$1], [$1])dnl
+ CRAYONS_HAVE_PIXMAN="yes"],
+ [m4_ifvaln([$2], [$2])dnl
+ CRAYONS_HAVE_PIXMAN="no"])])
+
+dnl
+dnl Require a header.
+dnl
+dnl $1 - required header
+dnl
+dnl NOTE: this function calls AC_CHECK_HEADERS on the
+dnl given header before doing anything
+dnl
+AC_DEFUN(
+ [CRAYONS_REQUIRE_HEADER],
+ [AC_CHECK_HEADERS([$1])
+ crayons_require_header_xxx_def=[HAVE_]m4_translit([$1], [[a-z./\]],
[[A-Z___]])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include "confdefs.h"],
+ [#ifndef $crayons_require_header_xxx_def
+ #error "header not available"
+ #endif])],
+ [],
+ [AC_MSG_ERROR([required header ($1) not found.])])])
+
+dnl
+dnl Check a version.
+dnl
+dnl $1 - version (must be in major.minor.micro form)
+dnl $2 - minimum (must be in major.minor.micro form)
+dnl $3 - action if version is at least minimum (optional)
+dnl $4 - action if version is less than minimum (optional)
+dnl
+AC_DEFUN(
+ [CRAYONS_CHECK_VERSION],
+ [crayons_ckver_ok="yes"
+ crayons_ckver_ver="`echo $1 | sed
's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`"
+ crayons_ckver_min="`echo $2 | sed
's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`"
+ if test $crayons_ckver_ver -lt $crayons_ckver_min; then
+ crayons_ckver_ok="no"
+ else
+ if test $crayons_ckver_ver -eq $crayons_ckver_min; then
+ crayons_ckver_ver="`echo $1 | sed
's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`"
+ crayons_ckver_min="`echo $2 | sed
's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`"
+ if test $crayons_ckver_ver -lt $crayons_ckver_min; then
+ crayons_ckver_ok="no"
+ else
+ if test $crayons_ckver_ver -eq
$crayons_ckver_min; then
+ crayons_ckver_ver="`echo $1 | sed
's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`"
+ crayons_ckver_min="`echo $2 | sed
's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`"
+ if test $crayons_ckver_ver -lt
$crayons_ckver_min; then
+ crayons_ckver_ok="no"
+ fi
+ fi
+ fi
+ fi
+ fi
+ m4_ifvaln([$3], [if test $crayons_ckver_ok = yes; then $3; fi])dnl
+ m4_ifvaln([$4], [if test $crayons_ckver_ok = no; then $4; fi])])
+
+dnl
+dnl Check freetype configuration.
+dnl
+dnl $1 - minimum version
+dnl
+dnl NOTE: this function sets FREETYPE_CFLAGS and
+dnl FREETYPE_LIBS as appopriate
+dnl
+AC_DEFUN(
+ [CRAYONS_CHECK_FREETYPE],
+ [AC_ARG_VAR([FREETYPE_CFLAGS], [C compiler flags for FREETYPE,
overriding freetype-config])dnl
+ AC_ARG_VAR([FREETYPE_LIBS], [linker flags for FREETYPE, overriding
freetype-config])dnl
+ AC_ARG_VAR([FREETYPE_CONFIG], [path to freetype-config, overriding the
default search path])dnl
+ AC_PATH_PROG([FREETYPE_CONFIG], [freetype-config])
+ if test "x$FREETYPE_CONFIG" = "x"; then
+ AC_MSG_ERROR([freetype-config not found but freetype is
required.])
+ fi
+ crayons_ckft_ver=`$FREETYPE_CONFIG --version`
+ if test "x$crayons_ckft_ver" = "x"; then
+ AC_MSG_ERROR([freetype-config is broken or missing.])
+ fi
+ CRAYONS_CHECK_VERSION(
+ [$crayons_ckft_ver],
+ [$1],
+ [FREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags`
+ FREETYPE_LIBS=`$FREETYPE_CONFIG --libs`],
+ [AC_MSG_ERROR([installed freetype is too old.])])dnl
+ AC_SUBST([FREETYPE_CFLAGS])
+ AC_SUBST([FREETYPE_LIBS])])
Index: libCrayons/auto_gen.sh
diff -u libCrayons/auto_gen.sh:1.1 libCrayons/auto_gen.sh:1.2
--- libCrayons/auto_gen.sh:1.1 Wed Oct 19 12:19:34 2005
+++ libCrayons/auto_gen.sh Mon Mar 6 20:05:14 2006
@@ -1,8 +1,8 @@
#!/bin/sh
#
-# auto_gen.sh - Make the Makefile.in and configure files.
+# auto_gen.sh - Generate the build files.
#
-# Copyright (C) 2001, 2002 Southern Storm Software, Pty Ltd.
+# Copyright (C) 2006 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,24 +16,56 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-# Run aclocal to update the macros.
-aclocal
+# Set the automake and aclocal binaries to the default.
+AUTOMAKE_BIN=
+ACLOCAL_BIN=
-# Get extra options to use depending upon the automake version.
-AM_VERSION=`automake --version`
-case "$AM_VERSION" in
- automake*1.4*) AM_FLAGS="" ;;
- *) AM_FLAGS="--ignore-deps" ;;
+# Find a suitable version of automake.
+AUTOMAKE_VERSION=`automake --version`
+case "$AUTOMAKE_VERSION" in
+ automake*1.7*) AUTOMAKE_BIN="automake"; ACLOCAL_BIN="aclocal" ;;
+ automake*1.8*) AUTOMAKE_BIN="automake"; ACLOCAL_BIN="aclocal" ;;
+ *)
+ AUTOMAKE_BIN=`which automake-1.7`
+ if test "x$AUTOMAKE_BIN" = "x"; then
+ AUTOMAKE_BIN=`which automake-1.8`
+ if test "x$AUTOMAKE_BIN" = "x"; then
+ echo "error: unable to find a suitable version
automake."
+ exit 1
+ else
+ ACLOCAL_BIN=`which aclocal-1.8`
+ fi
+ else
+ ACLOCAL_BIN=`which aclocal-1.7`
+ fi
+ ;;
esac
-# Run libtoolize if necessary.
+# Ensure we have aclocal.
+if test "x$ACLOCAL_BIN" = "x"; then
+ echo "error: unable to find a suitable version of aclocal."
+ exit 1
+fi
+
+# Print using message.
+echo "Using automake: $AUTOMAKE_BIN"
+echo "Using aclocal: $ACLOCAL_BIN"
+
+# Run aclocal to update the autoconf macros.
+$ACLOCAL_BIN
+
+# Run libtoolize, as needed.
if test ! -f "ltconfig" ; then
libtoolize --copy 2>/dev/null
fi
-# Run automake and autoconf.
-automake --add-missing --copy $AM_FLAGS
+# Run automake.
+$AUTOMAKE_BIN --add-missing --copy --ignore-deps
+
+# Run autoconf.
autoconf
+
+# Exit successfully.
exit 0
Index: libCrayons/configure.ac
diff -u libCrayons/configure.ac:1.3 libCrayons/configure.ac:1.4
--- libCrayons/configure.ac:1.3 Sun Dec 11 08:42:00 2005
+++ libCrayons/configure.ac Mon Mar 6 20:05:14 2006
@@ -1,53 +1,317 @@
-## Process this file with autoconf to produce a configure script.
+dnl Process this file with autoconf to produce a configure script.
+
+dnl
+dnl
+dnl
============================================================================
+dnl Versioning
+dnl
============================================================================
+dnl
+dnl
+
+dnl
+dnl The package version is not the same as the shared library version and
+dnl will be maintained according to the following rules:
+dnl
+dnl major.minor.micro
+dnl
+dnl major:
+dnl The major version number. This will be incremented when
+dnl the maintainer deems it appropriate.
+dnl
+dnl minor:
+dnl The minor version number. This will be incremented when
+dnl the maintainer deems it appropriate.
+dnl
+dnl micro:
+dnl The micro version number. This will be incremented every
+dnl release to an even number, and then again to an odd number
+dnl immediately following every release.
+dnl
+m4_define([CrayonsMajor], [0])
+m4_define([CrayonsMinor], [0])
+m4_define([CrayonsMicro], [1])
+
+dnl
+dnl The shared library version is not the same as the package version and
+dnl must be maintained according to the following rules:
+dnl
+dnl current:revision:age
+dnl
+dnl current:
+dnl The current interface version. This must be incremented
+dnl whenever the public library interface is changed.
+dnl
+dnl revision:
+dnl The revision number of the current interface. This must
+dnl be incremented whenever changes are made which do not
+dnl affect the public library interface, and reset to zero
+dnl whenever changes are made which do affect the public
+dnl library interface (i.e. whenever the current interface
+dnl version is incremented).
+dnl
+dnl age:
+dnl The number of prior interface versions still supported.
+dnl This must be incremented whenever changes are made to the
+dnl public library interface which do not break compatibility
+dnl with the current interface version (i.e. addition of new
+dnl public features), and reset to zero whenever changes are
+dnl made which do break such compatibility (e.g. changing the
+dnl signature of a public function or method). This is in
+dnl addition to the incrementation of the current interface
+dnl version, which is required for either case.
+dnl
+m4_define([CrayonsCur], [1])
+m4_define([CrayonsRev], [0])
+m4_define([CrayonsAge], [0])
+
+dnl
+dnl
+dnl
============================================================================
+dnl Initialization
+dnl
============================================================================
+dnl
+dnl
# Initialize autoconf.
-AC_PREREQ(2.59)
-AC_INIT(Crayons, 0.0.1)
-#AC_CONFIG_HEADERS([include/CrayonsConfig.h:include/CrayonsConfig.h.in])
-AC_CONFIG_SRCDIR(src/CGraphics.c)
+AC_PREREQ([2.57])
+AC_INIT([libCrayons], [CrayonsMajor.CrayonsMinor.CrayonsMicro])
+AC_CONFIG_SRCDIR([src/CGraphics.c])
# Initialize automake.
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(include/CrayonsConfig.h)
+dnl
+dnl
+dnl
============================================================================
+dnl User Requests
+dnl
============================================================================
+dnl
+dnl
+
+# Enable testing, if requested.
+CRAYONS_ARG_ENABLE(
+ [testing],
+ [make internal methods public],
+ [no],
+ [AC_DEFINE(
+ [CTESTING],
+ [1],
+ [Define to 1 to make internal methods public.])],
+ [])
+
+# Disable debugging, if requested.
+CRAYONS_ARG_ENABLE(
+ [debugging],
+ [disable debugging],
+ [yes],
+ [AC_DEFINE(
+ [CDEBUG],
+ [1],
+ [Define to 1 to enable debugging.])],
+ [])
+
+dnl
+dnl
+dnl
============================================================================
+dnl Program Checks
+dnl
============================================================================
+dnl
+dnl
+
# Check for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LIBTOOL
-# Check for libraries.
-AC_CHECK_LIB([m], [cos])
-AC_CHECK_LIB([pixman], [pixman_image_create])
-AC_CHECK_LIB([pthread], [pthread_mutex_init])
-AC_CHECK_LIB([X11], [XOpenDisplay])
+dnl
+dnl
+dnl
============================================================================
+dnl Basic Header Checks
+dnl
============================================================================
+dnl
+dnl
# Check for headers.
AC_HEADER_STDC
-AC_PATH_XTRA
-AC_CHECK_HEADERS([assert.h math.h memory.h stdlib.h string.h strings.h])
-AC_CHECK_HEADERS([pixman.h pthread.h X11/Xlib.h])
+AC_HEADER_TIME
+AC_CHECK_HEADERS([assert.h memory.h stdlib.h string.h strings.h unistd.h])
+AC_CHECK_HEADERS([sys/types.h sys/stat.h errno.h fcntl.h])
+
+dnl
+dnl
+dnl
============================================================================
+dnl Library/Header Checks
+dnl
============================================================================
+dnl
+dnl
+
+# Check for freetype configuration.
+CRAYONS_CHECK_FREETYPE([7.0.1])
+CRAYONS_CFLAGS="$FREETYPE_CFLAGS"
+CRAYONS_LIBS="$FREETYPE_LIBS"
+
+# Check for fontconfig configuration.
+PKG_CHECK_MODULES([FONTCONFIG], [fontconfig >= 2.2.2])
+CRAYONS_CFLAGS="$CRAYONS_CFLAGS $FONTCONFIG_CFLAGS"
+CRAYONS_LIBS="$CRAYONS_LIBS $FONTCONFIG_LIBS"
+
+# Check the availability of the math library.
+CRAYONS_IF_MATH(
+ [CRAYONS_REQUIRE_HEADER([math.h])],
+ [AC_MSG_ERROR([libm not found but the math library is required.])])
+
+# Check the availability of the pixman library.
+CRAYONS_IF_PIXMAN(
+ [CRAYONS_REQUIRE_HEADER([pixman.h])],
+ [AC_MSG_ERROR([libpixman not found but the pixman library is
required.])])
+
+# Check the availability of the pthread library.
+CRAYONS_IF_PTHREADS([CRAYONS_REQUIRE_HEADER([pthread.h])], [])
+
+# Check the availability of Xlib.
+CRAYONS_IF_XLIB(
+ [crayons_x11_surface_define="@%:@define CRAYONS_HAVE_X11_SURFACE 1"
+ CRAYONS_REQUIRE_HEADER([X11/Xlib.h])
+ CRAYONS_CFLAGS="$CRAYONS_CFLAGS $X_CFLAGS"
+ CRAYONS_LDFLAGS="$X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS -lX11"],
+ [crayons_x11_surface_define="/* @%:@undef CRAYONS_HAVE_X11_SURFACE */"])
+
+dnl
+dnl
+dnl
============================================================================
+dnl Compiler Feature Checks
+dnl
============================================================================
+dnl
+dnl
+
+# Check the availability of the const keyword in C.
+CRAYONS_IF_C_CONST(
+ [crayons_const_define="const"],
+ [crayons_const_define=""])
-# Check for compiler characteristics.
-AC_C_CONST
+dnl
+dnl
+dnl
============================================================================
+dnl Library Function Checks
+dnl
============================================================================
+dnl
+dnl
# Check for library functions.
AC_FUNC_MALLOC
AC_FUNC_MEMCMP
AC_FUNC_REALLOC
-AC_CHECK_FUNCS(bcmp bcopy memcmp memcpy memmove memset)
-AC_CHECK_FUNCS(cos sin sqrt erf)
+AC_FUNC_STAT
+AC_CHECK_FUNCS([bcmp bcopy memcmp memcpy memmove memset])
+AC_CHECK_FUNCS([cos sin sqrt erf])
+AC_CHECK_FUNCS([remove unlink stat access mkstemp open write])
+AC_CHECK_FUNCS([gettimeofday getpid])
-# Determine the size of the int and long types on the target machine.
-AC_COMPILE_CHECK_SIZEOF(int)
-AC_COMPILE_CHECK_SIZEOF(long)
-AC_COMPILE_CHECK_SIZEOF(long long)
+dnl
+dnl
+dnl
============================================================================
+dnl Type Checks
+dnl
============================================================================
+dnl
+dnl
-# Make things easier to debug.
-#CFLAGS="-g -W -Wall -O2"
+# Determine the integer types for various sizes on the target machine.
+CRAYONS_CHECK_INTEGER_FOR_SIZE([1])
+CRAYONS_CHECK_INTEGER_FOR_SIZE([2])
+CRAYONS_CHECK_INTEGER_FOR_SIZE([4])
+CRAYONS_CHECK_INTEGER_FOR_SIZE([8])
+
+dnl
+dnl
+dnl
============================================================================
+dnl GCC Warnings
+dnl
============================================================================
+dnl
+dnl
+
+# Turn on warnings if compiling with gcc.
+if test "x$GCC" = "xyes"; then
+ CRAYONS_CFLAGS="$CRAYONS_CFLAGS \
+ -Wall \
+ -Wpointer-arith \
+ -Wstrict-prototypes \
+ -Wmissing-prototypes \
+ -Wmissing-declarations \
+ -Wnested-externs"
+fi
+
+dnl
+dnl
+dnl
============================================================================
+dnl Substitutions
+dnl
============================================================================
+dnl
+dnl
+
+# Shared library version.
+AC_SUBST([CRAYONS_LIBRARY_VERSION], [CrayonsCur:CrayonsRev:CrayonsAge])dnl
+
+# Package version.
+AC_SUBST([crayons_version_major], [CrayonsMajor])dnl
+AC_SUBST([crayons_version_minor], [CrayonsMinor])dnl
+AC_SUBST([crayons_version_micro], [CrayonsMicro])dnl
+
+# Compile and link flags.
+AC_SUBST([CRAYONS_CFLAGS])
+AC_SUBST([CRAYONS_LIBS])
+AC_SUBST([CRAYONS_LDFLAGS])
+
+# Integer types.
+AC_SUBST([crayons_type_i1])
+AC_SUBST([crayons_type_i2])
+AC_SUBST([crayons_type_i4])
+AC_SUBST([crayons_type_i8])
+
+# Define const, as needed.
+AC_SUBST([crayons_const_define])
+
+# Features defines.
+AC_SUBST([crayons_x11_surface_define])
+
+dnl
+dnl
+dnl
============================================================================
+dnl Automake Conditionals
+dnl
============================================================================
+dnl
+dnl
+
+dnl
+dnl NOTE: AM_CONDITIONAL is buggy, so be careful with the
+dnl syntax here (e.g. no quoting the first argument)
+dnl
+
+# Define pthread availability test.
+AM_CONDITIONAL(CRAYONS_PTHREADS_ENABLED, [test "$CRAYONS_HAVE_PTHREADS" =
"yes"])
+
+# Define xlib availability test.
+AM_CONDITIONAL(CRAYONS_X11_ENABLED, [test "$CRAYONS_HAVE_XLIB" = "yes"])
+
+dnl
+dnl
+dnl
============================================================================
+dnl Finalization
+dnl
============================================================================
+dnl
+dnl
+
+dnl
+dnl NOTE: AC_CONFIG_FILES is buggy, so be careful with the
+dnl syntax here (e.g. no quoting the list)
+dnl
# Set output files.
-AC_CONFIG_FILES([Makefile
- include/Makefile
- src/Makefile
- samples/Makefile])
+AC_CONFIG_FILES(
+ Makefile
+ include/Makefile
+ src/Makefile
+ samples/Makefile
+ include/CrayonsFeatures.h)
+
AC_OUTPUT
Index: libCrayons/include/.cvsignore
diff -u libCrayons/include/.cvsignore:1.4 libCrayons/include/.cvsignore:1.5
--- libCrayons/include/.cvsignore:1.4 Mon Oct 17 21:11:18 2005
+++ libCrayons/include/.cvsignore Mon Mar 6 20:05:14 2006
@@ -2,6 +2,6 @@
Makefile.in
CrayonsConfig.h
CrayonsConfig.h.in
-stamp-h
-stamp-h.in
+CrayonsFeatures.h
+stamp-h*
.deps
Index: libCrayons/include/CAffineTransform.h
diff -u libCrayons/include/CAffineTransform.h:1.3
libCrayons/include/CAffineTransform.h:1.4
--- libCrayons/include/CAffineTransform.h:1.3 Mon Nov 14 13:26:16 2005
+++ libCrayons/include/CAffineTransform.h Mon Mar 6 20:05:14 2006
@@ -36,14 +36,12 @@
static const CVectorF CVectorF_Zero = { 0.0f, 0.0f };
-CINTERNAL void
+CINTERNAL CBool
CAffineTransformF_Equals(const CAffineTransformF *_this,
- const CAffineTransformF *other,
- CBool *eq);
-CINTERNAL void
+ const CAffineTransformF *other);
+CINTERNAL CBool
CAffineTransformF_NotEquals(const CAffineTransformF *_this,
- const CAffineTransformF *other,
- CBool *ne);
+ const CAffineTransformF *other);
CINTERNAL void
CAffineTransformF_SetIdentity(CAffineTransformF *_this);
CINTERNAL CStatus
@@ -60,9 +58,8 @@
CFloat m22,
CFloat dx,
CFloat dy);
-CINTERNAL void
-CAffineTransformF_GetDeterminant(const CAffineTransformF *_this,
- CFloat *determinant);
+CINTERNAL CFloat
+CAffineTransformF_GetDeterminant(const CAffineTransformF *_this);
CINTERNAL CStatus
CAffineTransformF_GetInverse(const CAffineTransformF *_this,
CAffineTransformF *inverse);
Index: libCrayons/include/CBitmapSurface.h
diff -u libCrayons/include/CBitmapSurface.h:1.2
libCrayons/include/CBitmapSurface.h:1.3
--- libCrayons/include/CBitmapSurface.h:1.2 Mon Nov 14 13:26:16 2005
+++ libCrayons/include/CBitmapSurface.h Mon Mar 6 20:05:14 2006
@@ -47,7 +47,13 @@
CColor color);
static CStatus
CBitmapSurface_Flush(CSurface *_this,
- CFlushIntention intention);
+ CFlushIntention intention);
+static CStatus
+CBitmapSurface_GetDpiX(CSurface *_this,
+ CFloat *dpiX);
+static CStatus
+CBitmapSurface_GetDpiY(CSurface *_this,
+ CFloat *dpiY);
static void
CBitmapSurface_Finalize(CSurface *_this);
@@ -57,6 +63,8 @@
CBitmapSurface_Composite,
CBitmapSurface_Clear,
CBitmapSurface_Flush,
+ CBitmapSurface_GetDpiX,
+ CBitmapSurface_GetDpiY,
CBitmapSurface_Finalize,
"sentinel"
};
Index: libCrayons/include/CBlend.h
diff -u libCrayons/include/CBlend.h:1.2 libCrayons/include/CBlend.h:1.3
--- libCrayons/include/CBlend.h:1.2 Mon Nov 14 13:26:16 2005
+++ libCrayons/include/CBlend.h Mon Mar 6 20:05:14 2006
@@ -37,18 +37,18 @@
CINTERNAL CStatus
CBlend_Initialize(CBlend *_this,
- CUInt32 count);
+ CUInt32 count);
CINTERNAL CStatus
CBlend_Copy(CBlend *_this,
- CBlend *copy);
+ CBlend *copy);
CINTERNAL void
CBlend_SetTriangularShape(CBlend *_this,
CFloat focus,
CFloat scale);
CINTERNAL void
-CDBlend_SetSigmaBellShape(CBlend *_this,
- CFloat focus,
- CFloat scale);
+CBlend_SetSigmaBellShape(CBlend *_this,
+ CFloat focus,
+ CFloat scale);
CINTERNAL void
CBlend_Finalize(CBlend *_this);
CINTERNAL CStatus
Index: libCrayons/include/CBrush.h
diff -u libCrayons/include/CBrush.h:1.2 libCrayons/include/CBrush.h:1.3
--- libCrayons/include/CBrush.h:1.2 Mon Nov 14 13:26:16 2005
+++ libCrayons/include/CBrush.h Mon Mar 6 20:05:14 2006
@@ -63,7 +63,7 @@
/*\
|*| Create a pattern for this brush.
|*|
- |*| _this - this brush
+ |*| _this - this brush
|*| pattern - pointer to pattern
|*|
|*| Returns status code.
Index: libCrayons/include/CHatchBrush.h
diff -u libCrayons/include/CHatchBrush.h:1.2
libCrayons/include/CHatchBrush.h:1.3
--- libCrayons/include/CHatchBrush.h:1.2 Mon Nov 14 13:26:16 2005
+++ libCrayons/include/CHatchBrush.h Mon Mar 6 20:05:14 2006
@@ -38,76 +38,9 @@
#define CHatchStyle_IsValid(style) \
(((style) >= CHatchStyle_Min) && ((style) <= CHatchStyle_Max))
-#define CHatchBrush_DataFormat PIXMAN_FORMAT_NAME_ARGB32
#define CHatchBrush_StyleWidth 8
#define CHatchBrush_StyleHeight 8
-#define CHatchBrush_StylesLength (sizeof(CHatchBrush_HatchInfo) / 8)
-
-#define CHatchBrush_StyleToData_SetRow(src, dst, fg, bg) \
- do {
\
- /* get the current source row */
\
- const CByte row = *(src);
\
-
\
- /* set the current data row */
\
- *(dst)++ = ((row & 0x80) ? (fg) : (bg));
\
- *(dst)++ = ((row & 0x40) ? (fg) : (bg));
\
- *(dst)++ = ((row & 0x20) ? (fg) : (bg));
\
- *(dst)++ = ((row & 0x10) ? (fg) : (bg));
\
- *(dst)++ = ((row & 0x08) ? (fg) : (bg));
\
- *(dst)++ = ((row & 0x04) ? (fg) : (bg));
\
- *(dst)++ = ((row & 0x02) ? (fg) : (bg));
\
- *(dst)++ = ((row & 0x01) ? (fg) : (bg));
\
-
\
- /* move to the next row */
\
- ++src;
\
- } while(0)
-
-#define CHatchBrush_StyleToData(style, data, stride, foreground, background) \
- do {
\
- /* declarations */
\
- const CByte *src;
\
- CColor *dst;
\
- CColor fg;
\
- CColor bg;
\
-
\
- /* get the source pixel row pointer */
\
- src = CHatchBrush_Styles[(style)];
\
-
\
- /* NOTE: pixman's format is native endian */
\
-
\
- /* get the destination pixel pointer */
\
- dst = ((CColor *)(data));
\
-
\
- /* get the foreground color */
\
- fg = (foreground);
\
-
\
- /* get the background color */
\
- bg = (background);
\
-
\
- /* set the data, row by row */
\
- CHatchBrush_StyleToData_SetRow(src, dst, fg, bg);
\
- (data) += (stride);
\
- dst = ((CColor *)(data));
\
- CHatchBrush_StyleToData_SetRow(src, dst, fg, bg);
\
- (data) += (stride);
\
- dst = ((CColor *)(data));
\
- CHatchBrush_StyleToData_SetRow(src, dst, fg, bg);
\
- (data) += (stride);
\
- dst = ((CColor *)(data));
\
- CHatchBrush_StyleToData_SetRow(src, dst, fg, bg);
\
- (data) += (stride);
\
- dst = ((CColor *)(data));
\
- CHatchBrush_StyleToData_SetRow(src, dst, fg, bg);
\
- (data) += (stride);
\
- dst = ((CColor *)(data));
\
- CHatchBrush_StyleToData_SetRow(src, dst, fg, bg);
\
- (data) += (stride);
\
- dst = ((CColor *)(data));
\
- CHatchBrush_StyleToData_SetRow(src, dst, fg, bg);
\
- (data) += (stride);
\
- dst = ((CColor *)(data));
\
- CHatchBrush_StyleToData_SetRow(src, dst, fg, bg);
\
- } while(0)
+#define CHatchBrush_StylesLength (sizeof(CHatchBrush_Styles) / 8)
static const CByte CHatchBrush_Styles[][8] =
{
Index: libCrayons/include/CImage.h
diff -u libCrayons/include/CImage.h:1.2 libCrayons/include/CImage.h:1.3
--- libCrayons/include/CImage.h:1.2 Mon Nov 14 13:26:16 2005
+++ libCrayons/include/CImage.h Mon Mar 6 20:05:14 2006
@@ -59,6 +59,59 @@
CINTERNAL CImage *
CImage_Reference(CImage *_this);
+/*\
+|*| NOTE: these declarations should be moved to the public
+|*| header once they're properly implemented
+\*/
+CStatus
+CImage_GetData(CImage *_this,
+ CByte **data,
+ CUInt32 *count);
+CStatus
+CImage_GetPalette(CImage *_this,
+ CColorPalette **palette);
+CStatus
+CImage_SetPalette(CImage *_this,
+ CColorPalette *palette);
+CStatus
+CImage_GetPropertyItem(CImage *_this,
+ CPropertyID id,
+ CPropertyItem *item);
+CStatus
+CImage_SetPropertyItem(CImage *_this,
+ CPropertyItem *item);
+CStatus
+CImage_RemovePropertyItem(CImage *_this,
+ CPropertyID id);
+CStatus
+CImage_GetPropertyIDs(CImage *_this,
+ CPropertyID **ids,
+ CUInt32 *count);
+CStatus
+CImage_GetPropertyItems(CImage *_this,
+ CPropertyItem **propertyItems,
+ CUInt32 *count);
+CStatus
+CImage_GetThumbnailImage(CImage *_this,
+ CUInt32 width,
+ CUInt32 height,
+ CImage **thumbnail);
+CStatus
+CImage_RotateFlip(CImage *_this,
+ CRotateFlipType rotateFlipType);
+CStatus
+CImage_GetFrameCount(CImage *_this,
+ CGuid dimension,
+ CUInt32 *frameCount);
+CStatus
+CImage_GetFrameDimensions(CImage *_this,
+ CGuid **dimensions,
+ CUInt32 *count);
+CStatus
+CImage_SelectActiveFrame(CImage *_this,
+ CGuid dimension,
+ CUInt32 frameIndex);
+
#ifdef __cplusplus
};
#endif
Index: libCrayons/include/CNoThreadMutex.h
diff -u libCrayons/include/CNoThreadMutex.h:1.2
libCrayons/include/CNoThreadMutex.h:1.3
--- libCrayons/include/CNoThreadMutex.h:1.2 Mon Nov 14 13:26:16 2005
+++ libCrayons/include/CNoThreadMutex.h Mon Mar 6 20:05:14 2006
@@ -28,7 +28,7 @@
#endif
typedef CUInt32 CMutex;
-static const CMutex CMutex_StaticInitializer = 0;
+#define CMutex_StaticInitializer 0
#define CMutex_Lock(_this)
#define CMutex_Unlock(_this)
Index: libCrayons/include/CPThreadMutex.h
diff -u libCrayons/include/CPThreadMutex.h:1.2
libCrayons/include/CPThreadMutex.h:1.3
--- libCrayons/include/CPThreadMutex.h:1.2 Mon Nov 14 13:26:16 2005
+++ libCrayons/include/CPThreadMutex.h Mon Mar 6 20:05:14 2006
@@ -34,7 +34,7 @@
pthread_mutex_t mutex;
};
-static const CMutex CMutex_StaticInitializer = { PTHREAD_MUTEX_INITIALIZER };
+#define CMutex_StaticInitializer { PTHREAD_MUTEX_INITIALIZER }
CINTERNAL void
CMutex_Lock(CMutex *_this);
Index: libCrayons/include/CPath.h
diff -u libCrayons/include/CPath.h:1.2 libCrayons/include/CPath.h:1.3
--- libCrayons/include/CPath.h:1.2 Mon Nov 14 13:26:16 2005
+++ libCrayons/include/CPath.h Mon Mar 6 20:05:14 2006
@@ -49,7 +49,7 @@
/*\
|*| Ensure the capacity of point and type lists of a path.
|*|
-|*| path - the path
+|*| path - the path
|*| count - the total minimum capacity required
|*|
|*| Returns status code on error.
Index: libCrayons/include/CRegion.h
diff -u libCrayons/include/CRegion.h:1.2 libCrayons/include/CRegion.h:1.3
--- libCrayons/include/CRegion.h:1.2 Mon Nov 14 13:26:16 2005
+++ libCrayons/include/CRegion.h Mon Mar 6 20:05:14 2006
@@ -113,44 +113,44 @@
(CPathType_Line | CPathType_CloseSubpath)
};
-#define CRegionRect_RectToPath(points, rectangle) \
+#define CRegionRect_RectToPath(points, rectangle)
\
do {
\
/* declarations */
\
- CPointF *curr;
\
+ CPointF *curr;
\
\
/* get the edges of the rectangle */
\
- const CFloat top = CRectangle_Y((rectangle));
\
- const CFloat left = CRectangle_X((rectangle));
\
- const CFloat right = CRectangle_Width((rectangle)) + left;
\
- const CFloat bottom = CRectangle_Height((rectangle)) + top;
\
+ const CFloat top = CRectangle_Y((rectangle));
\
+ const CFloat left = CRectangle_X((rectangle));
\
+ const CFloat right = CRectangle_Width((rectangle)) + left;
\
+ const CFloat bottom = CRectangle_Height((rectangle)) + top;
\
\
/* get the current point pointer */
\
curr = (points);
\
\
/* set the first point */
\
- CPoint_X(*curr) = left;
\
- CPoint_Y(*curr) = top;
\
+ CPoint_X(*curr) = left;
\
+ CPoint_Y(*curr) = top;
\
\
/* move to the next position */
\
++curr;
\
\
/* set the second point */
\
- CPoint_X(*curr) = right;
\
- CPoint_Y(*curr) = top;
\
+ CPoint_X(*curr) = right;
\
+ CPoint_Y(*curr) = top;
\
\
/* move to the next position */
\
++curr;
\
\
/* set the third point */
\
- CPoint_X(*curr) = right;
\
- CPoint_Y(*curr) = bottom;
\
+ CPoint_X(*curr) = right;
\
+ CPoint_Y(*curr) = bottom;
\
\
/* move to the next position */
\
++curr;
\
\
/* set the fourth point */
\
- CPoint_X(*curr) = left;
\
- CPoint_Y(*curr) = bottom;
\
+ CPoint_X(*curr) = left;
\
+ CPoint_Y(*curr) = bottom;
\
} while(0)
CINTERNAL void
@@ -160,6 +160,18 @@
CAffineTransformF *transform,
pixman_image_t *mask);
+/*\
+|*| NOTE: these declarations should be moved to the public
+|*| header once they're properly implemented
+\*/
+CStatus
+CRegion_CreateData(CRegion **_this,
+ CByte *data,
+ CUInt32 count);
+CStatus
+CRegion_CreateHRGN(CRegion **_this,
+ void *hrgn);
+
#ifdef __cplusplus
};
#endif
Index: libCrayons/include/CStroker.h
diff -u libCrayons/include/CStroker.h:1.2 libCrayons/include/CStroker.h:1.3
--- libCrayons/include/CStroker.h:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/include/CStroker.h Mon Mar 6 20:05:14 2006
@@ -117,7 +117,8 @@
CPath *path,
CPointF *points,
CByte *types,
- CUInt32 count);
+ CUInt32 count,
+ CBool hasCurves);
#ifdef __cplusplus
};
Index: libCrayons/include/CSurface.h
diff -u libCrayons/include/CSurface.h:1.2 libCrayons/include/CSurface.h:1.3
--- libCrayons/include/CSurface.h:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/include/CSurface.h Mon Mar 6 20:05:14 2006
@@ -49,14 +49,14 @@
/*\
|*| Composite the image onto the surface.
|*|
- |*| _this - this surface
- |*| x - destination x coordinate
- |*| y - destination y coordinate
- |*| width - width of composition
+ |*| _this - this surface
+ |*| x - destination x coordinate
+ |*| y - destination y coordinate
+ |*| width - width of composition
|*| height - height of composition
- |*| src - source image
- |*| mask - mask image
- |*| op - compositing operator
+ |*| src - source image
+ |*| mask - mask image
+ |*| op - compositing operator
|*|
|*| Returns status code.
\*/
@@ -83,7 +83,7 @@
/*\
|*| Flush the surface.
|*|
- |*| _this - this surface
+ |*| _this - this surface
|*| intention - flush operation
|*|
|*| Returns status code.
@@ -92,6 +92,28 @@
CFlushIntention intention);
/*\
+ |*| Get the horizontal resolution of the surface.
+ |*|
+ |*| _this - this surface
+ |*| dpiX - horizontal resolution
+ |*|
+ |*| Returns status code.
+ \*/
+ CStatus (*GetDpiX)(CSurface *_this,
+ CFloat *dpiX);
+
+ /*\
+ |*| Get the vertical resolution of the surface.
+ |*|
+ |*| _this - this surface
+ |*| dpiY - vertical resolution
+ |*|
+ |*| Returns status code.
+ \*/
+ CStatus (*GetDpiY)(CSurface *_this,
+ CFloat *dpiY);
+
+ /*\
|*| Finalize the surface.
|*|
|*| _this - this surface
@@ -104,7 +126,12 @@
const char *sentinel;
};
-
+CINTERNAL void
+CSurface_Lock(CSurface *_this);
+CINTERNAL void
+CSurface_Unlock(CSurface *_this);
+CINTERNAL CRectangleF
+CSurface_GetBoundsF(CSurface *_this);
CINTERNAL CStatus
CSurface_GetClipMask(CSurface *_this,
pixman_image_t **mask,
@@ -114,6 +141,28 @@
pixman_image_t **mask,
CBool gray);
CINTERNAL CStatus
+CSurface_Composite(CSurface *_this,
+ CInt32 x,
+ CInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ pixman_image_t *src,
+ pixman_image_t *mask,
+ CInterpolationMode interpolationMode,
+ CCompositingMode compositingMode);
+CINTERNAL CStatus
+CSurface_Clear(CSurface *_this,
+ CColor color);
+CINTERNAL CStatus
+CSurface_Flush(CSurface *_this,
+ CFlushIntention intention);
+CINTERNAL CStatus
+CSurface_GetDpiX(CSurface *_this,
+ CFloat *dpiX);
+CINTERNAL CStatus
+CSurface_GetDpiY(CSurface *_this,
+ CFloat *dpiY);
+CINTERNAL CStatus
CSurface_Initialize(CSurface *_this,
const CSurfaceClass *_class,
CUInt32 x,
Index: libCrayons/include/CUtils.h
diff -u libCrayons/include/CUtils.h:1.2 libCrayons/include/CUtils.h:1.3
--- libCrayons/include/CUtils.h:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/include/CUtils.h Mon Mar 6 20:05:14 2006
@@ -27,6 +27,56 @@
extern "C" {
#endif
+/* Opaque handle to IO resource. */
+typedef void *CIOHandle;
+
+/* Invalid IO handle. */
+#define CIOHandle_Invalid ((CIOHandle)-1)
+
+#ifdef C_SYSTEM_WIN32_NATIVE
+ #define CUtils_DirectorySeparator '\\'
+#else
+ #define CUtils_DirectorySeparator '/'
+#endif
+
+/*\
+|*| NOTE: the fast inline hash should be used like so:
+|*|
+|*| hash = init
+|*| foreach(byte in data)
+|*| hash = oper(hash, byte)
+\*/
+
+/* initialization value for fast inline hash */
+#define CUtils_HashFast_Init ((CUInt32)0x811C9DC5)
+
+/* prime number value for fast inline hash */
+#define CUtils_HashFast_Prime ((CUInt32)16777619)
+
+/* hash operation for fast inline hash */
+#define CUtils_HashFast_Oper(hash, byte) \
+ ((((CUInt32)(hash)) ^ ((CByte)(byte))) * CUtils_HashFast_Prime)
+
+
+/* initialization value for best hash */
+#define CUtils_HashBest_Init ((CUInt32)0x9E3779B9)
+
+CINTERNAL CStatus
+CUtils_DeleteFile(const CChar8 *path);
+CINTERNAL CBool
+CUtils_FileExists(const CChar8 *path);
+CINTERNAL CBool
+CUtils_DirectoryExists(const CChar8 *path);
+CINTERNAL CStatus
+CUtils_CreateTemporaryFile(CChar8 **filename,
+ CIOHandle *handle);
+CINTERNAL CStatus
+CUtils_CloseIOHandle(CIOHandle handle);
+CINTERNAL CStatus
+CUtils_WriteIOHandle(CIOHandle handle,
+ const CByte *memory,
+ CUInt32 length,
+ CUInt32 *written);
CINTERNAL CFloat
CUtils_ConvertUnits(CGraphicsUnit fromUnit,
CGraphicsUnit toUnit,
@@ -37,6 +87,20 @@
CFloat value,
CFloat fromDpiY,
CFloat toDpiY);
+CINTERNAL CUInt32
+CUtils_Char16ToChar32(const CChar16 *src,
+ CChar32 *dst,
+ CUInt32 len);
+CINTERNAL CStatus
+CUtils_Str8ToStr16(const CChar8 *string,
+ CChar16 **result);
+CINTERNAL CStatus
+CUtils_Str16ToStr8(const CChar16 *string,
+ CChar8 **result);
+CINTERNAL CUInt32
+CUtils_HashBest(const CByte *data,
+ CUInt32 length,
+ CUInt32 init);
CINTERNAL CStatus
CUtils_ToPixmanImage(CPixelFormat format,
CByte *scan0,
@@ -73,6 +137,14 @@
CINTERNAL CStatus
CUtils_CreateSolidPattern(pixman_image_t **pattern,
CColor color);
+CStatus
+CUtils_CreateHatchPattern(pixman_image_t **pattern,
+ const CByte *bits,
+ CUInt16 width,
+ CUInt16 height,
+ CColor fg,
+ CColor bg,
+ CBool repeat);
CINTERNAL pixman_color_t
CUtils_ToPixmanColor(CColor color);
CINTERNAL CStatus
@@ -82,9 +154,16 @@
CUInt32 y,
CUInt32 width,
CUInt32 height);
+CINTERNAL void
+CUtils_ReverseBytes(CByte *bits,
+ CUInt32 length);
+CINTERNAL CUInt32
+CUtils_NextTwinPrime(CUInt32 num);
CINTERNAL CBool
CUtils_UseGray(CSmoothingMode smoothing,
CPixelOffsetMode pixelOffset);
+CINTERNAL CBool
+CUtils_IsLittleEndian(void);
#ifdef __cplusplus
};
Index: libCrayons/include/CX11Surface.h
diff -u libCrayons/include/CX11Surface.h:1.3
libCrayons/include/CX11Surface.h:1.4
--- libCrayons/include/CX11Surface.h:1.3 Mon Nov 14 13:26:17 2005
+++ libCrayons/include/CX11Surface.h Mon Mar 6 20:05:14 2006
@@ -18,11 +18,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifdef HAVE_X11_XLIB_H
-
#ifndef _C_X11SURFACE_H_
#define _C_X11SURFACE_H_
+#include "CrayonsSurfaceX11.h"
#include "CSurface.h"
#ifdef __cplusplus
@@ -37,7 +36,8 @@
Visual *visual;
GC gc;
Drawable drawable;
- CFloat dpi;
+ CFloat dpiX;
+ CFloat dpiY;
int depth;
};
@@ -56,15 +56,23 @@
static CStatus
CX11Surface_Flush(CSurface *_this,
CFlushIntention intention);
+static CStatus
+CX11Surface_GetDpiX(CSurface *_this,
+ CFloat *dpiX);
+static CStatus
+CX11Surface_GetDpiY(CSurface *_this,
+ CFloat *dpiY);
static void
CX11Surface_Finalize(CSurface *_this);
-static const CSurfaceClassCDX11Surface_Class =
+static const CSurfaceClass CX11Surface_Class =
{
CX11Surface_Composite,
CX11Surface_Clear,
CX11Surface_Flush,
+ CX11Surface_GetDpiX,
+ CX11Surface_GetDpiY,
CX11Surface_Finalize,
"sentinel"
};
@@ -74,5 +82,3 @@
#endif
#endif /* _C_X11SURFACE_H_ */
-
-#endif /* HAVE_X11_XLIB_H */
Index: libCrayons/include/Crayons.h
diff -u libCrayons/include/Crayons.h:1.3 libCrayons/include/Crayons.h:1.4
--- libCrayons/include/Crayons.h:1.3 Mon Nov 14 13:26:17 2005
+++ libCrayons/include/Crayons.h Mon Mar 6 20:05:14 2006
@@ -18,80 +18,62 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _C_LIBRARY_H_
-#define _C_LIBRARY_H_
+#ifndef _CRAYONS_H_
+#define _CRAYONS_H_
-#include "CrayonsConfig.h"
-
-#ifdef HAVE_PIXMAN_H
- #include <pixman.h>
-#else
- #error "The pixman library could not be found."
-#endif
-
-#ifdef HAVE_X11_XLIB_H
- #include <X11/Xlib.h>
-#endif
+#include "CrayonsFeatures.h"
#ifdef __cplusplus
extern "C" {
#endif
/*\
-|*| NOTE: The CLIBRARY_* defines/ifdefs here are a hack to get something akin
+|*| NOTE: The CRAYONS_* defines/ifdefs here are a hack to get something akin
|*| to C# region blocks; they serve a purely aesthetic purpose.
\*/
/******************************************************************************/
-#define CLIBRARY_BASIC_TYPES
-#ifdef CLIBRARY_BASIC_TYPES
-/* Define the 8-bit numeric types. */
-typedef signed char CInt8;
-typedef unsigned char CUInt8;
-typedef CInt8 CSByte;
-typedef CUInt8 CChar8;
-typedef CUInt8 CByte;
-typedef CUInt8 CBool;
-
-/* Define the 16-bit numeric types. */
-typedef short CInt16;
-typedef unsigned short CUInt16;
-typedef CUInt16 CChar16;
-
-/* Define the 32-bit numeric types. */
-#if defined(_MSC_VER)
- typedef __int32 CInt32;
- typedef unsigned __int32 CUInt32;
-#elif defined(C_SIZEOF_INT) && (C_SIZEOF_INT == 4)
- typedef int CInt32;
- typedef unsigned int CUInt32;
-#elif defined(C_SIZEOF_LONG) && (C_SIZEOF_LONG == 4)
- typedef long CInt32;
- typedef unsigned long CUInt32;
-#else
- #error "The 32-bit integer type for this compiler could not be
determined."
+#define CRAYONS_VERSION_INFO
+#ifdef CRAYONS_VERSION_INFO
+/* Make a crayons version number from version number components. */
+#define CrayonsMakeVersion(major, minor, micro) \
+ (((major) * 10000) + \
+ ((minor) * 100) + \
+ ((micro) * 1))
+
+/* Define the crayons version. */
+#define CrayonsVersion \
+ (CrayonsMakeVersion \
+ (CrayonsVersionMajor, \
+ CrayonsVersionMinor, \
+ CrayonsVersionMicro))
#endif
+/******************************************************************************/
+
+
+
+/******************************************************************************/
+#define CRAYONS_BASIC_TYPES
+#ifdef CRAYONS_BASIC_TYPES
+/* Define the 8-bit alias types. */
+typedef CInt8 CSByte;
+typedef CUInt8 CByte;
+
+/* Define the boolean type. */
+typedef CUInt8 CBool;
+
+/* Define the character types. */
+typedef CUInt8 CChar8;
+typedef CUInt16 CChar16;
typedef CUInt32 CChar32;
+
+/* Define miscellaneous 32-bit numeric types. */
typedef CUInt32 CColor;
typedef CUInt32 CLanguageID;
typedef CUInt32 CPropertyID;
typedef CUInt32 CGraphicsContainer;
-/* Define the 64-bit numeric types. */
-#if defined(_MSC_VER)
- typedef __int64 CInt64;
- typedef unsigned __int64 CUInt64;
-#elif defined(C_SIZEOF_LONG) && (C_SIZEOF_LONG == 8)
- typedef long CInt64;
- typedef unsigned long CUInt64;
-#elif defined(C_SIZEOF_LONG_LONG) && (C_SIZEOF_LONG_LONG == 8)
- typedef long long CInt64;
- typedef unsigned long long CUInt64;
-#else
- #error "The 64-bit integer type for this compiler could not be
determined."
-#endif
-
-/* Define the floating point types */
+/* Define the basic floating point types. */
typedef float CFloat;
typedef double CDouble;
#endif
@@ -100,8 +82,8 @@
/******************************************************************************/
-#define CLIBRARY_OPAQUE_TYPES
-#ifdef CLIBRARY_OPAQUE_TYPES
+#define CRAYONS_OPAQUE_TYPES
+#ifdef CRAYONS_OPAQUE_TYPES
/* Define opaque types. */
typedef struct _tagCAdjustableArrowCap CAdjustableArrowCap;
typedef struct _tagCImage CBitmap;
@@ -133,8 +115,8 @@
/******************************************************************************/
-#define CLIBRARY_ENUMERATIONS
-#ifdef CLIBRARY_ENUMERATIONS
+#define CRAYONS_ENUMERATIONS
+#ifdef CRAYONS_ENUMERATIONS
/* Define enumeration types. */
typedef CUInt32 CBrushType;
#define CBrushType_SolidFill 0
@@ -202,6 +184,12 @@
#define CDashStyle_DashDashDot 4
#define CDashStyle_Custom 5
+typedef CUInt32 CDigitSubstitute;
+#define CDigitSubstitute_User 0
+#define CDigitSubstitute_None 1
+#define CDigitSubstitute_National 2
+#define CDigitSubstitute_Traditional 3
+
typedef CUInt32 CFillMode;
#define CFillMode_Alternate 0
#define CFillMode_Winding 1
@@ -217,6 +205,11 @@
#define CFontStyle_Underline 4
#define CFontStyle_Strikeout 8
+typedef CUInt32 CFontFamilyGeneric;
+#define CFontFamilyGeneric_Serif 0
+#define CFontFamilyGeneric_SansSerif 1
+#define CFontFamilyGeneric_Monospace 2
+
typedef CUInt32 CGraphicsUnit;
#define CGraphicsUnit_World 0
#define CGraphicsUnit_Display 1
@@ -457,26 +450,22 @@
#define CStatus_InvalidOperation 0x00000005
#define CStatus_NotImplemented 0x00000006
#define CStatus_NotSupported 0x00000007
-#define CStatus_Error 0x00000008
+#define CStatus_IOError 0x00000008
#define CStatus_Argument_FontFamilyNotFound 0x00010002
#define CStatus_Argument_InvalidPointCount 0x00020002
#define CStatus_Argument_NeedAtLeast2Points 0x00030002
#define CStatus_Argument_NeedAtLeast3Points 0x00040002
#define CStatus_Argument_NeedAtLeast4Points 0x00050002
+#define CStatus_Argument_StyleNotAvailable 0x00060002
#define CStatus_InvalidOperation_ImageLocked 0x00010005
#define CStatus_InvalidOperation_SingularMatrix 0x00020005
+#define CStatus_IOError_FileNotFound 0x00010008
typedef CUInt32 CStringAlignment;
#define CStringAlignment_Near 0
#define CStringAlignment_Center 1
#define CStringAlignment_Far 2
-typedef CUInt32 CDigitSubstitute;
-#define CDigitSubstitute_User 0
-#define CDigitSubstitute_None 1
-#define CDigitSubstitute_National 2
-#define CDigitSubstitute_Traditional 3
-
typedef CUInt32 CStringFormatFlag;
#define CStringFormatFlag_DirectionRightToLeft 0x0001
#define CStringFormatFlag_DirectionVertical 0x0002
@@ -520,8 +509,8 @@
/******************************************************************************/
-#define CLIBRARY_TRANSPARENT_TYPES
-#ifdef CLIBRARY_TRANSPARENT_TYPES
+#define CRAYONS_TRANSPARENT_TYPES
+#ifdef CRAYONS_TRANSPARENT_TYPES
/* Define transparent types. */
typedef struct _tagCBitmapData CBitmapData;
struct _tagCBitmapData
@@ -578,8 +567,8 @@
CColor *colors;
};
-typedef struct _tagCFontMetricsI CFontMetricsI;
-struct _tagCFontMetricsI
+typedef struct _tagCFontMetrics CFontMetrics;
+struct _tagCFontMetrics
{
CInt32 cellAscent;
CInt32 cellDescent;
@@ -587,15 +576,6 @@
CInt32 emHeight;
};
-typedef struct _tagCFontMetricsF CFontMetricsF;
-struct _tagCFontMetricsF
-{
- CFloat cellAscent;
- CFloat cellDescent;
- CFloat lineSpacing;
- CFloat emHeight;
-};
-
typedef struct _tagCGuid CGuid;
struct _tagCGuid
{
@@ -659,29 +639,29 @@
/******************************************************************************/
-#define CLIBRARY_CONSTANTS
-#ifdef CLIBRARY_CONSTANTS
+#define CRAYONS_CONSTANTS
+#ifdef CRAYONS_CONSTANTS
/* Declare various constants. */
-extern const CGuid CFrameDimension_Page;
-extern const CGuid CFrameDimension_Resolution;
-extern const CGuid CFrameDimension_Time;
-extern const CGuid CImageFormat_MemoryBMP;
-extern const CGuid CImageFormat_BMP;
-extern const CGuid CImageFormat_EMF;
-extern const CGuid CImageFormat_WMF;
-extern const CGuid CImageFormat_JPG;
-extern const CGuid CImageFormat_PNG;
-extern const CGuid CImageFormat_GIF;
-extern const CGuid CImageFormat_TIFF;
-extern const CGuid CImageFormat_EXIF;
+extern _Cconst CGuid CFrameDimension_Page;
+extern _Cconst CGuid CFrameDimension_Resolution;
+extern _Cconst CGuid CFrameDimension_Time;
+extern _Cconst CGuid CImageFormat_MemoryBMP;
+extern _Cconst CGuid CImageFormat_BMP;
+extern _Cconst CGuid CImageFormat_EMF;
+extern _Cconst CGuid CImageFormat_WMF;
+extern _Cconst CGuid CImageFormat_JPG;
+extern _Cconst CGuid CImageFormat_PNG;
+extern _Cconst CGuid CImageFormat_GIF;
+extern _Cconst CGuid CImageFormat_TIFF;
+extern _Cconst CGuid CImageFormat_EXIF;
#endif
/******************************************************************************/
/******************************************************************************/
-#define CLIBRARY_BITMAP_METHODS
-#ifdef CLIBRARY_BITMAP_METHODS
+#define CRAYONS_BITMAP_METHODS
+#ifdef CRAYONS_BITMAP_METHODS
/* Declare public bitmap methods. */
CStatus
CBitmap_Create(CBitmap **_this,
@@ -737,8 +717,20 @@
/******************************************************************************/
-#define CLIBRARY_BRUSH_METHODS
-#ifdef CLIBRARY_BRUSH_METHODS
+#define CRAYONS_BITMAPSURFACE_METHODS
+#ifdef CRAYONS_BITMAPSURFACE_METHODS
+/* Declare public bitmap surface methods. */
+CStatus
+CBitmapSurface_Create(CBitmapSurface **_this,
+ CBitmap *image);
+#endif
+/******************************************************************************/
+
+
+
+/******************************************************************************/
+#define CRAYONS_BRUSH_METHODS
+#ifdef CRAYONS_BRUSH_METHODS
/* Declare public brush methods. */
CStatus
CBrush_GetBrushType(CBrush *_this,
@@ -754,8 +746,8 @@
/******************************************************************************/
-#define CLIBRARY_COLORPALETTE_METHODS
-#ifdef CLIBRARY_COLORPALETTE_METHODS
+#define CRAYONS_COLORPALETTE_METHODS
+#ifdef CRAYONS_COLORPALETTE_METHODS
/* Declare public color palette methods. */
CStatus
CColorPalette_Create(CColorPalette **_this,
@@ -763,15 +755,123 @@
CUInt32 count,
CPaletteFlag flags);
CStatus
-ColorPalette_Destroy(CColorPalette **_this);
+CColorPalette_Destroy(CColorPalette **_this);
+#endif
+/******************************************************************************/
+
+
+
+/******************************************************************************/
+#define CRAYONS_FONTCOLLECTION_METHODS
+#ifdef CRAYONS_FONTCOLLECTION_METHODS
+CStatus
+CFontCollection_CreateInstalled(CFontCollection **_this);
+CStatus
+CFontCollection_CreatePrivate(CFontCollection **_this);
+CStatus
+CFontCollection_Destroy(CFontCollection **_this);
+CStatus
+CFontCollection_AddFontFile(CFontCollection *_this,
+ _Cconst CChar16 *filename);
+CStatus
+CFontCollection_AddFontMemory(CFontCollection *_this,
+ _Cconst CByte *memory,
+ CUInt32 length);
+CStatus
+CFontCollection_GetFamilyList(CFontCollection *_this,
+ CFontFamily ***families,
+ CUInt32 *count);
+#endif
+/******************************************************************************/
+
+
+
+/******************************************************************************/
+#define CRAYONS_FONTFAMILY_METHODS
+#ifdef CRAYONS_FONTFAMILY_METHODS
+CStatus
+CFontFamily_CreateName(CFontFamily **_this,
+ _Cconst CChar16 *name,
+ CFontCollection *collection);
+CStatus
+CFontFamily_CreateGeneric(CFontFamily **_this,
+ CFontFamilyGeneric generic);
+CStatus
+CFontFamily_Destroy(CFontFamily **_this);
+CStatus
+CFontFamily_GetMetrics(CFontFamily *_this,
+ CFontStyle style,
+ CFontMetrics *metrics);
+CStatus
+CFontFamily_GetName(CFontFamily *_this,
+ CChar16 **name);
+CStatus
+CFontFamily_IsStyleAvailable(CFontFamily *_this,
+ CFontStyle style,
+ CBool *available);
#endif
/******************************************************************************/
/******************************************************************************/
-#define CLIBRARY_GRAPHICS_METHODS
-#ifdef CLIBRARY_GRAPHICS_METHODS
+#define CRAYONS_FONT_METHODS
+#ifdef CRAYONS_FONT_METHODS
+CStatus
+CFont_Create(CFont **_this,
+ CFontFamily *family,
+ CFontStyle style,
+ CFloat size,
+ CGraphicsUnit unit);
+CStatus
+CFont_Destroy(CFont **_this);
+CStatus
+CFont_Clone(CFont *_this,
+ CFont **clone);
+CStatus
+CFont_Equals(CFont *_this,
+ CFont *other,
+ CBool *equal);
+CStatus
+CFont_GetFontFamily(CFont *_this,
+ CFontFamily **family);
+CStatus
+CFont_GetHashCode(CFont *_this,
+ CUInt32 *hash);
+CStatus
+CFont_GetHeight(CFont *_this,
+ CFloat *height);
+CStatus
+CFont_GetHeightDPI(CFont *_this,
+ CFloat dpiY,
+ CFloat *height);
+CStatus
+CFont_GetHeightGraphics(CFont *_this,
+ CGraphics *graphics,
+ CFloat *height);
+CStatus
+CFont_GetName(CFont *_this,
+ CChar16 **name);
+CStatus
+CFont_GetSize(CFont *_this,
+ CFloat *size);
+CStatus
+CFont_GetSizeInPoints(CFont *_this,
+ CFloat *points);
+CStatus
+CFont_GetStyle(CFont *_this,
+ CFontStyle *style);
+CStatus
+CFont_GetUnit(CFont *_this,
+ CGraphicsUnit *unit);
+#endif
+/******************************************************************************/
+
+
+
+/******************************************************************************/
+#define CRAYONS_GRAPHICS_METHODS
+#ifdef CRAYONS_GRAPHICS_METHODS
/* Declare public graphics methods. */
CStatus
CGraphics_Create(CGraphics **_this,
@@ -916,11 +1016,14 @@
CGraphics_SetTextRenderingHint(CGraphics *_this,
CTextRenderingHint textRenderingHint);
CStatus
-CGraphics_DrawXBM(CGraphics *_this,
- CByte *bits,
- CUInt32 count,
- CRectangleF dst,
- CColor color);
+CGraphics_DrawXBM(CGraphics *_this,
+ _Cconst CByte *bits,
+ CFloat x,
+ CFloat y,
+ CUInt16 width,
+ CUInt16 height,
+ CColor color,
+ CBool transform);
CStatus
CGraphics_DrawImage(CGraphics *_this,
CImage *image,
@@ -1091,32 +1194,45 @@
CGraphics_Save(CGraphics *_this,
CUInt32 *state);
CStatus
-CGraphics_DrawString(CGraphics *_this,
- CBrush *brush,
- CChar16 *s,
- CUInt32 length,
- CFont *font,
- CRectangleF layoutRect,
- CStringFormat *format);
-CStatus
-CGraphics_MeasureCharacterRanges(CGraphics *_this,
- CChar16 *s,
- CUInt32 length,
- CFont *font,
- CRectangleF layoutRect,
- CStringFormat *format,
- CRegion **regions,
- CUInt32 *count);
-CStatus
-CGraphics_MeasureString(CGraphics *_this,
- CChar16 *s,
- CUInt32 length,
- CFont *font,
- CRectangleF layoutRect,
- CStringFormat *format,
- CUInt32 *charactersFitted,
- CUInt32 *linesFilled,
- CSizeF *size);
+CGraphics_DrawString(CGraphics *_this,
+ CBrush *brush,
+ _Cconst CChar16 *s,
+ CUInt32 length,
+ CFont *font,
+ CRectangleF layoutRect,
+ CStringFormat *format);
+CStatus
+CGraphics_MeasureCharacterRanges(CGraphics *_this,
+ _Cconst CChar16 *s,
+ CUInt32 length,
+ CFont *font,
+ CRectangleF layoutRect,
+ CStringFormat *format,
+ CRegion **regions,
+ CUInt32 *count);
+CStatus
+CGraphics_MeasureString(CGraphics *_this,
+ _Cconst CChar16 *s,
+ CUInt32 length,
+ CFont *font,
+ CRectangleF layoutRect,
+ CStringFormat *format,
+ CUInt32 *charactersFitted,
+ CUInt32 *linesFilled,
+ CSizeF *size);
+CStatus
+CGraphics_MeasureStringSimple(CGraphics *_this,
+ _Cconst CChar16 *s,
+ CUInt32 length,
+ CFont *font,
+ CSizeF *size);
+CStatus
+CGraphics_DrawStringSimple(CGraphics *_this,
+ CBrush *brush,
+ _Cconst CChar16 *s,
+ CUInt32 length,
+ CFont *font,
+ CRectangleF layoutRect);
CStatus
CGraphics_Flush(CGraphics *_this,
CFlushIntention intention);
@@ -1142,8 +1258,8 @@
/******************************************************************************/
-#define CLIBRARY_HATCHBRUSH_METHODS
-#ifdef CLIBRARY_HATCHBRUSH_METHODS
+#define CRAYONS_HATCHBRUSH_METHODS
+#ifdef CRAYONS_HATCHBRUSH_METHODS
/* Declare public hatch brush methods. */
CStatus
CHatchBrush_Create(CHatchBrush **_this,
@@ -1165,8 +1281,8 @@
/******************************************************************************/
-#define CLIBRARY_IMAGE_METHODS
-#ifdef CLIBRARY_IMAGE_METHODS
+#define CRAYONS_IMAGE_METHODS
+#ifdef CRAYONS_IMAGE_METHODS
/* Declare public image methods. */
CStatus
CImage_Destroy(CImage **_this);
@@ -1210,8 +1326,8 @@
/******************************************************************************/
-#define CLIBRARY_LINEBRUSH_METHODS
-#ifdef CLIBRARY_LINEBRUSH_METHODS
+#define CRAYONS_LINEBRUSH_METHODS
+#ifdef CRAYONS_LINEBRUSH_METHODS
/* Declare public line brush methods. */
CStatus
CLineBrush_Create(CLineBrush **_this,
@@ -1296,8 +1412,8 @@
/******************************************************************************/
-#define CLIBRARY_MATRIX_METHODS
-#ifdef CLIBRARY_MATRIX_METHODS
+#define CRAYONS_MATRIX_METHODS
+#ifdef CRAYONS_MATRIX_METHODS
/* Declare public matrix methods. */
CStatus
CMatrix_Create(CMatrix **_this);
@@ -1316,6 +1432,8 @@
CFloat dx,
CFloat dy);
CStatus
+CMatrix_Destroy(CMatrix **_this);
+CStatus
CMatrix_GetDeterminant(CMatrix *_this,
CFloat *determinant);
CStatus
@@ -1366,8 +1484,8 @@
/******************************************************************************/
-#define CLIBRARY_PATH_METHODS
-#ifdef CLIBRARY_PATH_METHODS
+#define CRAYONS_PATH_METHODS
+#ifdef CRAYONS_PATH_METHODS
/* Declare public path methods. */
CStatus
CPath_Create(CPath **_this);
@@ -1552,8 +1670,8 @@
/******************************************************************************/
-#define CLIBRARY_PATHBRUSH_METHODS
-#ifdef CLIBRARY_PATHBRUSH_METHODS
+#define CRAYONS_PATHBRUSH_METHODS
+#ifdef CRAYONS_PATHBRUSH_METHODS
/* Declare public path brush methods. */
CStatus
CPathBrush_Create(CPathBrush **_this,
@@ -1645,8 +1763,8 @@
/******************************************************************************/
-#define CLIBRARY_PEN_METHODS
-#ifdef CLIBRARY_PEN_METHODS
+#define CRAYONS_PEN_METHODS
+#ifdef CRAYONS_PEN_METHODS
/* Declare public pen methods. */
CStatus
CPen_Create(CPen **_this,
@@ -1679,9 +1797,9 @@
CFloat **compoundArray,
CUInt32 *count);
CStatus
-CPen_SetCompoundArray(CPen *_this,
- const CFloat *compoundArray,
- CUInt32 count);
+CPen_SetCompoundArray(CPen *_this,
+ _Cconst CFloat *compoundArray,
+ CUInt32 count);
CStatus
CPen_GetCustomEndCap(CPen *_this,
CCustomLineCap **customEndCap);
@@ -1711,9 +1829,9 @@
CFloat **dashPattern,
CUInt32 *count);
CStatus
-CPen_SetDashPattern(CPen *_this,
- const CFloat *dashPattern,
- CUInt32 count);
+CPen_SetDashPattern(CPen *_this,
+ _Cconst CFloat *dashPattern,
+ CUInt32 count);
CStatus
CPen_GetDashStyle(CPen *_this,
CDashStyle *dashStyle);
@@ -1788,8 +1906,8 @@
/******************************************************************************/
-#define CLIBRARY_REGION_METHODS
-#ifdef CLIBRARY_REGION_METHODS
+#define CRAYONS_REGION_METHODS
+#ifdef CRAYONS_REGION_METHODS
/* Declare public region methods. */
CStatus
CRegion_Create(CRegion **_this);
@@ -1869,8 +1987,8 @@
/******************************************************************************/
-#define CLIBRARY_SOLIDBRUSH_METHODS
-#ifdef CLIBRARY_SOLIDBRUSH_METHODS
+#define CRAYONS_SOLIDBRUSH_METHODS
+#ifdef CRAYONS_SOLIDBRUSH_METHODS
/* Declare public solid brush methods. */
CStatus
CSolidBrush_Create(CSolidBrush **_this,
@@ -1887,8 +2005,8 @@
/******************************************************************************/
-#define CLIBRARY_STRINGFORMAT_METHODS
-#ifdef CLIBRARY_STRINGFORMAT_METHODS
+#define CRAYONS_STRINGFORMAT_METHODS
+#ifdef CRAYONS_STRINGFORMAT_METHODS
/* Declare public string format methods. */
CStatus
CStringFormat_Create(CStringFormat **_this,
@@ -1918,13 +2036,13 @@
CCharacterRange *characterRanges,
CUInt32 count);
CStatus
-CStringFormat_GetDigitSubstitution(CStringFormat *_this,
+CStringFormat_GetDigitSubstitution(CStringFormat *_this,
CDigitSubstitute *method,
- CLanguageID *language);
+ CLanguageID *language);
CStatus
-CStringFormat_SetDigitSubstitution(CStringFormat *_this,
+CStringFormat_SetDigitSubstitution(CStringFormat *_this,
CDigitSubstitute method,
- CLanguageID language);
+ CLanguageID language);
CStatus
CStringFormat_GetFormatFlags(CStringFormat *_this,
CStringFormatFlag *formatFlags);
@@ -1965,16 +2083,13 @@
/******************************************************************************/
-#define CLIBRARY_SURFACE_METHODS
-#ifdef CLIBRARY_SURFACE_METHODS
+#define CRAYONS_SURFACE_METHODS
+#ifdef CRAYONS_SURFACE_METHODS
/* Declare public surface methods. */
CStatus
-CSurface_Lock(CSurface *_this);
-CStatus
-CSurface_Unlock(CSurface *_this);
+CSurface_Reference(CSurface *_this);
CStatus
-CSurface_GetBoundsF(CSurface *_this,
- CRectangleF *bounds);
+CSurface_Destroy(CSurface **_this);
CStatus
CSurface_GetBounds(CSurface *_this,
CUInt32 *x,
@@ -1987,34 +2102,14 @@
CUInt32 y,
CUInt32 width,
CUInt32 height);
-CStatus
-CSurface_Reference(CSurface *_this);
-CStatus
-CSurface_Destroy(CSurface **_this);
-CStatus
-CSurface_Composite(CSurface *_this,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- pixman_image_t *src,
- pixman_image_t *mask,
- CInterpolationMode interpolationMode,
- CCompositingMode compositingMode);
-CStatus
-CSurface_Clear(CSurface *_this,
- CColor color);
-CStatus
-CSurface_Flush(CSurface *_this,
- CFlushIntention intention);
#endif
/******************************************************************************/
/******************************************************************************/
-#define CLIBRARY_TEXTUREBRUSH_METHODS
-#ifdef CLIBRARY_TEXTUREBRUSH_METHODS
+#define CRAYONS_TEXTUREBRUSH_METHODS
+#ifdef CRAYONS_TEXTUREBRUSH_METHODS
/* Declare public texture brush methods. */
CStatus
CTextureBrush_Create(CTextureBrush **_this,
@@ -2059,27 +2154,8 @@
#endif
/******************************************************************************/
-
-
-/******************************************************************************/
-#define CLIBRARY_X11SURFACE_METHODS
-#ifdef CLIBRARY_X11SURFACE_METHODS
-/* Declare public x surface methods. */
-#ifdef HAVE_X11_XLIB_H
-CStatus
-CX11Surface_Create(CX11Surface **_this,
- Display *dpy,
- Drawable drawable,
- Screen *screen,
- Visual *visual,
- CUInt32 width,
- CUInt32 height);
-#endif
-#endif
-/******************************************************************************/
-
#ifdef __cplusplus
};
#endif
-#endif /* _C_LIBRARY_H_ */
+#endif /* _CRAYONS_H_ */
Index: libCrayons/include/CrayonsConfig.h.in
diff -u libCrayons/include/CrayonsConfig.h.in:1.2
libCrayons/include/CrayonsConfig.h.in:1.3
--- libCrayons/include/CrayonsConfig.h.in:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/include/CrayonsConfig.h.in Mon Mar 6 20:05:14 2006
@@ -1,13 +1,13 @@
/* include/CrayonsConfig.h.in. Generated from configure.ac by autoheader. */
-/* The number of bytes in type int */
-#undef C_SIZEOF_INT
+/* Define to 1 to enable debugging. */
+#undef CDEBUG
-/* The number of bytes in type long */
-#undef C_SIZEOF_LONG
+/* Define to 1 to make internal methods public. */
+#undef CTESTING
-/* The number of bytes in type long long */
-#undef C_SIZEOF_LONG_LONG
+/* Define to 1 if you have the `access' function. */
+#undef HAVE_ACCESS
/* Define to 1 if you have the <assert.h> header file. */
#undef HAVE_ASSERT_H
@@ -27,6 +27,18 @@
/* Define to 1 if you have the `erf' function. */
#undef HAVE_ERF
+/* Define to 1 if you have the <errno.h> header file. */
+#undef HAVE_ERRNO_H
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if you have the `getpid' function. */
+#undef HAVE_GETPID
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
@@ -39,9 +51,6 @@
/* Define to 1 if you have the `pthread' library (-lpthread). */
#undef HAVE_LIBPTHREAD
-/* Define to 1 if you have the `X11' library (-lX11). */
-#undef HAVE_LIBX11
-
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
#undef HAVE_MALLOC
@@ -64,6 +73,12 @@
/* Define to 1 if you have the `memset' function. */
#undef HAVE_MEMSET
+/* Define to 1 if you have the `mkstemp' function. */
+#undef HAVE_MKSTEMP
+
+/* Define to 1 if you have the `open' function. */
+#undef HAVE_OPEN
+
/* Define to 1 if you have the <pixman.h> header file. */
#undef HAVE_PIXMAN_H
@@ -74,12 +89,22 @@
and to 0 otherwise. */
#undef HAVE_REALLOC
+/* Define to 1 if you have the `remove' function. */
+#undef HAVE_REMOVE
+
/* Define to 1 if you have the `sin' function. */
#undef HAVE_SIN
/* Define to 1 if you have the `sqrt' function. */
#undef HAVE_SQRT
+/* Define to 1 if you have the `stat' function. */
+#undef HAVE_STAT
+
+/* Define to 1 if `stat' has the bug that it succeeds when given the
+ zero-length file name argument. */
+#undef HAVE_STAT_EMPTY_STRING_BUG
+
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
@@ -101,9 +126,19 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* Define to 1 if you have the `unlink' function. */
+#undef HAVE_UNLINK
+
+/* Define to 1 if you have the `write' function. */
+#undef HAVE_WRITE
+
/* Define to 1 if you have the <X11/Xlib.h> header file. */
#undef HAVE_X11_XLIB_H
+/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
+ slash. */
+#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
+
/* Name of package */
#undef PACKAGE
@@ -125,6 +160,9 @@
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
+
/* Version number of package */
#undef VERSION
Index: libCrayons/include/CrayonsInternal.h
diff -u libCrayons/include/CrayonsInternal.h:1.2
libCrayons/include/CrayonsInternal.h:1.3
--- libCrayons/include/CrayonsInternal.h:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/include/CrayonsInternal.h Mon Mar 6 20:05:14 2006
@@ -18,11 +18,51 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _C_LIBRARYINTERNAL_H_
-#define _C_LIBRARYINTERNAL_H_
+#ifndef _CRAYONS_INTERNAL_H_
+#define _CRAYONS_INTERNAL_H_
-#include <pixman.h>
#include "Crayons.h"
+#include "CrayonsConfig.h"
+
+#include <stdio.h>
+
+#if STDC_HEADERS
+ #include <stdlib.h>
+ #include <stddef.h>
+#elif HAVE_STDLIB_H
+ #include <stdlib.h>
+#endif
+
+#if HAVE_STRING_H
+ #if !STDC_HEADERS && HAVE_MEMORY_H
+ #include <memory.h>
+ #endif
+ #include <string.h>
+#endif
+
+#if HAVE_STRINGS_H
+ #include <strings.h>
+#endif
+
+#if HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+ #include <sys/stat.h>
+#endif
+
+#if HAVE_UNISTD_H
+ #include <unistd.h>
+#endif
+
+#if HAVE_ASSERT_H && CDEBUG
+ #include <assert.h>
+#else
+ #undef CDEBUG
+#endif
+
+#include <pixman.h>
#ifdef __cplusplus
extern "C" {
@@ -38,24 +78,28 @@
#else
#define CINTERNAL
#endif
-
#if (__GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5))
#define CMATH __attribute__((__const__))
#else
#define CMATH
#endif
-/* Include basic system headers. */
-#ifdef HAVE_STDLIB_H
- #include <stdlib.h>
-#endif
-#if (defined(HAVE_ASSERT_H) && defined(CDEBUG))
- #include <assert.h>
+/* Define debugging macros. */
+#ifdef CDEBUG
#define CASSERT(foo) assert(foo)
#else
#define CASSERT(foo)
#endif
+/* Define system type. */
+#if defined(__CYGWIN__) || defined(__CYGWIN32__)
+ #define C_SYSTEM_WIN32_CYGWIN 1
+ #define C_SYSTEM_WIN32 1
+#elif defined(_WIN32) || defined(WIN32)
+ #define C_SYSTEM_WIN32_NATIVE 1
+ #define C_SYSTEM_WIN32 1
+#endif
+
typedef unsigned int CBitField;
typedef CUInt32 CFixedU;
typedef CInt32 CFixed;
@@ -158,6 +202,39 @@
+typedef struct _tagCPredicateBinary CPredicateBinary;
+struct _tagCPredicateBinary
+{
+ CBool (*Predicate)(CPredicateBinary *_this,
+ void *a,
+ void *b);
+};
+typedef struct _tagCPredicateUnary CPredicateUnary;
+struct _tagCPredicateUnary
+{
+ CBool (*Predicate)(CPredicateUnary *_this,
+ void *a);
+};
+typedef struct _tagCOperatorBinary COperatorBinary;
+struct _tagCOperatorBinary
+{
+ void (*Operator)(COperatorBinary *_this,
+ void *a,
+ void *b);
+};
+typedef struct _tagCOperatorUnary COperatorUnary;
+struct _tagCOperatorUnary
+{
+ void (*Operator)(COperatorUnary *_this,
+ void *a);
+};
+
+#define CPredicate_Binary(_this, a, b) ((_this)->Predicate((_this), (a), (b)))
+#define CPredicate_Unary(_this, a) ((_this)->Predicate((_this), (a)))
+#define COperator_Binary(_this, a, b) ((_this)->Operator((_this), (a), (b)))
+#define COperator_Unary(_this, a) ((_this)->Operator((_this), (a)))
+
+
@@ -197,7 +274,7 @@
-#define CCLAMP(value, min, max) \
+#define CCLAMP(value, min, max)
\
do {
\
if((value) < (min))
\
{
\
@@ -219,7 +296,7 @@
|*| When appromixating arcs less-than-or-equal-to 90 degrees, the control
|*| points can be calculated thusly:
|*|
-|*| i - the intersetion of the tangents of the end points of the arc
+|*| i - the intersection of the tangents of the end points of the arc
|*| r - the radius of the arc
|*| d - the distance from an end point to 'i'
|*| f - the distance from an end point to 'i', along its tangent,
@@ -239,15 +316,21 @@
\*/
#define CMath_Arc90Fraction 0.552284749830793
-#define CDouble_ToFixed(f) ((CFixed) ((f) * 65536))
-#define CFloat_ToFixed(f) ((CFixed) ((f) * 65536))
-#define CFixed_ToDouble(f) (((CDouble) (f)) / 65536)
-#define CFixed_ToFloat(f) (((CFloat) (f)) / 65536)
-#define CFixed_Zero (0)
-#define CFixed_One (65536)
-#define CFixed_MinusOne (-65536)
+#define CFloat_ToFixed(f) ((CFixed) (((CFloat) (f)) * 65536))
+#define CDouble_ToFixed(f) ((CFixed) (((CDouble)(f)) * 65536))
+#define CFixed_ToFloat(f) ((CFloat) (((CFloat) (f)) / 65536))
+#define CFixed_ToDouble(f) ((CDouble)(((CDouble)(f)) / 65536))
+
+#define CFixed_Floor(f) ((CFixed)(((f) + 0) & ~65535))
+#define CFixed_Ceil(f) ((CFixed)(((f) + 65535) & ~65535))
+#define CFixed_Round(f) ((CFixed)(((f) + 32768) & ~65535))
+#define CFixed_Trunc(f) ((CInt32)((f) >> 16))
+
+#define CFixed_Zero ((CFixed)0)
+#define CFixed_One ((CFixed)65536)
+#define CFixed_MinusOne ((CFixed)-65536)
-#define CColor_FromARGB(a, r, g, b) \
+#define CColor_FromARGB(a, r, g, b)
\
((((a) << 24) & 0xFF000000) |
\
(((r) << 16) & 0x00FF0000) |
\
(((g) << 8) & 0x0000FF00) |
\
@@ -255,9 +338,9 @@
#define CColor_IntensityR 0.30
#define CColor_IntensityG 0.59
#define CColor_IntensityB 0.11
-#define CColor_IntensityRGB(r, g, b) \
- (((r) * CColor_IntensityR) +
\
- ((g) * CColor_IntensityG) +
\
+#define CColor_IntensityRGB(r, g, b)
\
+ (((r) * CColor_IntensityR) +
\
+ ((g) * CColor_IntensityG) +
\
((b) * CColor_IntensityB))
#define CColor_A(color) ((CByte)((color) >> 24))
#define CColor_R(color) ((CByte)((color) >> 16))
@@ -269,27 +352,34 @@
/* TODO: use configure-time tests to generate this properly */
-#define CPixmanPixel_FromARGB(a, r, g, b) \
- (((CByte)((a) << 24)) |
\
- ((CByte)((r) << 16)) |
\
- ((CByte)((g) << 8)) |
\
- ((CByte)((b) << 0)))
+#define CPixmanPixel_FromARGB(a, r, g, b)
\
+ (((CColor)((a) << 24)) |
\
+ ((CColor)((r) << 16)) |
\
+ ((CColor)((g) << 8)) |
\
+ ((CColor)((b) << 0)))
/* TODO: use configure-time tests to generate this properly */
-#define CPixmanPixel_ToARGB(pixel, a, r, g, b) \
+#define CPixmanPixel_ToARGB(pixel, a, r, g, b)
\
+ do {
\
+ (a) = ((CByte)((pixel) >> 24));
\
+ (r) = ((CByte)((pixel) >> 16));
\
+ (g) = ((CByte)((pixel) >> 8));
\
+ (b) = ((CByte)((pixel) >> 0));
\
+ } while(0)
+
+#define CCombineMode_Default(combineMode)
\
do {
\
- (a) = ((CByte)((pixel) >> 24));
\
- (r) = ((CByte)((pixel) >> 16));
\
- (g) = ((CByte)((pixel) >> 8));
\
- (b) = ((CByte)((pixel) >> 0));
\
+ if((combineMode) > CCombineMode_Complement)
\
+ {
\
+ (combineMode) = CCombineMode_Replace;
\
+ }
\
} while(0)
-#define CCombineMode_Default(combineMode) \
+#define CFontFamilyGeneric_Default(generic)
\
do {
\
- if((combineMode) < CCombineMode_Replace ||
\
- (combineMode) > CCombineMode_Complement)
\
+ if((generic) > CFontFamilyGeneric_Monospace)
\
{
\
- (combineMode) = CCombineMode_Replace;
\
+ (generic) = CFontFamilyGeneric_Monospace;
\
}
\
} while(0)
@@ -361,29 +451,26 @@
#define CTrapezoids_Count(t) ((t).count)
#define CTrapezoids_Trapezoids(t) ((t).trapezoids)
-#define CGraphics_DefaultDpiX 96.0f
-#define CGraphics_DefaultDpiY 96.0f
+#define CGraphics_DefaultDpi 96.0f
#define CFiller_TOLERANCE 0.1f
-#define CStatus_Check(status) \
+#define CStatus_CheckGOTO(status, save, target)
\
do {
\
- const CStatus _status_ = (status);
\
- if(_status_ != CStatus_OK)
\
- {
\
- return _status_;
\
- }
\
+ if(((save) = (status)) != CStatus_OK) { goto target; }
\
} while(0)
-#define CStatus_Require(cond, status) \
+#define CStatus_Check(status)
\
do {
\
- if(!(cond))
\
- {
\
- return (status);
\
- }
\
+ const CStatus _status_ = (status);
\
+ if(_status_ != CStatus_OK) { return _status_; }
\
+ } while(0)
+#define CStatus_Require(cond, status)
\
+ do {
\
+ if(!(cond)) { return (status); }
\
} while(0)
#ifdef __cplusplus
};
#endif
-#endif /* _C_LIBRARYINTERNAL_H_ */
+#endif /* _CRAYONS_INTERNAL_H_ */
Index: libCrayons/include/Makefile.am
diff -u libCrayons/include/Makefile.am:1.2 libCrayons/include/Makefile.am:1.3
--- libCrayons/include/Makefile.am:1.2 Mon Oct 17 21:01:36 2005
+++ libCrayons/include/Makefile.am Mon Mar 6 20:05:14 2006
@@ -1,46 +1,61 @@
## Process this file with automake to produce Makefile.in
-noinst_HEADERS = CrayonsInternal.h \
- CAffineTransform.h \
- CBezier.h \
- CBitmap.h \
- CBitmapSurface.h \
- CBlend.h \
- CBrush.h \
- CColorPalette.h \
- CFiller.h \
- CFlattener.h \
- CGraphics.h \
- CGraphicsPipeline.h \
- CHatchBrush.h \
- CImage.h \
- CLineBrush.h \
- CMath.h \
- CMatrix.h \
- CMutex.h \
- CNoThreadMutex.h \
- CPThreadMutex.h \
- CPathBrush.h \
- CPath.h \
- CPathInterpreter.h \
- CPen.h \
- CPointArray.h \
- CPolygon.h \
- CRegion.h \
- CRegionCloner.h \
- CRegionDisposer.h \
- CRegionInterpreter.h \
- CRegionRasterizer.h \
- CRegionStack.h \
- CRegionTransformer.h \
- CRegionTranslator.h \
- CSolidBrush.h \
- CStringFormat.h \
- CStroker.h \
- CSurface.h \
- CTextureBrush.h \
- CTrapezoids.h \
- CUtils.h \
- CX11Surface.h
+libCrayonsincludedir = $(includedir)/crayons
+libCrayonsinclude_HEADERS = \
+ Crayons.h \
+ CrayonsFeatures.h \
+ CrayonsSurfaceX11.h
-libcrayonsincludedir = $(includedir)
-libcrayonsinclude_HEADERS = Crayons.h CrayonsConfig.h
+noinst_HEADERS = \
+ CrayonsConfig.h \
+ CrayonsInternal.h \
+ CAffineTransform.h \
+ CBezier.h \
+ CBitmap.h \
+ CBitmapSurface.h \
+ CBlend.h \
+ CBrush.h \
+ CCache.h \
+ CColorPalette.h \
+ CFiller.h \
+ CFlattener.h \
+ CFont.h \
+ CFontCollection.h \
+ CFontFace.h \
+ CFontFamily.h \
+ CFontFamilyTable.h \
+ CGlyphCache.h \
+ CGraphics.h \
+ CGraphicsPipeline.h \
+ CHashTable.h \
+ CHatchBrush.h \
+ CImage.h \
+ CLineBrush.h \
+ CMath.h \
+ CMatrix.h \
+ CMutex.h \
+ CNoThreadMutex.h \
+ CPThreadMutex.h \
+ CPathBrush.h \
+ CPath.h \
+ CPathInterpreter.h \
+ CPen.h \
+ CPointArray.h \
+ CPolygon.h \
+ CRegion.h \
+ CRegionCloner.h \
+ CRegionDisposer.h \
+ CRegionInterpreter.h \
+ CRegionRasterizer.h \
+ CRegionStack.h \
+ CRegionTransformer.h \
+ CRegionTranslator.h \
+ CSolidBrush.h \
+ CStringFormat.h \
+ CStroker.h \
+ CSurface.h \
+ CTempFileList.h \
+ CTextureBrush.h \
+ CTrapezoids.h \
+ CUnicodeHashTable.h \
+ CUtils.h \
+ CX11Surface.h
Index: libCrayons/missing
diff -u libCrayons/missing:1.1.1.1 libCrayons/missing:1.2
--- libCrayons/missing:1.1.1.1 Mon Oct 17 18:19:16 2005
+++ libCrayons/missing Mon Mar 6 20:05:14 2006
@@ -1,7 +1,7 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
-# Copyright (C) 1996, 1997, 2001, 2002 Free Software Foundation, Inc.
-# Franc,ois Pinard <address@hidden>, 1996.
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 Free Software Foundation,
Inc.
+# Originally by Fran,cois Pinard <address@hidden>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,20 +18,38 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
+run=:
+
# In the cases where this matters, `missing' is being run in the
# srcdir already.
-if test -f configure.in; then
+if test -f configure.ac; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
case "$1" in
+--run)
+ # Try to run requested program, and just exit if it succeeds.
+ run=
+ shift
+ "$@" && exit 0
+ ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
-h|--h|--he|--hel|--help)
echo "\
@@ -43,6 +61,7 @@
Options:
-h, --help display this help and exit
-v, --version output version information and exit
+ --run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
@@ -51,13 +70,15 @@
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
+ help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
+ tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
- echo "missing - GNU libit 0.0"
+ echo "missing 0.4 - GNU automake"
;;
-*)
@@ -67,30 +88,45 @@
;;
aclocal*)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
- you modified \`acinclude.m4' or \`$configure_ac'. You might want
+ you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
- you modified \`$configure_ac'. You might want to install the
+ you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
- you modified \`acconfig.h' or \`$configure_ac'. You might want
+ you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
- files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' $configure_ac`
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p'
${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
@@ -104,9 +140,14 @@
;;
automake*)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
- you modified \`Makefile.am', \`acinclude.m4' or \`$configure_ac'.
+ you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
@@ -114,6 +155,34 @@
while read f; do touch "$f"; done
;;
+ autom4te)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+ system. You might have modified some files without having the
+ proper tools for further handling them.
+ You can get \`$1' as part of \`Autoconf' from any GNU
+ archive site."
+
+ file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
+ test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo "#! /bin/sh"
+ echo "# Created by GNU Automake missing as a replacement of"
+ echo "# $ $@"
+ echo "exit 0"
+ chmod +x $file
+ exit 1
+ fi
+ ;;
+
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
@@ -167,7 +236,37 @@
fi
;;
+ help2man)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ fi
+
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a dependency of a manual page. You may need the
+ \`Help2man' package in order for those modifications to take
+ effect. You can get \`Help2man' from any GNU archive site."
+
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
+ fi
+ if [ -f "$file" ]; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo ".ab help2man is required to generate this page"
+ exit 1
+ fi
+ ;;
+
makeinfo)
+ if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
+ # We have makeinfo, but it failed.
+ exit 1
+ fi
+
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
@@ -183,12 +282,51 @@
touch $file
;;
+ tar)
+ shift
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ fi
+
+ # We have already tried tar in the generic part.
+ # Look for gnutar/gtar before invocation to avoid ugly error
+ # messages.
+ if (gnutar --version > /dev/null 2>&1); then
+ gnutar "$@" && exit 0
+ fi
+ if (gtar --version > /dev/null 2>&1); then
+ gtar "$@" && exit 0
+ fi
+ firstarg="$1"
+ if shift; then
+ case "$firstarg" in
+ *o*)
+ firstarg=`echo "$firstarg" | sed s/o//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ case "$firstarg" in
+ *h*)
+ firstarg=`echo "$firstarg" | sed s/h//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ fi
+
+ echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+ You may want to install GNU tar or Free paxutils, or check the
+ command line arguments."
+ exit 1
+ ;;
+
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
- it often tells you about the needed prerequirements for installing
+ it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
Index: libCrayons/samples/Makefile.am
diff -u libCrayons/samples/Makefile.am:1.3 libCrayons/samples/Makefile.am:1.4
--- libCrayons/samples/Makefile.am:1.3 Sun Dec 11 13:11:09 2005
+++ libCrayons/samples/Makefile.am Mon Mar 6 20:05:14 2006
@@ -1,12 +1,11 @@
+## Process this file with automake to produce Makefile.in
+noinst_PROGRAMS = sampleX11
-noinst_PROGRAMS = sample1
-
-sample1_SOURCES = sample1.c
-sample1_LDADD = $(top_builddir)/src/libCrayons.la
-sample1_DEPENDENCIES = $(top_builddir)/src/libCrayons.la
-
-AM_CFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -I. -I$(srcdir) \
--I/usr/X11R6/include -L/usr/X11R6/lib -lX11
-AM_CXXFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -I.
-I$(srcdir) \
--I/usr/X11R6/include -L/usr/X11R6/lib -lX11
+if CRAYONS_X11_ENABLED
+sampleX11_SOURCES = sampleX11.c
+endif
+sampleX11_LDFLAGS = $(CRAYONS_LDFLAGS)
+sampleX11_LDADD = $(top_builddir)/src/libCrayons.la
+sampleX11_DEPENDENCIES = $(top_builddir)/src/libCrayons.la
+sampleX11_CFLAGS = $(CRAYONS_CFLAGS)
Index: libCrayons/src/.cvsignore
diff -u libCrayons/src/.cvsignore:1.2 libCrayons/src/.cvsignore:1.3
--- libCrayons/src/.cvsignore:1.2 Mon Oct 17 21:11:18 2005
+++ libCrayons/src/.cvsignore Mon Mar 6 20:05:14 2006
@@ -2,5 +2,6 @@
Makefile.in
.libs
*.lo
+*.o
libCrayons.la
.deps
Index: libCrayons/src/CAffineTransform.c
diff -u libCrayons/src/CAffineTransform.c:1.2
libCrayons/src/CAffineTransform.c:1.3
--- libCrayons/src/CAffineTransform.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CAffineTransform.c Mon Mar 6 20:05:14 2006
@@ -26,33 +26,29 @@
#endif
/* Determine if the given transformations are equal. */
-CINTERNAL void
+CINTERNAL CBool
CAffineTransformF_Equals(const CAffineTransformF *_this,
- const CAffineTransformF *other,
- CBool *eq)
+ const CAffineTransformF *other)
{
/* assertions */
CASSERT((_this != 0));
CASSERT((other != 0));
- CASSERT((eq != 0));
- /* determine equality */
- *eq = !CMemCmp(_this, other, sizeof(CAffineTransformF));
+ /* determine and return equality */
+ return !CMemCmp(_this, other, sizeof(CAffineTransformF));
}
/* Determine if the given transformations are not equal. */
-CINTERNAL void
+CINTERNAL CBool
CAffineTransformF_NotEquals(const CAffineTransformF *_this,
- const CAffineTransformF *other,
- CBool *ne)
+ const CAffineTransformF *other)
{
/* assertions */
CASSERT((_this != 0));
CASSERT((other != 0));
- CASSERT((ne != 0));
- /* determine inequality */
- *ne = !(!CMemCmp(_this, other, sizeof(CAffineTransformF)));
+ /* determine and return inequality */
+ return !(!CMemCmp(_this, other, sizeof(CAffineTransformF)));
}
/* Set this transformation to the identity transformation. */
@@ -69,10 +65,10 @@
/* Set this transformation to warp to a parallelogram. */
CINTERNAL CStatus
CAffineTransformF_SetParallelogram(CAffineTransformF *_this,
- CRectangleF rect,
- CPointF tl,
- CPointF tr,
- CPointF bl)
+ CRectangleF rect,
+ CPointF tl,
+ CPointF tr,
+ CPointF bl)
{
/* assertions */
CASSERT((_this != 0));
@@ -109,12 +105,12 @@
/* Set the elements of this transformation. */
CINTERNAL void
CAffineTransformF_SetElements(CAffineTransformF *_this,
- CFloat m11,
- CFloat m12,
- CFloat m21,
- CFloat m22,
- CFloat dx,
- CFloat dy)
+ CFloat m11,
+ CFloat m12,
+ CFloat m21,
+ CFloat m22,
+ CFloat dx,
+ CFloat dy)
{
/* assertions */
CASSERT((_this != 0));
@@ -129,21 +125,20 @@
}
/* Get the determinant of this transformation. */
-CINTERNAL void
-CAffineTransformF_GetDeterminant(const CAffineTransformF *_this,
- CFloat *determinant)
+CINTERNAL CFloat
+CAffineTransformF_GetDeterminant(const CAffineTransformF *_this)
{
/* assertions */
CASSERT((_this != 0));
- /* calculate the determinant */
- *determinant = ((_this->m11 * _this->m22) - (_this->m12 * _this->m21));
+ /* calculate and return the determinant */
+ return ((_this->m11 * _this->m22) - (_this->m12 * _this->m21));
}
/* Get the inverse of this transformation. */
CINTERNAL CStatus
CAffineTransformF_GetInverse(const CAffineTransformF *_this,
- CAffineTransformF *inverse)
+ CAffineTransformF *inverse)
{
/* declarations */
CFloat determinant;
@@ -152,7 +147,7 @@
CASSERT((_this != 0));
/* get the determinant */
- CAffineTransformF_GetDeterminant(_this, &determinant);
+ determinant = CAffineTransformF_GetDeterminant(_this);
/* ensure the transformation is invertible */
CStatus_Require
@@ -178,8 +173,8 @@
/* Multiply this transformation with another. */
CINTERNAL void
CAffineTransformF_Multiply(CAffineTransformF *_this,
- const CAffineTransformF *other,
- CMatrixOrder order)
+ const CAffineTransformF *other,
+ CMatrixOrder order)
{
/* declarations */
CAffineTransformF t1;
@@ -213,8 +208,8 @@
/* Inverse multiply this transformation with another. */
CINTERNAL CStatus
CAffineTransformF_MultiplyInverse(CAffineTransformF *_this,
- const CAffineTransformF *other,
- CMatrixOrder order)
+ const CAffineTransformF *other,
+ CMatrixOrder order)
{
/* declarations */
CAffineTransformF t1;
@@ -255,8 +250,8 @@
/* Rotate a transformation. */
CINTERNAL void
CAffineTransformF_Rotate(CAffineTransformF *_this,
- CFloat angle,
- CMatrixOrder order)
+ CFloat angle,
+ CMatrixOrder order)
{
/* declarations */
CAffineTransformF rotate;
@@ -286,8 +281,8 @@
/* Inverse rotate a transformation. */
CINTERNAL void
CAffineTransformF_RotateInverse(CAffineTransformF *_this,
- CFloat angle,
- CMatrixOrder order)
+ CFloat angle,
+ CMatrixOrder order)
{
/* declarations */
CAffineTransformF rotate;
@@ -327,12 +322,12 @@
/* Scale a transformation. */
CINTERNAL void
CAffineTransformF_Scale(CAffineTransformF *_this,
- CFloat scaleX,
- CFloat scaleY,
- CMatrixOrder order)
+ CFloat scaleX,
+ CFloat scaleY,
+ CMatrixOrder order)
{
/*\
- |*| NOTE: technically we could just multiply with an
+ |*| NOTE: technically we could just multiply with a
|*| CAffineTransformF(scaleX, 0, 0, scaleY, 0, 0),
|*| but this is more efficient
\*/
@@ -362,9 +357,9 @@
/* Inverse scale a transformation. */
CINTERNAL void
CAffineTransformF_ScaleInverse(CAffineTransformF *_this,
- CFloat scaleX,
- CFloat scaleY,
- CMatrixOrder order)
+ CFloat scaleX,
+ CFloat scaleY,
+ CMatrixOrder order)
{
/* declarations */
CDouble sx;
@@ -399,9 +394,9 @@
/* Extract the scaling factors from, then unscale, this transformation. */
CINTERNAL void
CAffineTransformF_ExtractScale(CAffineTransformF *_this,
- CFloat *scaleX,
- CFloat *scaleY,
- CMatrixOrder order)
+ CFloat *scaleX,
+ CFloat *scaleY,
+ CMatrixOrder order)
{
/* declarations */
CFloat m11;
@@ -423,7 +418,7 @@
m22 = _this->m22;
/* get the determinant */
- CAffineTransformF_GetDeterminant(_this, &determinant);
+ determinant = CAffineTransformF_GetDeterminant(_this);
/* calculate the horizontal scaling factor */
*scaleX = CMath_Sqrt((m11 * m11) + (m12 * m12));
@@ -465,12 +460,12 @@
/* Shear a transformation. */
CINTERNAL void
CAffineTransformF_Shear(CAffineTransformF *_this,
- CFloat shearX,
- CFloat shearY,
- CMatrixOrder order)
+ CFloat shearX,
+ CFloat shearY,
+ CMatrixOrder order)
{
/*\
- |*| NOTE: technically we could just multiply with an
+ |*| NOTE: technically we could just multiply with a
|*| CAffineTransformF(1, shearX, shearY, 1, 0, 0),
|*| but this is more efficient
\*/
@@ -511,12 +506,12 @@
/* Translate a transformation. */
CINTERNAL void
CAffineTransformF_Translate(CAffineTransformF *_this,
- CFloat offsetX,
- CFloat offsetY,
- CMatrixOrder order)
+ CFloat offsetX,
+ CFloat offsetY,
+ CMatrixOrder order)
{
/*\
- |*| NOTE: technically we could just multiply with an
+ |*| NOTE: technically we could just multiply with a
|*| CAffineTransformF(1, 0, 0, 1, offsetX, offsetY),
|*| but this is more efficient
\*/
@@ -540,9 +535,9 @@
/* Inverse translate a transformation. */
CINTERNAL void
CAffineTransformF_TranslateInverse(CAffineTransformF *_this,
- CFloat offsetX,
- CFloat offsetY,
- CMatrixOrder order)
+ CFloat offsetX,
+ CFloat offsetY,
+ CMatrixOrder order)
{
/* assertions */
CASSERT((_this != 0));
@@ -563,8 +558,8 @@
/* Transform a list of points. */
CINTERNAL void
CAffineTransformF_TransformPoints(const CAffineTransformF *_this,
- CPointF *points,
- CUInt32 count)
+ CPointF *points,
+ CUInt32 count)
{
/* assertions */
CASSERT((_this != 0));
@@ -600,8 +595,8 @@
/* Transform a list of vectors. */
CINTERNAL void
CAffineTransformF_TransformVectors(const CAffineTransformF *_this,
- CPointF *points,
- CUInt32 count)
+ CPointF *points,
+ CUInt32 count)
{
/* assertions */
CASSERT((_this != 0));
@@ -636,8 +631,8 @@
CINTERNAL void
CVectorF_ScalePoints(const CVectorF *_this,
- CPointF *points,
- CUInt32 count)
+ CPointF *points,
+ CUInt32 count)
{
/* assertions */
CASSERT((_this != 0));
@@ -667,8 +662,8 @@
CINTERNAL void
CVectorF_TranslatePoints(const CVectorF *_this,
- CPointF *points,
- CUInt32 count)
+ CPointF *points,
+ CUInt32 count)
{
/* assertions */
CASSERT((_this != 0));
Index: libCrayons/src/CBezier.c
diff -u libCrayons/src/CBezier.c:1.2 libCrayons/src/CBezier.c:1.3
--- libCrayons/src/CBezier.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CBezier.c Mon Mar 6 20:05:14 2006
@@ -26,10 +26,10 @@
CINTERNAL CBool
CBezierX_Initialize(CBezierX *_this,
- CPointX *a,
- CPointX *b,
- CPointX *c,
- CPointX *d)
+ CPointX *a,
+ CPointX *b,
+ CPointX *c,
+ CPointX *d)
{
/* assertions */
CASSERT((_this != 0));
@@ -57,10 +57,10 @@
CINTERNAL CBool
CBezierF_Initialize(CBezierF *_this,
- CPointF *a,
- CPointF *b,
- CPointF *c,
- CPointF *d)
+ CPointF *a,
+ CPointF *b,
+ CPointF *c,
+ CPointF *d)
{
/* assertions */
CASSERT((_this != 0));
@@ -109,7 +109,7 @@
static CMATH CPointX
CBezierX_Midpoint(CPointX start,
- CPointX end)
+ CPointX end)
{
/* initialize the midpoint to the start point */
CPointX middle = start;
@@ -124,7 +124,7 @@
static CMATH CPointF
CBezierF_Midpoint(CPointF start,
- CPointF end)
+ CPointF end)
{
/* initialize the midpoint to the start point */
CPointF middle = start;
@@ -139,8 +139,8 @@
static void
CBezierX_DeCasteljau(CBezierX *_this,
- CBezierX *start,
- CBezierX *end)
+ CBezierX *start,
+ CBezierX *end)
{
/* assertions */
CASSERT((_this != 0));
@@ -183,8 +183,8 @@
static void
CBezierF_DeCasteljau(CBezierF *_this,
- CBezierF *start,
- CBezierF *end)
+ CBezierF *start,
+ CBezierF *end)
{
/* assertions */
CASSERT((_this != 0));
@@ -227,8 +227,8 @@
static CMATH CDouble
CBezierX_DistanceToLine(CPointX p,
- CPointX start,
- CPointX end)
+ CPointX start,
+ CPointX end)
{
/* declarations */
CDouble u;
@@ -306,8 +306,8 @@
static CMATH CDouble
CBezierF_DistanceToLine(CPointF p,
- CPointF start,
- CPointF end)
+ CPointF start,
+ CPointF end)
{
/* declarations */
CDouble u;
@@ -385,7 +385,7 @@
static CBool
CBezierX_IsInTolerance(CBezierX *_this,
- CDouble tSquared)
+ CDouble tSquared)
{
/* assertions */
CASSERT((_this != 0));
@@ -410,7 +410,7 @@
static CBool
CBezierF_IsInTolerance(CBezierF *_this,
- CDouble tSquared)
+ CDouble tSquared)
{
/* assertions */
CASSERT((_this != 0));
@@ -435,8 +435,8 @@
static CStatus
CBezierX_FlattenR(CBezierX *_this,
- CPointArrayX *array,
- CDouble tSquared)
+ CPointArrayX *array,
+ CDouble tSquared)
{
/* declarations */
CBezierX w;
@@ -471,8 +471,8 @@
static CStatus
CBezierF_FlattenR(CBezierF *_this,
- CPointArrayF *array,
- CDouble tSquared)
+ CPointArrayF *array,
+ CDouble tSquared)
{
/* declarations */
CBezierF w;
@@ -507,8 +507,8 @@
CINTERNAL CStatus
CBezierX_Flatten(CBezierX *_this,
- CPointArrayX *array,
- CDouble tolerance)
+ CPointArrayX *array,
+ CDouble tolerance)
{
/* assertions */
CASSERT((_this != 0));
@@ -536,8 +536,8 @@
CINTERNAL CStatus
CBezierF_Flatten(CBezierF *_this,
- CPointArrayF *array,
- CDouble tolerance)
+ CPointArrayF *array,
+ CDouble tolerance)
{
/* assertions */
CASSERT((_this != 0));
Index: libCrayons/src/CBitmap.c
diff -u libCrayons/src/CBitmap.c:1.2 libCrayons/src/CBitmap.c:1.3
--- libCrayons/src/CBitmap.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CBitmap.c Mon Mar 6 20:05:14 2006
@@ -28,9 +28,9 @@
/* Initialize this bitmap. */
static CStatus
CBitmap_Initialize(CBitmap *_this,
- CUInt32 width,
- CUInt32 height,
- CPixelFormat format)
+ CUInt32 width,
+ CUInt32 height,
+ CPixelFormat format)
{
/* declarations */
pixman_format_t *fmt;
@@ -43,8 +43,8 @@
_this->format = CImageFormat_MemoryBMP;
_this->flags = CImageFlag_None;
_this->pixelFormat = format;
- _this->dpiX = CGraphics_DefaultDpiX;
- _this->dpiY = CGraphics_DefaultDpiY;
+ _this->dpiX = CGraphics_DefaultDpi;
+ _this->dpiY = CGraphics_DefaultDpi;
_this->width = width;
_this->height = height;
_this->bitmapDataX = 0;
@@ -103,16 +103,16 @@
#if 0
CStatus
CBitmap_CreateStream(CBitmap **_this,
- CStream *stream,
- CBool useICM)
+ CStream *stream,
+ CBool useICM)
{
/* TODO */
return CStatus_NotImplemented;
}
CStatus
CBitmap_CreateFile(CBitmap **_this,
- CChar16 *filename,
- CBool useICM)
+ CChar16 *filename,
+ CBool useICM)
{
/* TODO */
return CStatus_NotImplemented;
@@ -121,9 +121,9 @@
CStatus
CBitmap_Create(CBitmap **_this,
- CUInt32 width,
- CUInt32 height,
- CPixelFormat format)
+ CUInt32 width,
+ CUInt32 height,
+ CPixelFormat format)
{
/* declarations */
CStatus status;
@@ -154,11 +154,11 @@
CStatus
CBitmap_CreateData(CBitmap **_this,
- CByte *data,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride,
- CPixelFormat format)
+ CByte *data,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride,
+ CPixelFormat format)
{
/* declarations */
CStatus status;
@@ -198,12 +198,12 @@
/* Clone this bitmap and transform it into a new pixel format. */
CStatus
CBitmap_Clone(CBitmap *_this,
- CBitmap **clone,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CPixelFormat format)
+ CBitmap **clone,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CPixelFormat format)
{
/* declarations */
CStatus status;
@@ -230,9 +230,9 @@
/* Get the color of a specific pixel. */
CStatus
CBitmap_GetPixel(CBitmap *_this,
- CUInt32 x,
- CUInt32 y,
- CColor *color)
+ CUInt32 x,
+ CUInt32 y,
+ CColor *color)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -300,9 +300,9 @@
/* Set a pixel within this bitmap. */
CStatus
CBitmap_SetPixel(CBitmap *_this,
- CUInt32 x,
- CUInt32 y,
- CColor color)
+ CUInt32 x,
+ CUInt32 y,
+ CColor color)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -366,12 +366,12 @@
/* Make the bitmap data from the current image data. */
static CStatus
CBitmap_MakeBitmapData(CBitmap *_this,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CImageLockMode lockMode,
- CPixelFormat format)
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CImageLockMode lockMode,
+ CPixelFormat format)
{
/* declarations */
CUInt32 stride;
@@ -493,13 +493,13 @@
/* Lock a region of this bitmap. */
CStatus
CBitmap_LockBits(CBitmap *_this,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CImageLockMode lockMode,
- CPixelFormat format,
- CBitmapData *bitmapData)
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CImageLockMode lockMode,
+ CPixelFormat format,
+ CBitmapData *bitmapData)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -544,8 +544,8 @@
/* Set the resolution for this bitmap. */
CStatus
CBitmap_SetResolution(CBitmap *_this,
- CFloat dpiX,
- CFloat dpiY)
+ CFloat dpiX,
+ CFloat dpiY)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -573,7 +573,7 @@
/* Unlock the bits within this bitmap. */
CStatus
CBitmap_UnlockBits(CBitmap *_this,
- CBitmapData *bitmapData)
+ CBitmapData *bitmapData)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
Index: libCrayons/src/CBitmapSurface.c
diff -u libCrayons/src/CBitmapSurface.c:1.2 libCrayons/src/CBitmapSurface.c:1.3
--- libCrayons/src/CBitmapSurface.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CBitmapSurface.c Mon Mar 6 20:05:14 2006
@@ -27,7 +27,7 @@
CStatus
CBitmapSurface_Create(CBitmapSurface **_this,
- CBitmap *image)
+ CBitmap *image)
{
/* ensure we have a this pointer pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -79,14 +79,14 @@
}
static CStatus
-CBitmapSurface_Composite(CSurface *_this,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- pixman_image_t *src,
- pixman_image_t *mask,
- pixman_operator_t op)
+CBitmapSurface_Composite(CSurface *_this,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ pixman_image_t *src,
+ pixman_image_t *mask,
+ pixman_operator_t op)
{
/* declarations */
CBitmap *image;
@@ -121,10 +121,10 @@
static CStatus
CBitmapSurface_Clear(CSurface *_this,
- CColor color)
+ CColor color)
{
/* declarations */
- CBitmap *image;
+ CBitmap *image;
pixman_color_t pixel;
/* assertions */
@@ -159,7 +159,7 @@
static CStatus
CBitmapSurface_Flush(CSurface *_this,
- CFlushIntention intention)
+ CFlushIntention intention)
{
/* assertions */
CASSERT((_this != 0));
@@ -170,6 +170,56 @@
return CStatus_OK;
}
+static CStatus
+CBitmapSurface_GetDpiX(CSurface *_this,
+ CFloat *dpiX)
+{
+ /* declarations */
+ CBitmap *image;
+
+ /* assertions */
+ CASSERT((_this != 0));
+ CASSERT((dpiX != 0));
+
+ /* get the image */
+ image = ((CBitmapSurface *)_this)->image;
+
+ /* get the horizontal resolution, synchronously */
+ CMutex_Lock(image->lock);
+ {
+ *dpiX = image->dpiX;
+ }
+ CMutex_Unlock(image->lock);
+
+ /* return successfully */
+ return CStatus_OK;
+}
+
+static CStatus
+CBitmapSurface_GetDpiY(CSurface *_this,
+ CFloat *dpiY)
+{
+ /* declarations */
+ CBitmap *image;
+
+ /* assertions */
+ CASSERT((_this != 0));
+ CASSERT((dpiY != 0));
+
+ /* get the image */
+ image = ((CBitmapSurface *)_this)->image;
+
+ /* get the vertical resolution, synchronously */
+ CMutex_Lock(image->lock);
+ {
+ *dpiY = image->dpiY;
+ }
+ CMutex_Unlock(image->lock);
+
+ /* return successfully */
+ return CStatus_OK;
+}
+
static void
CBitmapSurface_Finalize(CSurface *_this)
{
Index: libCrayons/src/CBlend.c
diff -u libCrayons/src/CBlend.c:1.2 libCrayons/src/CBlend.c:1.3
--- libCrayons/src/CBlend.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CBlend.c Mon Mar 6 20:05:14 2006
@@ -27,7 +27,7 @@
CINTERNAL CStatus
CBlend_Initialize(CBlend *_this,
- CUInt32 count)
+ CUInt32 count)
{
/* assertions */
CASSERT((_this != 0));
@@ -55,7 +55,7 @@
CINTERNAL CStatus
CBlend_Copy(CBlend *_this,
- CBlend *copy)
+ CBlend *copy)
{
/* assertions */
CASSERT((_this != 0));
@@ -104,8 +104,8 @@
CINTERNAL void
CBlend_SetTriangularShape(CBlend *_this,
- CFloat focus,
- CFloat scale)
+ CFloat focus,
+ CFloat scale)
{
/* declarations */
CFloat *currF;
@@ -168,8 +168,8 @@
CINTERNAL void
CBlend_SetSigmaBellShape(CBlend *_this,
- CFloat focus,
- CFloat scale)
+ CFloat focus,
+ CFloat scale)
{
/*\
|*| NOTE: The cumulative distribution function of the standard normal
@@ -420,7 +420,7 @@
CINTERNAL CStatus
CColorBlend_Copy(CColorBlend *_this,
- CColorBlend *copy)
+ CColorBlend *copy)
{
/* assertions */
CASSERT((_this != 0));
Index: libCrayons/src/CBrush.c
diff -u libCrayons/src/CBrush.c:1.2 libCrayons/src/CBrush.c:1.3
--- libCrayons/src/CBrush.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CBrush.c Mon Mar 6 20:05:14 2006
@@ -29,7 +29,7 @@
/* Initialize this brush. */
CINTERNAL void
CBrush_Initialize(CBrush *_this,
- const CBrushClass *_class)
+ const CBrushClass *_class)
{
/* assertions */
CASSERT((_this != 0));
@@ -43,7 +43,7 @@
/* Get the type of this brush. */
CStatus
CBrush_GetBrushType(CBrush *_this,
- CBrushType *type)
+ CBrushType *type)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -61,7 +61,7 @@
/* Clone this brush. */
CStatus
CBrush_Clone(CBrush *_this,
- CBrush **clone)
+ CBrush **clone)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -93,6 +93,9 @@
(*_this)->pattern.image = 0;
}
+ /* dispose of the brush */
+ CFree(*_this);
+
/* null the this pointer */
*_this = 0;
@@ -118,7 +121,7 @@
/* Get a pattern for this brush. */
CINTERNAL CStatus
CBrush_GetPattern(CBrush *_this,
- CPattern *pattern)
+ CPattern *pattern)
{
/* assertions */
CASSERT((_this != 0));
Index: libCrayons/src/CColorPalette.c
diff -u libCrayons/src/CColorPalette.c:1.2 libCrayons/src/CColorPalette.c:1.3
--- libCrayons/src/CColorPalette.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CColorPalette.c Mon Mar 6 20:05:14 2006
@@ -26,9 +26,9 @@
CStatus
CColorPalette_Create(CColorPalette **_this,
- CColor *colors,
- CUInt32 count,
- CPaletteFlag flags)
+ CColor *colors,
+ CUInt32 count,
+ CPaletteFlag flags)
{
/* ensure we have a this pointer pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -91,7 +91,7 @@
CINTERNAL CBool
CColorPalette_CheckFormat(CColorPalette *_this,
- CPixelFormat format)
+ CPixelFormat format)
{
/* assertions */
CASSERT((_this != 0));
@@ -108,7 +108,7 @@
CINTERNAL CColor
CColorPalette_GetColor(CColorPalette *_this,
- CUInt32 index)
+ CUInt32 index)
{
/* assertions */
CASSERT((_this != 0));
@@ -120,7 +120,7 @@
CINTERNAL CUInt32
CColorPalette_FindBestMatch(CColorPalette *_this,
- CColor color)
+ CColor color)
{
/* declarations */
CByte a;
Index: libCrayons/src/CFiller.c
diff -u libCrayons/src/CFiller.c:1.2 libCrayons/src/CFiller.c:1.3
--- libCrayons/src/CFiller.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CFiller.c Mon Mar 6 20:05:14 2006
@@ -28,9 +28,9 @@
static CStatus
CFiller_Move(CPathInterpreter *_this,
- CFloat x,
- CFloat y,
- CPathType type)
+ CFloat x,
+ CFloat y,
+ CPathType type)
{
/* declarations */
CPolygonX *polygon;
@@ -62,9 +62,9 @@
static CStatus
CFiller_Line(CPathInterpreter *_this,
- CFloat x,
- CFloat y,
- CPathType type)
+ CFloat x,
+ CFloat y,
+ CPathType type)
{
/* declarations */
CPolygonX *polygon;
@@ -91,13 +91,13 @@
static CStatus
CFiller_Curve(CPathInterpreter *_this,
- CFloat x1,
- CFloat y1,
- CFloat x2,
- CFloat y2,
- CFloat x3,
- CFloat y3,
- CPathType type)
+ CFloat x1,
+ CFloat y1,
+ CFloat x2,
+ CFloat y2,
+ CFloat x3,
+ CFloat y3,
+ CPathType type)
{
/* declarations */
CPointArrayX *array;
@@ -223,10 +223,10 @@
CINTERNAL CStatus
CFiller_ToPolygon(CFiller *_this,
- CPolygonX *polygon,
- const CPointF *points,
- const CByte *types,
- CUInt32 count)
+ CPolygonX *polygon,
+ const CPointF *points,
+ const CByte *types,
+ CUInt32 count)
{
/* declarations */
CPathInterpreter *interpreter;
@@ -273,11 +273,11 @@
CINTERNAL CStatus
CFiller_ToTrapezoids(CFiller *_this,
- CTrapezoids *trapezoids,
- const CPointF *points,
- const CByte *types,
- CUInt32 count,
- CFillMode fillMode)
+ CTrapezoids *trapezoids,
+ const CPointF *points,
+ const CByte *types,
+ CUInt32 count,
+ CFillMode fillMode)
{
/* declarations */
CPathInterpreter *interpreter;
Index: libCrayons/src/CFlattener.c
diff -u libCrayons/src/CFlattener.c:1.2 libCrayons/src/CFlattener.c:1.3
--- libCrayons/src/CFlattener.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CFlattener.c Mon Mar 6 20:05:14 2006
@@ -27,7 +27,7 @@
static CStatus
CFlattener_EnsureCapacity(CFlattener *_this,
- CUInt32 minimum)
+ CUInt32 minimum)
{
/* assertions */
CASSERT((_this != 0));
@@ -57,10 +57,10 @@
CINTERNAL void
CFlattener_Finalize(CFlattener *_this,
- CPointF **points,
- CByte **types,
- CUInt32 *count,
- CUInt32 *capacity)
+ CPointF **points,
+ CByte **types,
+ CUInt32 *count,
+ CUInt32 *capacity)
{
/* assertions */
CASSERT((_this != 0));
@@ -103,10 +103,10 @@
CINTERNAL CStatus
CFlattener_Flatten(CFlattener *_this,
- CPointF *points,
- CByte *types,
- CUInt32 count,
- CFloat tolerance)
+ CPointF *points,
+ CByte *types,
+ CUInt32 count,
+ CFloat tolerance)
{
/* declarations */
CByte *srcT;
@@ -145,10 +145,10 @@
CStatus_Check(CFlattener_EnsureCapacity(_this, count));
/* get the type output pointer */
- dstT = types;
+ dstT = _this->types;
/* get the point output pointer */
- dstP = points;
+ dstP = _this->points;
/* flatten the path */
while(srcP != end)
@@ -283,6 +283,9 @@
++srcP; ++srcT; ++srcN;
}
+ /* set the count */
+ _this->count = dstN;
+
/* return successfully */
return CStatus_OK;
}
Index: libCrayons/src/CGraphics.c
diff -u libCrayons/src/CGraphics.c:1.2 libCrayons/src/CGraphics.c:1.3
--- libCrayons/src/CGraphics.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CGraphics.c Mon Mar 6 20:05:14 2006
@@ -21,6 +21,7 @@
#include "CGraphics.h"
#include "CBrush.h"
#include "CFiller.h"
+#include "CFont.h"
#include "CImage.h"
#include "CMatrix.h"
#include "CPath.h"
@@ -46,7 +47,7 @@
/* Create a graphics context. */
CStatus
CGraphics_Create(CGraphics **_this,
- CSurface *surface)
+ CSurface *surface)
{
/* ensure we have a this pointer pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -99,6 +100,9 @@
return status;
}
+ /* reference the surface */
+ CSurface_Reference(surface);
+
/* initialize the remaining members */
gc->surface = surface;
gc->compositingMode = CCompositingMode_SourceOver;
@@ -107,8 +111,8 @@
gc->pageScale = 1.0;
gc->interpolationMode = CInterpolationMode_Default;
gc->pixelOffsetMode = CPixelOffsetMode_Default;
- CPoint_X(gc->renderingOrigin) = 0;
- CPoint_Y(gc->renderingOrigin) = 0;
+ CPoint_X(gc->renderingOrigin) = 0;
+ CPoint_Y(gc->renderingOrigin) = 0;
gc->smoothingMode = CSmoothingMode_Default;
gc->textContrast = 0;
gc->textRenderingHint =
CTextRenderingHint_SystemDefault;
@@ -175,7 +179,7 @@
/* Get the transformation matrix of this graphics context. */
CStatus
CGraphics_GetTransform(CGraphics *_this,
- CMatrix *matrix)
+ CMatrix *matrix)
{
/* declarations */
CAffineTransformF t;
@@ -186,8 +190,12 @@
/* ensure we have a matrix pointer */
CStatus_Require((matrix != 0), CStatus_ArgumentNull);
- /* get the world transformation */
- CGraphicsPipeline_GetWorld(&(_this->pipeline), &t);
+ /* get the world transformation, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ CGraphicsPipeline_GetWorld(&(_this->pipeline), &t);
+ }
+ CSurface_Unlock(_this->surface);
/* set the matrix transformation */
CMatrix_SetTransform(matrix, &t);
@@ -199,11 +207,12 @@
/* Multiply the transformation matrix by another matrix. */
CStatus
CGraphics_MultiplyTransform(CGraphics *_this,
- CMatrix *matrix,
- CMatrixOrder order)
+ CMatrix *matrix,
+ CMatrixOrder order)
{
/* declarations */
CAffineTransformF t;
+ CStatus status;
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -214,13 +223,17 @@
/* get the matrix transformation */
CMatrix_GetTransform(matrix, &t);
- /* multiply the world transformation */
- CStatus_Check
- (CGraphicsPipeline_MultiplyWorld
- (&(_this->pipeline), &t, order));
+ /* multiply the world transformation, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ status =
+ CGraphicsPipeline_MultiplyWorld
+ (&(_this->pipeline), &t, order);
+ }
+ CSurface_Unlock(_this->surface);
- /* return successfully */
- return CStatus_OK;
+ /* return status */
+ return status;
}
/* Reset the transformation matrix of this graphics context. */
@@ -230,8 +243,12 @@
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
- /* reset the world transformation and inverse */
- CGraphicsPipeline_ResetWorld(&(_this->pipeline));
+ /* reset the world transformation and inverse, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ CGraphicsPipeline_ResetWorld(&(_this->pipeline));
+ }
+ CSurface_Unlock(_this->surface);
/* return successfully */
return CStatus_OK;
@@ -240,14 +257,18 @@
/* Rotate the transformation matrix of this graphics context. */
CStatus
CGraphics_RotateTransform(CGraphics *_this,
- CFloat angle,
- CMatrixOrder order)
+ CFloat angle,
+ CMatrixOrder order)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
- /* rotate the world transformation and inverse */
- CGraphicsPipeline_RotateWorld(&(_this->pipeline), angle, order);
+ /* rotate the world transformation and inverse, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ CGraphicsPipeline_RotateWorld(&(_this->pipeline), angle, order);
+ }
+ CSurface_Unlock(_this->surface);
/* return successfully */
return CStatus_OK;
@@ -256,15 +277,19 @@
/* Scale the transformation matrix of this graphics context. */
CStatus
CGraphics_ScaleTransform(CGraphics *_this,
- CFloat sx,
- CFloat sy,
- CMatrixOrder order)
+ CFloat sx,
+ CFloat sy,
+ CMatrixOrder order)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
- /* scale the world transformation and inverse */
- CGraphicsPipeline_ScaleWorld(&(_this->pipeline), sx, sy, order);
+ /* scale the world transformation and inverse, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ CGraphicsPipeline_ScaleWorld(&(_this->pipeline), sx, sy, order);
+ }
+ CSurface_Unlock(_this->surface);
/* return successfully */
return CStatus_OK;
@@ -273,10 +298,11 @@
/* Set the transformation matrix of this graphics context. */
CStatus
CGraphics_SetTransform(CGraphics *_this,
- CMatrix *matrix)
+ CMatrix *matrix)
{
/* declarations */
CAffineTransformF t;
+ CStatus status;
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -287,27 +313,33 @@
/* get the matrix transformation */
CMatrix_GetTransform(matrix, &t);
- /* set the world transformation */
- CStatus_Check
- (CGraphicsPipeline_SetWorld
- (&(_this->pipeline), &t));
+ /* set the world transformation, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ status = CGraphicsPipeline_SetWorld(&(_this->pipeline), &t);
+ }
+ CSurface_Unlock(_this->surface);
- /* return successfully */
- return CStatus_OK;
+ /* return status */
+ return status;
}
/* Translate the transformation matrix of this graphics context. */
CStatus
CGraphics_TranslateTransform(CGraphics *_this,
- CFloat dx,
- CFloat dy,
- CMatrixOrder order)
+ CFloat dx,
+ CFloat dy,
+ CMatrixOrder order)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
- /* translate the world transformation and inverse */
- CGraphicsPipeline_TranslateWorld(&(_this->pipeline), dx, dy, order);
+ /* translate the world transformation and inverse, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ CGraphicsPipeline_TranslateWorld(&(_this->pipeline), dx, dy,
order);
+ }
+ CSurface_Unlock(_this->surface);
/* return successfully */
return CStatus_OK;
@@ -333,8 +365,8 @@
/* Add a metafile comment. */
CStatus
CGraphics_AddMetafileComment(CGraphics *_this,
- CByte *data,
- CUInt32 count)
+ CByte *data,
+ CUInt32 count)
{
return CStatus_NotImplemented;
}
@@ -342,69 +374,69 @@
/* Enumerate the contents of a metafile. */
CStatus
CGraphics_EnumerateMetafile(CGraphics *_this,
- CMetafile *metafile,
- CPointF dst,
- CImageAttributes *atts,
- CMetafileEnumCallback callback,
- void *callbackData)
+ CMetafile *metafile,
+ CPointF dst,
+ CImageAttributes *atts,
+ CMetafileEnumCallback callback,
+ void *callbackData)
{
return CStatus_NotImplemented;
}
CStatus
CGraphics_EnumerateMetafile(CGraphics *_this,
- CMetafile *metafile,
- CPointF *dst,
- CUInt32 count,
- CImageAttributes *atts,
- CMetafileEnumCallback callback,
- void *callbackData)
+ CMetafile *metafile,
+ CPointF *dst,
+ CUInt32 count,
+ CImageAttributes *atts,
+ CMetafileEnumCallback callback,
+ void *callbackData)
{
return CStatus_NotImplemented;
}
CStatus
CGraphics_EnumerateMetafile(CGraphics *_this,
- CMetafile *metafile,
- CRectangleF dst,
- CImageAttributes *atts,
- CMetafileEnumCallback callback,
- void *callbackData)
+ CMetafile *metafile,
+ CRectangleF dst,
+ CImageAttributes *atts,
+ CMetafileEnumCallback callback,
+ void *callbackData)
{
return CStatus_NotImplemented;
}
CStatus
CGraphics_EnumerateMetafile(CGraphics *_this,
- CMetafile *metafile,
- CPointF dst,
- CRectangleF src,
- CGraphicsUnit srcUnit,
- CImageAttributes *atts,
- CMetafileEnumCallback callback,
- void *callbackData)
+ CMetafile *metafile,
+ CPointF dst,
+ CRectangleF src,
+ CGraphicsUnit srcUnit,
+ CImageAttributes *atts,
+ CMetafileEnumCallback callback,
+ void *callbackData)
{
return CStatus_NotImplemented;
}
CStatus
CGraphics_EnumerateMetafile(CGraphics *_this,
- CMetafile *metafile,
- CPointF *dst,
- CUInt32 count,
- CRectangleF src,
- CGraphicsUnit srcUnit,
- CImageAttributes *atts,
- CMetafileEnumCallback callback,
- void *callbackData)
+ CMetafile *metafile,
+ CPointF *dst,
+ CUInt32 count,
+ CRectangleF src,
+ CGraphicsUnit srcUnit,
+ CImageAttributes *atts,
+ CMetafileEnumCallback callback,
+ void *callbackData)
{
return CStatus_NotImplemented;
}
CStatus
CGraphics_EnumerateMetafile(CGraphics *_this,
- CMetafile *metafile,
- CRectangleF dst,
- CRectangleF src,
- CGraphicsUnit srcUnit,
- CImageAttributes *atts,
- CMetafileEnumCallback callback,
- void *callbackData)
+ CMetafile *metafile,
+ CRectangleF dst,
+ CRectangleF src,
+ CGraphicsUnit srcUnit,
+ CImageAttributes *atts,
+ CMetafileEnumCallback callback,
+ void *callbackData)
{
return CStatus_NotImplemented;
}
@@ -429,143 +461,168 @@
/* Get the clipping region of this graphics context. */
CStatus
CGraphics_GetClip(CGraphics *_this,
- CRegion *region)
+ CRegion *region)
{
+ /* declarations */
+ CStatus status;
+
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
- /* set the region to the clipping region */
- CStatus_Check
- (CRegion_CombineRegion
- (region, _this->clip, CCombineMode_Replace));
+ /* set the region to the clipping region, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ status =
+ CRegion_CombineRegion
+ (region, _this->clip, CCombineMode_Replace);
+ }
+ CSurface_Unlock(_this->surface);
- /* return successfully */
- return CStatus_OK;
+ /* return status */
+ return status;
}
/* Get the clipping bounds of this graphics context. */
CStatus
CGraphics_GetClipBounds(CGraphics *_this,
- CRectangleF *clipBounds)
+ CRectangleF *clipBounds)
{
+ /* declarations */
+ CStatus status;
+
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
- /* get the clipping bounds */
- CStatus_Check
- (CRegion_GetBounds
- (_this->clip, _this, clipBounds));
+ /* get the clipping bounds, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ status =
+ CRegion_GetBounds
+ (_this->clip, _this, clipBounds);
+ }
+ CSurface_Unlock(_this->surface);
- /* return successfully */
- return CStatus_OK;
+ /* return status */
+ return status;
}
/* Get the visible clipping bounds of this graphics context. */
CStatus
CGraphics_GetVisibleClipBounds(CGraphics *_this,
- CRectangleF *bounds)
+ CRectangleF *bounds)
{
+ /* declarations */
+ CStatus status;
+
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
/* ensure we have a bounds pointer */
CStatus_Require((bounds != 0), CStatus_ArgumentNull);
- /* get the visible clipping bounds */
+ /* get the visible clipping bounds, synchronously */
+ CSurface_Lock(_this->surface);
{
/* declarations */
CRectangleF visible;
- /* get the clipping bounds */
- CStatus_Check
- (CRegion_GetBounds
- (_this->clip, _this, bounds));
-
/* get the surface bounds */
- CStatus_Check
- (CSurface_GetBoundsF
- (_this->surface, &visible));
+ visible = CSurface_GetBoundsF(_this->surface);
+
+ /* get the clipping bounds */
+ status = CRegion_GetBounds(_this->clip, _this, bounds);
/* obtain the intersection of the visible area and the clip
bounds */
/* TODO */
}
+ CSurface_Unlock(_this->surface);
- /* return successfully */
- return CStatus_OK;
+ /* return status */
+ return status;
}
/* Determine if the clipping region is empty. */
CStatus
CGraphics_IsClipEmpty(CGraphics *_this,
- CBool *empty)
+ CBool *empty)
{
+ /* declarations */
+ CStatus status;
+
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
/* ensure we have an empty flag pointer */
CStatus_Require((empty != 0), CStatus_ArgumentNull);
- /* determine if the clipping region is empty */
- CStatus_Check
- (CRegion_IsEmpty
- (_this->clip, _this, empty));
+ /* determine if the clipping region is empty, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ status = CRegion_IsEmpty(_this->clip, _this, empty);
+ }
+ CSurface_Unlock(_this->surface);
- /* return successfully */
- return CStatus_OK;
+ /* return status */
+ return status;
}
/* Determine if the visible clipping region is empty. */
CStatus
CGraphics_IsVisibleClipEmpty(CGraphics *_this,
- CBool *empty)
+ CBool *empty)
{
+ /* declarations */
+ CStatus status;
+
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
/* ensure we have an empty flag pointer */
CStatus_Require((empty != 0), CStatus_ArgumentNull);
- /* determine if the visible clipping region is empty */
+ /* determine if the visible clipping region is empty, synchronously */
+ CSurface_Lock(_this->surface);
{
/* declarations */
CRectangleF visible;
/* get the surface bounds */
- CStatus_Check
- (CSurface_GetBoundsF
- (_this->surface, &visible));
+ visible = CSurface_GetBoundsF(_this->surface);
/* determine if the visible area is within the clipping region
*/
- CStatus_Check
- (CRegion_IsVisibleRectangle
- (_this->clip, _this, visible, empty));
+ status =
+ CRegion_IsVisibleRectangle
+ (_this->clip, _this, visible, empty);
}
+ CSurface_Unlock(_this->surface);
- /* return successfully */
- return CStatus_OK;
+ /* return status */
+ return status;
}
/* Determine if a point is within the visible clip region. */
CStatus
CGraphics_IsVisiblePoint(CGraphics *_this,
- CPointF point,
- CBool *visible)
+ CPointF point,
+ CBool *visible)
{
+ /* declarations */
+ CStatus status;
+
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
/* ensure we have a visible flag pointer */
CStatus_Require((visible != 0), CStatus_ArgumentNull);
- /* determine if the visible clipping region is empty */
+ /* determine if the visible clipping region is empty, synchronously */
+ CSurface_Lock(_this->surface);
{
/* declarations */
CRectangleF v;
/* get the surface bounds */
- CStatus_Check
- (CSurface_GetBoundsF
- (_this->surface, &v));
+ v = CSurface_GetBoundsF(_this->surface);
/* determine if the point is within the visible bounds */
if(!(CRectangle_ContainsPoint(v, point)))
@@ -573,25 +630,28 @@
/* set the visible flag to false */
*visible = 0;
- /* return successfully */
- return CStatus_OK;
+ /* set the status */
+ status = CStatus_OK;
+ }
+ else
+ {
+ /* determine if the point is within the clipping region
*/
+ status =
+ CRegion_IsVisiblePoint
+ (_this->clip, _this, point, visible);
}
-
- /* determine if the point is within the clipping region */
- CStatus_Check
- (CRegion_IsVisiblePoint
- (_this->clip, _this, point, visible));
}
+ CSurface_Unlock(_this->surface);
- /* return successfully */
- return CStatus_OK;
+ /* return status */
+ return status;
}
/* Determine if any part of a rectangle is within the visible clip region. */
CStatus
CGraphics_IsVisibleRectangle(CGraphics *_this,
- CRectangleF rect,
- CBool *visible)
+ CRectangleF rect,
+ CBool *visible)
{
/* TODO */
return CStatus_NotImplemented;
@@ -601,121 +661,177 @@
CStatus
CGraphics_ResetClip(CGraphics *_this)
{
+ /* declarations */
+ CStatus status;
+
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
- /* reset the clipping region */
- CStatus_Check
- (CRegion_MakeInfinite
- (_this->clip));
+ /* reset the clipping region, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ status = CRegion_MakeInfinite(_this->clip);
+ }
+ CSurface_Unlock(_this->surface);
- /* return successfully */
- return CStatus_OK;
+ /* return status */
+ return status;
}
/* Set the clipping region to that of another graphics context. */
CStatus
CGraphics_SetClipGraphics(CGraphics *_this,
- CGraphics *graphics,
- CCombineMode combineMode)
+ CGraphics *graphics,
+ CCombineMode combineMode)
{
+ /* declarations */
+ CStatus status;
+
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
/* ensure we have a graphics context pointer */
CStatus_Require((graphics != 0), CStatus_ArgumentNull);
- /* set the clipping region */
- CStatus_Check
- (CRegion_CombineRegion
- (_this->clip, graphics->clip, combineMode));
+ /* set the clipping region, synchronously */
+ if(_this->surface == graphics->surface)
+ {
+ /* set the clipping region */
+ if(_this == graphics)
+ {
+ /* TODO: how should we handle this case? */
+ status = CStatus_Argument;
+ }
+ else
+ {
+ CSurface_Lock(_this->surface);
+ {
+ status =
+ CRegion_CombineRegion
+ (_this->clip, graphics->clip,
combineMode);
+ }
+ CSurface_Unlock(_this->surface);
+ }
+ }
+ else
+ {
+ CSurface_Lock(_this->surface);
+ CSurface_Lock(graphics->surface);
+ {
+ status =
+ CRegion_CombineRegion
+ (_this->clip, graphics->clip,
combineMode);
+ }
+ CSurface_Lock(graphics->surface);
+ CSurface_Unlock(_this->surface);
+ }
- /* return successfully */
- return CStatus_OK;
+ /* return status */
+ return status;
}
/* Set the clipping region to a given path. */
CStatus
CGraphics_SetClipPath(CGraphics *_this,
- CPath *path,
- CCombineMode combineMode)
+ CPath *path,
+ CCombineMode combineMode)
{
+ /* declarations */
+ CStatus status;
+
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
/* ensure we have a path pointer */
CStatus_Require((path != 0), CStatus_ArgumentNull);
- /* set the clipping region */
- CStatus_Check
- (CRegion_CombinePath
- (_this->clip, path, combineMode));
+ /* set the clipping region, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ status = CRegion_CombinePath(_this->clip, path, combineMode);
+ }
+ CSurface_Unlock(_this->surface);
- /* return successfully */
- return CStatus_OK;
+ /* return status */
+ return status;
}
/* Set the clipping region to a given region. */
CStatus
CGraphics_SetClipRegion(CGraphics *_this,
- CRegion *region,
- CCombineMode combineMode)
+ CRegion *region,
+ CCombineMode combineMode)
{
+ /* declarations */
+ CStatus status;
+
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
/* ensure we have a region pointer */
CStatus_Require((region != 0), CStatus_ArgumentNull);
- /* set the clipping region */
- CStatus_Check
- (CRegion_CombineRegion
- (_this->clip, region, combineMode));
+ /* set the clipping region, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ status = CRegion_CombineRegion(_this->clip, region,
combineMode);
+ }
+ CSurface_Unlock(_this->surface);
- /* return successfully */
- return CStatus_OK;
+ /* return status */
+ return status;
}
/* Set the clipping region to a given rectangle. */
CStatus
CGraphics_SetClipRectangle(CGraphics *_this,
- CRectangleF rect,
- CCombineMode combineMode)
+ CRectangleF rect,
+ CCombineMode combineMode)
{
+ /* declarations */
+ CStatus status;
+
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
- /* set the clipping region */
- CStatus_Check
- (CRegion_CombineRectangle
- (_this->clip, rect, combineMode));
+ /* set the clipping region, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ status = CRegion_CombineRectangle(_this->clip, rect,
combineMode);
+ }
+ CSurface_Unlock(_this->surface);
- /* return successfully */
- return CStatus_OK;
+ /* return status */
+ return status;
}
/* Translate the clipping region by a specific amount. */
CStatus
CGraphics_TranslateClip(CGraphics *_this,
- CFloat dx,
- CFloat dy)
+ CFloat dx,
+ CFloat dy)
{
+ /* declarations */
+ CStatus status;
+
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
- /* translate the clipping region */
- CStatus_Check
- (CRegion_Translate
- (_this->clip, dx, dy));
+ /* translate the clipping region, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ status = CRegion_Translate(_this->clip, dx, dy);
+ }
+ CSurface_Unlock(_this->surface);
- /* return successfully */
- return CStatus_OK;
+ /* return status */
+ return status;
}
/* Get the clipping mask. */
static CStatus
-CGraphics_GetClipMask(CGraphics *_this,
- pixman_image_t **mask)
+CGraphics_GetClipMask(CGraphics *_this,
+ pixman_image_t **mask)
{
/* declarations */
CBool gray;
@@ -743,8 +859,8 @@
/* Get the compositing mask. */
static CStatus
-CGraphics_GetCompositingMask(CGraphics *_this,
- pixman_image_t **mask)
+CGraphics_GetCompositingMask(CGraphics *_this,
+ pixman_image_t **mask)
{
/* declarations */
CBool gray;
@@ -768,7 +884,62 @@
CUInt32 height;
CUInt32 stride;
- /* TODO: is this needed? */
+ /* get the mask information */
+ data = (CByte *)pixman_image_get_data(*mask);
+ height = (CUInt32)pixman_image_get_height(*mask);
+ stride = (CUInt32)pixman_image_get_stride(*mask);
+
+ /* reset the mask */
+ CMemSet(data, 0x00, (height * stride));
+ }
+
+ /* return successfully */
+ return CStatus_OK;
+}
+
+/* Get the text compositing mask. */
+static CStatus
+CGraphics_GetTextCompositingMask(CGraphics *_this,
+ pixman_image_t **mask)
+{
+ /* declarations */
+ CBool gray;
+
+ /* assertions */
+ CASSERT((_this != 0));
+ CASSERT((mask != 0));
+
+ /* determine if we should use gray values */
+ switch(_this->textRenderingHint)
+ {
+ case CTextRenderingHint_SingleBitPerPixelGridFit:
+ case CTextRenderingHint_SingleBitPerPixel:
+ {
+ gray = 0;
+ }
+ break;
+ case CTextRenderingHint_SystemDefault:
+ case CTextRenderingHint_AntiAlias:
+ case CTextRenderingHint_AntiAliasGridFit:
+ case CTextRenderingHint_ClearTypeGridFit:
+ default:
+ {
+ gray = 1;
+ }
+ break;
+ }
+
+ /* get the surface mask */
+ CStatus_Check
+ (CSurface_GetCompositingMask
+ (_this->surface, mask, gray));
+
+ /* reset the compositing mask */
+ {
+ /* declarations */
+ CByte *data;
+ CUInt32 height;
+ CUInt32 stride;
/* get the mask information */
data = (CByte *)pixman_image_get_data(*mask);
@@ -802,7 +973,7 @@
/* Get the compositing mode of this graphics context. */
CStatus
CGraphics_GetCompositingMode(CGraphics *_this,
- CCompositingMode *compositingMode)
+ CCompositingMode *compositingMode)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -810,8 +981,12 @@
/* ensure we have a compositing mode pointer */
CStatus_Require((compositingMode != 0), CStatus_ArgumentNull);
- /* get the compositing mode */
- *compositingMode = _this->compositingMode;
+ /* get the compositing mode, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ *compositingMode = _this->compositingMode;
+ }
+ CSurface_Unlock(_this->surface);
/* return successfully */
return CStatus_OK;
@@ -820,13 +995,17 @@
/* Set the compositing mode of this graphics context. */
CStatus
CGraphics_SetCompositingMode(CGraphics *_this,
- CCompositingMode compositingMode)
+ CCompositingMode compositingMode)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
- /* set the compositing mode */
- _this->compositingMode = compositingMode;
+ /* set the compositing mode, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ _this->compositingMode = compositingMode;
+ }
+ CSurface_Unlock(_this->surface);
/* return successfully */
return CStatus_OK;
@@ -835,7 +1014,7 @@
/* Get the compositing quality of this graphics context. */
CStatus
CGraphics_GetCompositingQuality(CGraphics *_this,
- CCompositingQuality *compositingQuality)
+ CCompositingQuality *compositingQuality)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -843,8 +1022,12 @@
/* ensure we have a compositing quality pointer */
CStatus_Require((compositingQuality != 0), CStatus_ArgumentNull);
- /* get the compositing quality */
- *compositingQuality = _this->compositingQuality;
+ /* get the compositing quality, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ *compositingQuality = _this->compositingQuality;
+ }
+ CSurface_Unlock(_this->surface);
/* return successfully */
return CStatus_OK;
@@ -853,13 +1036,17 @@
/* Set the compositing quality of this graphics context. */
CStatus
CGraphics_SetCompositingQuality(CGraphics *_this,
- CCompositingQuality compositingQuality)
+ CCompositingQuality compositingQuality)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
- /* set the compositing quality */
- _this->compositingQuality = compositingQuality;
+ /* set the compositing quality, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ _this->compositingQuality = compositingQuality;
+ }
+ CSurface_Unlock(_this->surface);
/* return successfully */
return CStatus_OK;
@@ -868,55 +1055,57 @@
/* Get the horizontal resolution of this graphics context. */
CStatus
CGraphics_GetDpiX(CGraphics *_this,
- CFloat *dpiX)
+ CFloat *dpiX)
{
+ /* declarations */
+ CStatus status;
+
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
/* ensure we have a horizontal resolution pointer */
CStatus_Require((dpiX != 0), CStatus_ArgumentNull);
- /* get the horizontal resolution */
-#if 0
- CStatus_Check
- (CSurface_GetDpiX
- (_this->surface, dpiX));
-#else
- *dpiX = CGraphics_DefaultDpiX;
-#endif
+ /* get the horizontal resolution, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ status = CSurface_GetDpiX(_this->surface, dpiX);
+ }
+ CSurface_Unlock(_this->surface);
- /* return successfully */
- return CStatus_OK;
+ /* return status */
+ return status;
}
/* Get the vertical resolution of this graphics context. */
CStatus
CGraphics_GetDpiY(CGraphics *_this,
- CFloat *dpiY)
+ CFloat *dpiY)
{
+ /* declarations */
+ CStatus status;
+
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
/* ensure we have a vertical resolution pointer */
CStatus_Require((dpiY != 0), CStatus_ArgumentNull);
- /* get the vertical resolution */
-#if 0
- CStatus_Check
- (CSurface_GetDpiY
- (_this->surface, dpiY));
-#else
- *dpiY = CGraphics_DefaultDpiY;
-#endif
+ /* get the vertical resolution, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ status = CSurface_GetDpiY(_this->surface, dpiY);
+ }
+ CSurface_Unlock(_this->surface);
- /* return successfully */
- return CStatus_OK;
+ /* return status */
+ return status;
}
/* Get the interpolation mode of this graphics context. */
CStatus
CGraphics_GetInterpolationMode(CGraphics *_this,
- CInterpolationMode *interpolationMode)
+ CInterpolationMode *interpolationMode)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -924,8 +1113,12 @@
/* ensure we have an interpolation mode pointer */
CStatus_Require((interpolationMode != 0), CStatus_ArgumentNull);
- /* get the interpolation mode */
- *interpolationMode = _this->interpolationMode;
+ /* get the interpolation mode, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ *interpolationMode = _this->interpolationMode;
+ }
+ CSurface_Unlock(_this->surface);
/* return successfully */
return CStatus_OK;
@@ -934,13 +1127,17 @@
/* Set the interpolation mode of this graphics context. */
CStatus
CGraphics_SetInterpolationMode(CGraphics *_this,
- CInterpolationMode interpolationMode)
+ CInterpolationMode interpolationMode)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
- /* set the interpolation mode */
- _this->interpolationMode = interpolationMode;
+ /* set the interpolation mode, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ _this->interpolationMode = interpolationMode;
+ }
+ CSurface_Unlock(_this->surface);
/* return successfully */
return CStatus_OK;
@@ -949,7 +1146,7 @@
/* Get the page scaling factor of this graphics context. */
CStatus
CGraphics_GetPageScale(CGraphics *_this,
- CFloat *pageScale)
+ CFloat *pageScale)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -957,8 +1154,12 @@
/* ensure we have a page scaling factor pointer */
CStatus_Require((pageScale != 0), CStatus_ArgumentNull);
- /* get the page scaling factor */
- *pageScale = _this->pageScale;
+ /* get the page scaling factor, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ *pageScale = _this->pageScale;
+ }
+ CSurface_Unlock(_this->surface);
/* return successfully */
return CStatus_OK;
@@ -967,40 +1168,45 @@
/* Set the page scaling factor of this graphics context. */
CStatus
CGraphics_SetPageScale(CGraphics *_this,
- CFloat pageScale)
+ CFloat pageScale)
{
/* declarations */
- CFloat dpiX;
- CFloat dpiY;
+ CStatus status;
+ CFloat dpiX;
+ CFloat dpiY;
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
- /* set the page scaling factor */
- _this->pageScale = pageScale;
+ /* set the page scaling factor, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ /* set the page scaling factor */
+ _this->pageScale = pageScale;
- /* get the horizontal resolution */
- CStatus_Check
- (CGraphics_GetDpiX
- (_this, &dpiX));
+ /* get the horizontal resolution */
+ CStatus_CheckGOTO
+ (CSurface_GetDpiX(_this->surface, &dpiX), status,
GOTO_Cleanup);
- /* get the vertical resolution */
- CStatus_Check
- (CGraphics_GetDpiY
- (_this, &dpiY));
+ /* get the vertical resolution */
+ CStatus_CheckGOTO
+ (CSurface_GetDpiY(_this->surface, &dpiY), status,
GOTO_Cleanup);
- /* update the pipeline */
- CGraphicsPipeline_SetPage
- (&(_this->pipeline), _this->pageUnit, pageScale, dpiX, dpiY);
+ /* update the pipeline */
+ CGraphicsPipeline_SetPage
+ (&(_this->pipeline), _this->pageUnit, pageScale, dpiX,
dpiY);
+ }
+GOTO_Cleanup:
+ CSurface_Unlock(_this->surface);
- /* return successfully */
- return CStatus_OK;
+ /* return status */
+ return status;
}
/* Get the page unit of this graphics context. */
CStatus
CGraphics_GetPageUnit(CGraphics *_this,
- CGraphicsUnit *pageUnit)
+ CGraphicsUnit *pageUnit)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -1008,8 +1214,12 @@
/* ensure we have a page unit pointer */
CStatus_Require((pageUnit != 0), CStatus_ArgumentNull);
- /* get the page unit */
- *pageUnit = _this->pageUnit;
+ /* get the page unit, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ *pageUnit = _this->pageUnit;
+ }
+ CSurface_Unlock(_this->surface);
/* return successfully */
return CStatus_OK;
@@ -1018,40 +1228,45 @@
/* Set the page unit of this graphics context. */
CStatus
CGraphics_SetPageUnit(CGraphics *_this,
- CGraphicsUnit pageUnit)
+ CGraphicsUnit pageUnit)
{
/* declarations */
- CFloat dpiX;
- CFloat dpiY;
+ CStatus status;
+ CFloat dpiX;
+ CFloat dpiY;
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
- /* set the page unit */
- _this->pageUnit = pageUnit;
+ /* set the page unit, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ /* set the page unit */
+ _this->pageUnit = pageUnit;
- /* get the horizontal resolution */
- CStatus_Check
- (CGraphics_GetDpiX
- (_this, &dpiX));
+ /* get the horizontal resolution */
+ CStatus_CheckGOTO
+ (CSurface_GetDpiX(_this->surface, &dpiX), status,
GOTO_Cleanup);
- /* get the vertical resolution */
- CStatus_Check
- (CGraphics_GetDpiY
- (_this, &dpiY));
+ /* get the vertical resolution */
+ CStatus_CheckGOTO
+ (CSurface_GetDpiY(_this->surface, &dpiY), status,
GOTO_Cleanup);
- /* update the pipeline */
- CGraphicsPipeline_SetPage
- (&(_this->pipeline), pageUnit, _this->pageScale, dpiX, dpiY);
+ /* update the pipeline */
+ CGraphicsPipeline_SetPage
+ (&(_this->pipeline), pageUnit, _this->pageScale, dpiX,
dpiY);
+ }
+GOTO_Cleanup:
+ CSurface_Unlock(_this->surface);
- /* return successfully */
- return CStatus_OK;
+ /* return status */
+ return status;
}
/* Get the pixel offset mode of this graphics context. */
CStatus
CGraphics_GetPixelOffsetMode(CGraphics *_this,
- CPixelOffsetMode *pixelOffsetMode)
+ CPixelOffsetMode *pixelOffsetMode)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -1059,8 +1274,12 @@
/* ensure we have a pixel offset mode pointer */
CStatus_Require((pixelOffsetMode != 0), CStatus_ArgumentNull);
- /* get the pixel offset mode */
- *pixelOffsetMode = _this->pixelOffsetMode;
+ /* get the pixel offset mode, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ *pixelOffsetMode = _this->pixelOffsetMode;
+ }
+ CSurface_Unlock(_this->surface);
/* return successfully */
return CStatus_OK;
@@ -1069,13 +1288,17 @@
/* Set the pixel offset mode of this graphics context. */
CStatus
CGraphics_SetPixelOffsetMode(CGraphics *_this,
- CPixelOffsetMode pixelOffsetMode)
+ CPixelOffsetMode pixelOffsetMode)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
- /* set the pixel offset mode */
- _this->pixelOffsetMode = pixelOffsetMode;
+ /* set the pixel offset mode, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ _this->pixelOffsetMode = pixelOffsetMode;
+ }
+ CSurface_Unlock(_this->surface);
/* return successfully */
return CStatus_OK;
@@ -1084,7 +1307,7 @@
/* Get the rendering origin of this graphics context. */
CStatus
CGraphics_GetRenderingOrigin(CGraphics *_this,
- CPointI *renderingOrigin)
+ CPointI *renderingOrigin)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -1092,8 +1315,12 @@
/* ensure we have a rendering origin pointer */
CStatus_Require((renderingOrigin != 0), CStatus_ArgumentNull);
- /* get the rendering origin */
- *renderingOrigin = _this->renderingOrigin;
+ /* get the rendering origin, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ *renderingOrigin = _this->renderingOrigin;
+ }
+ CSurface_Unlock(_this->surface);
/* return successfully */
return CStatus_OK;
@@ -1102,13 +1329,17 @@
/* Set the rendering origin of this graphics context. */
CStatus
CGraphics_SetRenderingOrigin(CGraphics *_this,
- CPointI renderingOrigin)
+ CPointI renderingOrigin)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
- /* set the rendering origin */
- _this->renderingOrigin = renderingOrigin;
+ /* set the rendering origin, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ _this->renderingOrigin = renderingOrigin;
+ }
+ CSurface_Unlock(_this->surface);
/* return successfully */
return CStatus_OK;
@@ -1117,7 +1348,7 @@
/* Get the smoothing mode of this graphics context. */
CStatus
CGraphics_GetSmoothingMode(CGraphics *_this,
- CSmoothingMode *smoothingMode)
+ CSmoothingMode *smoothingMode)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -1125,8 +1356,12 @@
/* ensure we have a smoothing mode pointer */
CStatus_Require((smoothingMode != 0), CStatus_ArgumentNull);
- /* get the smoothing mode */
- *smoothingMode = _this->smoothingMode;
+ /* get the smoothing mode, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ *smoothingMode = _this->smoothingMode;
+ }
+ CSurface_Unlock(_this->surface);
/* return successfully */
return CStatus_OK;
@@ -1135,13 +1370,17 @@
/* Set the smoothing mode of this graphics context. */
CStatus
CGraphics_SetSmoothingMode(CGraphics *_this,
- CSmoothingMode smoothingMode)
+ CSmoothingMode smoothingMode)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
- /* set the smoothing mode */
- _this->smoothingMode = smoothingMode;
+ /* set the smoothing mode, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ _this->smoothingMode = smoothingMode;
+ }
+ CSurface_Unlock(_this->surface);
/* return successfully */
return CStatus_OK;
@@ -1150,7 +1389,7 @@
/* Get the text contrast of this graphics context. */
CStatus
CGraphics_GetTextContrast(CGraphics *_this,
- CUInt32 *textContrast)
+ CUInt32 *textContrast)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -1158,8 +1397,12 @@
/* ensure we have a text contrast pointer */
CStatus_Require((textContrast != 0), CStatus_ArgumentNull);
- /* get the text contrast */
- *textContrast = _this->textContrast;
+ /* get the text contrast, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ *textContrast = _this->textContrast;
+ }
+ CSurface_Unlock(_this->surface);
/* return successfully */
return CStatus_OK;
@@ -1168,13 +1411,17 @@
/* Set the text contrast of this graphics context. */
CStatus
CGraphics_SetTextContrast(CGraphics *_this,
- CUInt32 textContrast)
+ CUInt32 textContrast)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
- /* set the text contrast */
- _this->textContrast = textContrast;
+ /* set the text contrast, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ _this->textContrast = textContrast;
+ }
+ CSurface_Unlock(_this->surface);
/* return successfully */
return CStatus_OK;
@@ -1183,7 +1430,7 @@
/* Get the text rendering hint of this graphics context. */
CStatus
CGraphics_GetTextRenderingHint(CGraphics *_this,
- CTextRenderingHint *textRenderingHint)
+ CTextRenderingHint *textRenderingHint)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -1191,8 +1438,12 @@
/* ensure we have a text rendering hint pointer */
CStatus_Require((textRenderingHint != 0), CStatus_ArgumentNull);
- /* get the text rendering hint */
- *textRenderingHint = _this->textRenderingHint;
+ /* get the text rendering hint, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ *textRenderingHint = _this->textRenderingHint;
+ }
+ CSurface_Unlock(_this->surface);
/* return successfully */
return CStatus_OK;
@@ -1201,13 +1452,17 @@
/* Set the text rendering hint of this graphics context. */
CStatus
CGraphics_SetTextRenderingHint(CGraphics *_this,
- CTextRenderingHint textRenderingHint)
+ CTextRenderingHint textRenderingHint)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
- /* set the text rendering hint */
- _this->textRenderingHint = textRenderingHint;
+ /* set the text rendering hint, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ _this->textRenderingHint = textRenderingHint;
+ }
+ CSurface_Unlock(_this->surface);
/* return successfully */
return CStatus_OK;
@@ -1240,21 +1495,93 @@
/* Draw an xbm glyph. */
CStatus
CGraphics_DrawXBM(CGraphics *_this,
- CByte *bits,
- CUInt32 count,
- CRectangleF dst,
- CColor color)
+ const CByte *bits,
+ CFloat x,
+ CFloat y,
+ CUInt16 width,
+ CUInt16 height,
+ CColor color,
+ CBool transform)
{
- /* TODO */
- return CStatus_NotImplemented;
+ /* declarations */
+ pixman_image_t *pattern;
+ CStatus status;
+
+ /* ensure we have a this pointer */
+ CStatus_Require((_this != 0), CStatus_ArgumentNull);
+
+ /* ensure we have a bit list pointer */
+ CStatus_Require((bits != 0), CStatus_ArgumentNull);
+
+ /* ensure we have a valid xbm size */
+ CStatus_Require((width != 0 && height != 0), CStatus_Argument);
+
+ /* bail out now if there's nothing to do */
+ CStatus_Require((color != 0), CStatus_OK);
+
+ /* create the pattern */
+ CStatus_Check
+ (CUtils_CreateHatchPattern
+ (&pattern, bits, width, height, color, 0, 0));
+
+ /* paint to the surface synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ /* declarations */
+ pixman_image_t *clip;
+
+ /* get the clip mask */
+ status = CGraphics_GetClipMask(_this, &clip);
+
+ /* handle masking failures */
+ if(status != CStatus_OK)
+ {
+ CSurface_Unlock(_this->surface);
+ pixman_image_destroy(pattern);
+ return status;
+ }
+
+ /* set the pattern transformation, as needed */
+ if(transform)
+ {
+ /* declarations */
+ pixman_transform_t xform;
+
+ /* get the transformation */
+ xform =
+ CUtils_ToPixmanTransform
+
(&(CGraphicsPipeline_DeviceInverse(_this->pipeline)));
+
+ /* set the image transformation */
+ if(pixman_image_set_transform(pattern, &xform))
+ {
+ CSurface_Unlock(_this->surface);
+ pixman_image_destroy(pattern);
+ return CStatus_OutOfMemory;
+ }
+ }
+
+ /* draw the xbm */
+ status =
+ CSurface_Composite
+ (_this->surface, x, y, width, height, pattern,
clip,
+ _this->interpolationMode,
_this->compositingMode);
+ }
+ CSurface_Unlock(_this->surface);
+
+ /* destroy the pattern */
+ pixman_image_destroy(pattern);
+
+ /* return status */
+ return status;
}
/* Draw an image. */
CStatus
CGraphics_DrawImage(CGraphics *_this,
- CImage *image,
- CFloat x,
- CFloat y)
+ CImage *image,
+ CFloat x,
+ CFloat y)
{
/* declarations */
CSizeF size;
@@ -1273,11 +1600,11 @@
/* Draw an image. */
CStatus
CGraphics_DrawImageRect(CGraphics *_this,
- CImage *image,
- CFloat x,
- CFloat y,
- CFloat width,
- CFloat height)
+ CImage *image,
+ CFloat x,
+ CFloat y,
+ CFloat width,
+ CFloat height)
{
/* declarations */
CStatus status;
@@ -1348,9 +1675,9 @@
/* Draw an image. */
CStatus
CGraphics_DrawImagePoints(CGraphics *_this,
- CImage *image,
- CPointF *dst,
- CUInt32 count)
+ CImage *image,
+ CPointF *dst,
+ CUInt32 count)
{
/* TODO */
return CStatus_NotImplemented;
@@ -1359,10 +1686,10 @@
/* Draw an image. */
CStatus
CGraphics_DrawImageRectPoints(CGraphics *_this,
- CImage *image,
- CPointF dst,
- CRectangleF src,
- CGraphicsUnit srcUnit)
+ CImage *image,
+ CPointF dst,
+ CRectangleF src,
+ CGraphicsUnit srcUnit)
{
/* TODO */
return CStatus_NotImplemented;
@@ -1371,12 +1698,12 @@
/* Draw an image. */
CStatus
CGraphics_DrawImageRectPointsAttributes(CGraphics *_this,
- CImage *image,
- CPointF *dst,
- CUInt32 count,
- CRectangleF src,
- CGraphicsUnit srcUnit,
- CImageAttributes *atts)
+ CImage *image,
+ CPointF *dst,
+ CUInt32 count,
+ CRectangleF src,
+ CGraphicsUnit srcUnit,
+ CImageAttributes *atts)
{
/* TODO */
return CStatus_NotImplemented;
@@ -1385,11 +1712,11 @@
/* Draw an image. */
CStatus
CGraphics_DrawImageRectRectAttributes(CGraphics *_this,
- CImage *image,
- CRectangleF dst,
- CRectangleF src,
- CGraphicsUnit srcUnit,
- CImageAttributes *atts)
+ CImage *image,
+ CRectangleF dst,
+ CRectangleF src,
+ CGraphicsUnit srcUnit,
+ CImageAttributes *atts)
{
/* TODO */
return CStatus_NotImplemented;
@@ -1414,14 +1741,16 @@
/* Composite the image. */
static CStatus
-CGraphics_Composite(CGraphics *_this,
- CPattern *pattern,
- pixman_image_t *mask)
+CGraphics_Composite(CGraphics *_this,
+ CInt32 x,
+ CInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CPattern *pattern,
+ pixman_image_t *mask)
{
/* declarations */
CStatus status;
- CUInt32 width;
- CUInt32 height;
/* assertions */
CASSERT((_this != 0));
@@ -1432,7 +1761,7 @@
if(pattern->transform != 0)
{
/* declarations */
- CAffineTransformF affine;
+ CAffineTransformF affine;
pixman_transform_t transform;
/* get the pattern transformation */
@@ -1450,14 +1779,10 @@
pixman_image_set_transform(pattern->image, &transform);
}
- /* get the source dimensions */
- width = pixman_image_get_width(pattern->image);
- height = pixman_image_get_height(pattern->image);
-
/* composite the image */
status =
CSurface_Composite
- (_this->surface, 0, 0, width, height, pattern->image,
mask,
+ (_this->surface, x, y, width, height, pattern->image,
mask,
_this->interpolationMode, _this->compositingMode);
/* reset transformation, as needed */
@@ -1475,8 +1800,8 @@
/* Fill the given path. */
static CStatus
CGraphics_Fill2(CGraphics *_this,
- CPath *path,
- CPattern *pattern)
+ CPath *path,
+ CPattern *pattern)
{
/* declarations */
CStatus status;
@@ -1489,7 +1814,9 @@
/* fill the given path */
{
/* declarations */
- CTrapezoids trapezoids;
+ CUInt32 width;
+ CUInt32 height;
+ CTrapezoids trapezoids;
pixman_image_t *clip;
pixman_image_t *mask;
@@ -1506,6 +1833,14 @@
/* initialize the trapezoids */
CTrapezoids_Initialize(&trapezoids);
+ /*\
+ |*| TODO: special case identity transformation
+ \*/
+
+ /* transform the path */
+ CPath_TransformAffine
+ (path, &CGraphicsPipeline_Device(_this->pipeline));
+
/* fill the path */
status =
CPath_Fill
@@ -1520,15 +1855,25 @@
/* composite the trapezoids */
pixman_composite_trapezoids
- (PIXMAN_OPERATOR_IN, clip, mask, 0, 0,
+ (PIXMAN_OPERATOR_ADD, clip, mask, 0, 0,
((pixman_trapezoid_t
*)CTrapezoids_Trapezoids(trapezoids)),
CTrapezoids_Count(trapezoids));
/* finalize the trapezoids */
CTrapezoids_Finalize(&trapezoids);
+ /*\
+ |*| TODO: calculate and use trapezoid bounds
+ \*/
+
+ /* get the mask dimensions */
+ width = pixman_image_get_width(mask);
+ height = pixman_image_get_height(mask);
+
/* composite the image */
- status = CGraphics_Composite(_this, pattern, mask);
+ status =
+ CGraphics_Composite
+ (_this, 0, 0, width, height, pattern, mask);
}
/* return status */
@@ -1538,7 +1883,7 @@
/* Stroke the current path. */
static CStatus
CGraphics_Stroke(CGraphics *_this,
- CPen *pen)
+ CPen *pen)
{
/* assertions */
CASSERT((_this != 0));
@@ -1590,10 +1935,10 @@
/* Draw an arc. */
CStatus
CGraphics_DrawArc(CGraphics *_this,
- CPen *pen,
- CRectangleF rect,
- CFloat startAngle,
- CFloat sweepAngle)
+ CPen *pen,
+ CRectangleF rect,
+ CFloat startAngle,
+ CFloat sweepAngle)
{
/* declarations */
CStatus status;
@@ -1646,11 +1991,11 @@
/* Draw a Bezier spline. */
CStatus
CGraphics_DrawBezier(CGraphics *_this,
- CPen *pen,
- CPointF a,
- CPointF b,
- CPointF c,
- CPointF d)
+ CPen *pen,
+ CPointF a,
+ CPointF b,
+ CPointF c,
+ CPointF d)
{
/* declarations */
CStatus status;
@@ -1702,9 +2047,9 @@
/* Draw a series of Bezier splines. */
CStatus
CGraphics_DrawBeziers(CGraphics *_this,
- CPen *pen,
- CPointF *points,
- CUInt32 count)
+ CPen *pen,
+ CPointF *points,
+ CUInt32 count)
{
/* declarations */
CStatus status;
@@ -1755,10 +2100,10 @@
/* Draw a closed cardinal spline. */
CStatus
CGraphics_DrawClosedCurve(CGraphics *_this,
- CPen *pen,
- CPointF *points,
- CUInt32 count,
- CFloat tension)
+ CPen *pen,
+ CPointF *points,
+ CUInt32 count,
+ CFloat tension)
{
/* declarations */
CStatus status;
@@ -1809,12 +2154,12 @@
/* Draw a cardinal spline. */
CStatus
CGraphics_DrawCurve(CGraphics *_this,
- CPen *pen,
- CPointF *points,
- CUInt32 count,
- CUInt32 offset,
- CUInt32 numberOfSegments,
- CFloat tension)
+ CPen *pen,
+ CPointF *points,
+ CUInt32 count,
+ CUInt32 offset,
+ CUInt32 numberOfSegments,
+ CFloat tension)
{
/* declarations */
CStatus status;
@@ -1865,8 +2210,8 @@
/* Draw an ellipse. */
CStatus
CGraphics_DrawEllipse(CGraphics *_this,
- CPen *pen,
- CRectangleF rect)
+ CPen *pen,
+ CRectangleF rect)
{
/* declarations */
CStatus status;
@@ -1918,9 +2263,9 @@
/* Draw a line between two points. */
CStatus
CGraphics_DrawLine(CGraphics *_this,
- CPen *pen,
- CPointF start,
- CPointF end)
+ CPen *pen,
+ CPointF start,
+ CPointF end)
{
/* declarations */
CStatus status;
@@ -1970,9 +2315,9 @@
/* Draw a series of connected line segments. */
CStatus
CGraphics_DrawLines(CGraphics *_this,
- CPen *pen,
- CPointF *points,
- CUInt32 count)
+ CPen *pen,
+ CPointF *points,
+ CUInt32 count)
{
/* declarations */
CStatus status;
@@ -2023,8 +2368,8 @@
/* Draw a path object. */
CStatus
CGraphics_DrawPath(CGraphics *_this,
- CPen *pen,
- CPath *path)
+ CPen *pen,
+ CPath *path)
{
/* declarations */
CStatus status;
@@ -2075,10 +2420,10 @@
/* Draw a pie shape. */
CStatus
CGraphics_DrawPie(CGraphics *_this,
- CPen *pen,
- CRectangleF rect,
- CFloat startAngle,
- CFloat sweepAngle)
+ CPen *pen,
+ CRectangleF rect,
+ CFloat startAngle,
+ CFloat sweepAngle)
{
/* declarations */
CStatus status;
@@ -2131,9 +2476,9 @@
/* Draw a polygon. */
CStatus
CGraphics_DrawPolygon(CGraphics *_this,
- CPen *pen,
- CPointF *points,
- CUInt32 count)
+ CPen *pen,
+ CPointF *points,
+ CUInt32 count)
{
/* declarations */
CStatus status;
@@ -2184,8 +2529,8 @@
/* Draw a rectangle. */
CStatus
CGraphics_DrawRectangle(CGraphics *_this,
- CPen *pen,
- CRectangleF rect)
+ CPen *pen,
+ CRectangleF rect)
{
/* declarations */
CStatus status;
@@ -2237,9 +2582,9 @@
/* Draw a series of rectangles. */
CStatus
CGraphics_DrawRectangles(CGraphics *_this,
- CPen *pen,
- CRectangleF *rects,
- CUInt32 count)
+ CPen *pen,
+ CRectangleF *rects,
+ CUInt32 count)
{
/* declarations */
CStatus status;
@@ -2306,8 +2651,8 @@
/* Fill the current path. */
static CStatus
CGraphics_Fill(CGraphics *_this,
- CBrush *brush,
- CFillMode fillMode)
+ CBrush *brush,
+ CFillMode fillMode)
{
/* assertions */
CASSERT((_this != 0));
@@ -2341,7 +2686,7 @@
/* Clear the entire drawing surface. */
CStatus
CGraphics_Clear(CGraphics *_this,
- CColor color)
+ CColor color)
{
/* declarations */
CStatus status;
@@ -2366,11 +2711,11 @@
/* Fill a closed cardinal spline. */
CStatus
CGraphics_FillClosedCurve(CGraphics *_this,
- CBrush *brush,
- CPointF *points,
- CUInt32 count,
- CFloat tension,
- CFillMode fillMode)
+ CBrush *brush,
+ CPointF *points,
+ CUInt32 count,
+ CFloat tension,
+ CFillMode fillMode)
{
/* declarations */
CStatus status;
@@ -2423,8 +2768,8 @@
/* Fill an ellipse. */
CStatus
CGraphics_FillEllipse(CGraphics *_this,
- CBrush *brush,
- CRectangleF rect)
+ CBrush *brush,
+ CRectangleF rect)
{
/* declarations */
CStatus status;
@@ -2478,8 +2823,8 @@
/* Fill the interior of a path. */
CStatus
CGraphics_FillPath(CGraphics *_this,
- CBrush *brush,
- CPath *path)
+ CBrush *brush,
+ CPath *path)
{
/* declarations */
CStatus status;
@@ -2532,10 +2877,10 @@
/* Fill a pie shape. */
CStatus
CGraphics_FillPie(CGraphics *_this,
- CBrush *brush,
- CRectangleF rect,
- CFloat startAngle,
- CFloat sweepAngle)
+ CBrush *brush,
+ CRectangleF rect,
+ CFloat startAngle,
+ CFloat sweepAngle)
{
/* declarations */
CStatus status;
@@ -2590,10 +2935,10 @@
/* Fill a polygon. */
CStatus
CGraphics_FillPolygon(CGraphics *_this,
- CBrush *brush,
- CPointF *points,
- CUInt32 count,
- CFillMode fillMode)
+ CBrush *brush,
+ CPointF *points,
+ CUInt32 count,
+ CFillMode fillMode)
{
/* declarations */
CStatus status;
@@ -2646,8 +2991,8 @@
/* Fill a rectangle. */
CStatus
CGraphics_FillRectangle(CGraphics *_this,
- CBrush *brush,
- CRectangleF rect)
+ CBrush *brush,
+ CRectangleF rect)
{
/* declarations */
CStatus status;
@@ -2701,9 +3046,9 @@
/* Fill a series of rectangles. */
CStatus
CGraphics_FillRectangles(CGraphics *_this,
- CBrush *brush,
- CRectangleF *rects,
- CUInt32 count)
+ CBrush *brush,
+ CRectangleF *rects,
+ CUInt32 count)
{
/* declarations */
CStatus status;
@@ -2756,8 +3101,8 @@
/* Fill a region. */
CStatus
CGraphics_FillRegion(CGraphics *_this,
- CBrush *brush,
- CRegion *region)
+ CBrush *brush,
+ CRegion *region)
{
/* declarations */
CStatus status;
@@ -2777,49 +3122,34 @@
/* declarations */
pixman_image_t *clip;
pixman_image_t *mask;
- CPattern pattern;
- CUInt32 w;
- CUInt32 h;
- CBool gray;
+ CPattern pattern;
+ CUInt32 w;
+ CUInt32 h;
+ CBool gray;
/* determine if we should use gray values */
gray = CUtils_UseGray(_this->smoothingMode,
_this->pixelOffsetMode);
/* get the clip mask */
- status =
- CSurface_GetClipMask
- (_this->surface, &clip, gray);
-
- /* handle clip masking failures */
- if(status != CStatus_OK)
- {
- CSurface_Unlock(_this->surface);
- return status;
- }
+ CStatus_CheckGOTO
+ (CSurface_GetClipMask
+ (_this->surface, &clip, gray),
+ status,
+ GOTO_Cleanup);
/* get the compositing mask */
- status =
- CSurface_GetCompositingMask
- (_this->surface, &mask, gray);
-
- /* handle composite masking failures */
- if(status != CStatus_OK)
- {
- CSurface_Unlock(_this->surface);
- return status;
- }
+ CStatus_CheckGOTO
+ (CSurface_GetCompositingMask
+ (_this->surface, &mask, gray),
+ status,
+ GOTO_Cleanup);
/* get the region mask */
- status =
- CRegion_GetMask
- (region,
&CGraphicsPipeline_Device(_this->pipeline), mask);
-
- /* handle region masking failures */
- if(status != CStatus_OK)
- {
- CSurface_Unlock(_this->surface);
- return status;
- }
+ CStatus_CheckGOTO
+ (CRegion_GetMask
+ (region,
&CGraphicsPipeline_Device(_this->pipeline), mask),
+ status,
+ GOTO_Cleanup);
/* get the width and height */
w = (CUInt32)pixman_image_get_width(mask);
@@ -2830,18 +3160,18 @@
(PIXMAN_OPERATOR_IN_REVERSE, clip, 0, mask, 0, 0, 0, 0,
0, 0, w, h);
/* get the pattern */
- status = CBrush_GetPattern(brush, &pattern);
-
- /* handle pattern failures */
- if(status != CStatus_OK)
- {
- CSurface_Unlock(_this->surface);
- return status;
- }
+ CStatus_CheckGOTO
+ (CBrush_GetPattern
+ (brush, &pattern),
+ status,
+ GOTO_Cleanup);
/* composite the region */
- status = CGraphics_Composite(_this, &pattern, mask);
+ status =
+ CGraphics_Composite
+ (_this, 0, 0, w, h, &pattern, mask);
}
+GOTO_Cleanup:
CSurface_Unlock(_this->surface);
/* return status */
@@ -2866,17 +3196,17 @@
/* Save the current contents of the graphics context in a container. */
CStatus
CGraphics_BeginContainer(CGraphics *_this,
- CGraphicsContainer *container)
+ CGraphicsContainer *container)
{
/* TODO */
return CStatus_NotImplemented;
}
CStatus
CGraphics_BeginContainer2(CGraphics *_this,
- CRectangleF dst,
- CRectangleF src,
- CGraphicsUnit unit,
- CGraphicsContainer *container)
+ CRectangleF dst,
+ CRectangleF src,
+ CGraphicsUnit unit,
+ CGraphicsContainer *container)
{
/* TODO */
return CStatus_NotImplemented;
@@ -2885,7 +3215,7 @@
/* Reset the graphics state back to a previous container level. */
CStatus
CGraphics_EndContainer(CGraphics *_this,
- CGraphicsContainer container)
+ CGraphicsContainer container)
{
/* TODO */
return CStatus_NotImplemented;
@@ -2894,7 +3224,7 @@
/* Restore to a previous save point. */
CStatus
CGraphics_Restore(CGraphics *_this,
- CUInt32 state)
+ CUInt32 state)
{
/* TODO */
return CStatus_NotImplemented;
@@ -2903,7 +3233,7 @@
/* Save the current graphics state. */
CStatus
CGraphics_Save(CGraphics *_this,
- CUInt32 *state)
+ CUInt32 *state)
{
/* TODO */
return CStatus_NotImplemented;
@@ -2928,12 +3258,12 @@
/* Draw a string. */
CStatus
CGraphics_DrawString(CGraphics *_this,
- CBrush *brush,
- CChar16 *s,
- CUInt32 length,
- CFont *font,
- CRectangleF layoutRect,
- CStringFormat *format)
+ CBrush *brush,
+ const CChar16 *s,
+ CUInt32 length,
+ CFont *font,
+ CRectangleF layoutRect,
+ CStringFormat *format)
{
/* TODO */
return CStatus_NotImplemented;
@@ -2942,13 +3272,13 @@
/* Measure the character ranges for a string. */
CStatus
CGraphics_MeasureCharacterRanges(CGraphics *_this,
- CChar16 *s,
- CUInt32 length,
- CFont *font,
- CRectangleF layoutRect,
- CStringFormat *format,
- CRegion **regions,
- CUInt32 *count)
+ const CChar16 *s,
+ CUInt32 length,
+ CFont *font,
+ CRectangleF layoutRect,
+ CStringFormat *format,
+ CRegion **regions,
+ CUInt32 *count)
{
/* TODO */
return CStatus_NotImplemented;
@@ -2957,18 +3287,167 @@
/* Measure the size of a string. */
CStatus
CGraphics_MeasureString(CGraphics *_this,
- CChar16 *s,
- CUInt32 length,
- CFont *font,
- CRectangleF layoutRect,
- CStringFormat *format,
- CUInt32 *charactersFitted,
- CUInt32 *linesFilled,
- CSizeF *size)
+ const CChar16 *s,
+ CUInt32 length,
+ CFont *font,
+ CRectangleF layoutRect,
+ CStringFormat *format,
+ CUInt32 *charactersFitted,
+ CUInt32 *linesFilled,
+ CSizeF *size)
{
/* TODO */
return CStatus_NotImplemented;
}
+
+/*\
+|*| NOTE: This is just a temporary solution until the above
+|*| methods are implemented and support is added for
+|*| a text layout system which can handle the complex
+|*| requirements of text boxes and rich text boxes.
+\*/
+
+/* Measure the size of a string. */
+CStatus
+CGraphics_MeasureStringSimple(CGraphics *_this,
+ const CChar16 *s,
+ CUInt32 length,
+ CFont *font,
+ CSizeF *size)
+{
+ /* declarations */
+ CTextMetrics metrics;
+ CStatus status;
+
+ /* ensure we have a this pointer */
+ CStatus_Require((_this != 0), CStatus_ArgumentNull);
+
+ /* ensure we have a string pointer */
+ CStatus_Require((s != 0), CStatus_ArgumentNull);
+
+ /* ensure we have a font pointer */
+ CStatus_Require((font != 0), CStatus_ArgumentNull);
+
+ /* ensure we have a size pointer */
+ CStatus_Require((size != 0), CStatus_ArgumentNull);
+
+ /* set the size to the default */
+ CSize_Width(*size) = 0;
+ CSize_Height(*size) = 0;
+
+ /* bail out now if there's nothing to do */
+ CStatus_Require((length != 0), CStatus_OK);
+
+ /* measure the string synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ status =
+ CFont_MeasureString
+ (font, s, length,
&CGraphicsPipeline_Device(_this->pipeline),
+ _this->textRenderingHint, &metrics);
+ }
+ CSurface_Unlock(_this->surface);
+
+ /* handle measuring failures */
+ if(status != CStatus_OK) { return status; }
+
+ /* get the font height */
+ CStatus_Check
+ (CFont_GetHeight
+ (font, &CSize_Height(*size)));
+
+ /* calculate the width */
+ CSize_Width(*size) =
+ (CVector_X(metrics.bearing) + CVector_X(metrics.advance));
+
+ /* return successfully */
+ return CStatus_OK;
+}
+
+/* Draw a string. */
+CStatus
+CGraphics_DrawStringSimple(CGraphics *_this,
+ CBrush *brush,
+ const CChar16 *s,
+ CUInt32 length,
+ CFont *font,
+ CRectangleF layoutRect)
+{
+ /* declarations */
+ CPattern pattern;
+ CStatus status;
+
+ /* ensure we have a this pointer */
+ CStatus_Require((_this != 0), CStatus_ArgumentNull);
+
+ /* ensure we have a brush pointer */
+ CStatus_Require((brush != 0), CStatus_ArgumentNull);
+
+ /* ensure we have a string pointer */
+ CStatus_Require((s != 0), CStatus_ArgumentNull);
+
+ /* ensure we have a font pointer */
+ CStatus_Require((font != 0), CStatus_ArgumentNull);
+
+ /* bail out now if there's nothing to do */
+ CStatus_Require((length != 0), CStatus_OK);
+
+ /* get the source pattern */
+ CStatus_Check
+ (CBrush_GetPattern
+ (brush, &pattern));
+
+ /* draw the string synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ /* declarations */
+ pixman_image_t *clip;
+ pixman_image_t *mask;
+ CUInt32 width;
+ CUInt32 height;
+
+ /* get the clipping mask */
+ CStatus_CheckGOTO
+ (CGraphics_GetClipMask(_this, &clip),
+ status,
+ GOTO_Cleanup);
+
+ /* get the text compositing mask */
+ CStatus_CheckGOTO
+ (CGraphics_GetTextCompositingMask(_this, &mask),
+ status,
+ GOTO_Cleanup);
+
+ /* draw the string to the mask */
+ CStatus_CheckGOTO
+ (CFont_DrawString
+ (font, s, length,
+ CRectangle_X(layoutRect),
+ CRectangle_Y(layoutRect),
+ &CGraphicsPipeline_Device(_this->pipeline),
+ _this->textRenderingHint, clip, mask),
+ status,
+ GOTO_Cleanup);
+
+ /* get the layout bounds */
+ width = (CUInt32)CRectangle_X(layoutRect);
+ height = (CUInt32)CRectangle_X(layoutRect);
+
+ /* ensure that the bounds are non-zero */
+ if(width == 0) { width = 32767; }
+ if(height == 0) { height = 32767; }
+
+ /* composite the string */
+ status =
+ CGraphics_Composite
+ (_this, 0, 0, width, height, &pattern, mask);
+ }
+GOTO_Cleanup:
+ CSurface_Unlock(_this->surface);
+
+ /* return status */
+ return status;
+}
#endif
/******************************************************************************/
@@ -2989,24 +3468,29 @@
/* Flush graphics operations to the display device. */
CStatus
CGraphics_Flush(CGraphics *_this,
- CFlushIntention intention)
+ CFlushIntention intention)
{
+ /* declarations */
+ CStatus status;
+
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
- /* flush the surface */
- CStatus_Check
- (CSurface_Flush
- (_this->surface, intention));
+ /* flush the surface, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ status = CSurface_Flush(_this->surface, intention);
+ }
+ CSurface_Unlock(_this->surface);
- /* return successfully */
- return CStatus_OK;
+ /* return status */
+ return status;
}
/* Get the HDC associated with this graphics context. */
CStatus
CGraphics_GetHdc(CGraphics *_this,
- void **hdc)
+ void **hdc)
{
/* TODO */
return CStatus_NotImplemented;
@@ -3015,8 +3499,8 @@
/* Get the nearest color that is supported by this graphics context. */
CStatus
CGraphics_GetNearestColor(CGraphics *_this,
- CColor color,
- CColor *nearest)
+ CColor color,
+ CColor *nearest)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -3036,7 +3520,7 @@
/* Release a HDC that was obtained via a previous call to "GetHdc". */
CStatus
CGraphics_ReleaseHdc(CGraphics *_this,
- void *hdc)
+ void *hdc)
{
/* TODO */
return CStatus_NotImplemented;
@@ -3045,10 +3529,10 @@
/* Transform points from one coordinate space to another. */
CStatus
CGraphics_TransformPoints(CGraphics *_this,
- CCoordinateSpace dst,
- CCoordinateSpace src,
- CPointF *points,
- CUInt32 count)
+ CCoordinateSpace dst,
+ CCoordinateSpace src,
+ CPointF *points,
+ CUInt32 count)
{
/* declarations */
CAffineTransformF t;
@@ -3065,8 +3549,13 @@
/* bail out now if there's nothing to do */
CStatus_Require((src != dst), CStatus_OK);
- /* get the transformation from source space to destination space */
- CGraphicsPipeline_GetSpaceTransform(&(_this->pipeline), dst, src, &t);
+ /* get the transformation, synchronously */
+ CSurface_Lock(_this->surface);
+ {
+ /* get the transformation from source space to destination
space */
+ CGraphicsPipeline_GetSpaceTransform(&(_this->pipeline), dst,
src, &t);
+ }
+ CSurface_Unlock(_this->surface);
/* apply the transformation to the point list */
CAffineTransformF_TransformPoints(&t, points, count);
Index: libCrayons/src/CGraphicsPipeline.c
diff -u libCrayons/src/CGraphicsPipeline.c:1.2
libCrayons/src/CGraphicsPipeline.c:1.3
--- libCrayons/src/CGraphicsPipeline.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CGraphicsPipeline.c Mon Mar 6 20:05:14 2006
@@ -56,7 +56,7 @@
/* Get the device transformation of this graphics pipeline */
CINTERNAL void
CGraphicsPipeline_GetDevice(CGraphicsPipeline *_this,
- CAffineTransformF *transform)
+ CAffineTransformF *transform)
{
/* assertions */
CASSERT((_this != 0));
@@ -69,7 +69,7 @@
/* Get the inverse device transformation of this graphics pipeline */
CINTERNAL void
CGraphicsPipeline_GetDeviceInverse(CGraphicsPipeline *_this,
- CAffineTransformF *transform)
+ CAffineTransformF *transform)
{
/* assertions */
CASSERT((_this != 0));
@@ -82,7 +82,7 @@
/* Get the page transformation of this graphics pipeline */
CINTERNAL void
CGraphicsPipeline_GetPage(CGraphicsPipeline *_this,
- CAffineTransformF *transform)
+ CAffineTransformF *transform)
{
/* assertions */
CASSERT((_this != 0));
@@ -95,7 +95,7 @@
/* Get the inverse page transformation of this graphics pipeline */
CINTERNAL void
CGraphicsPipeline_GetPageInverse(CGraphicsPipeline *_this,
- CAffineTransformF *transform)
+ CAffineTransformF *transform)
{
/* assertions */
CASSERT((_this != 0));
@@ -108,7 +108,7 @@
/* Get the world transformation of this graphics pipeline */
CINTERNAL void
CGraphicsPipeline_GetWorld(CGraphicsPipeline *_this,
- CAffineTransformF *transform)
+ CAffineTransformF *transform)
{
/* assertions */
CASSERT((_this != 0));
@@ -121,7 +121,7 @@
/* Get the inverse world transformation of this graphics pipeline */
CINTERNAL void
CGraphicsPipeline_GetWorldInverse(CGraphicsPipeline *_this,
- CAffineTransformF *transform)
+ CAffineTransformF *transform)
{
/* assertions */
CASSERT((_this != 0));
@@ -134,9 +134,9 @@
/* Get the transformation from one coordinate space to another. */
CINTERNAL void
CGraphicsPipeline_GetSpaceTransform(CGraphicsPipeline *_this,
- CCoordinateSpace dst,
- CCoordinateSpace src,
- CAffineTransformF *transform)
+ CCoordinateSpace dst,
+ CCoordinateSpace src,
+ CAffineTransformF *transform)
{
/* assertions */
CASSERT((_this != 0));
@@ -209,10 +209,10 @@
/* Set the page transformation of this graphics pipeline. */
CINTERNAL void
CGraphicsPipeline_SetPage(CGraphicsPipeline *_this,
- CGraphicsUnit pageUnit,
- CFloat pageScale,
- CFloat dpiX,
- CFloat dpiY)
+ CGraphicsUnit pageUnit,
+ CFloat pageScale,
+ CFloat dpiX,
+ CFloat dpiY)
{
/* declarations */
CFloat sx;
@@ -321,7 +321,7 @@
/* Set the world transformation of this graphics pipeline. */
CINTERNAL CStatus
CGraphicsPipeline_SetWorld(CGraphicsPipeline *_this,
- CAffineTransformF *transform)
+ CAffineTransformF *transform)
{
/* declarations */
CAffineTransformF inverse;
@@ -349,8 +349,8 @@
/* Multiply the world transformation by another transformation. */
CINTERNAL CStatus
CGraphicsPipeline_MultiplyWorld(CGraphicsPipeline *_this,
- CAffineTransformF *other,
- CMatrixOrder order)
+ CAffineTransformF *other,
+ CMatrixOrder order)
{
/* assertions */
CASSERT((_this != 0));
@@ -375,8 +375,8 @@
/* Rotate the world transformation of this graphics pipeline. */
CINTERNAL void
CGraphicsPipeline_RotateWorld(CGraphicsPipeline *_this,
- CFloat angle,
- CMatrixOrder order)
+ CFloat angle,
+ CMatrixOrder order)
{
/* assertions */
CASSERT((_this != 0));
@@ -396,9 +396,9 @@
/* Scale the world transformation of this graphics pipeline. */
CINTERNAL void
CGraphicsPipeline_ScaleWorld(CGraphicsPipeline *_this,
- CFloat sx,
- CFloat sy,
- CMatrixOrder order)
+ CFloat sx,
+ CFloat sy,
+ CMatrixOrder order)
{
/* assertions */
CASSERT((_this != 0));
@@ -418,9 +418,9 @@
/* Translate the world transformation of this graphics pipeline. */
CINTERNAL void
CGraphicsPipeline_TranslateWorld(CGraphicsPipeline *_this,
- CFloat dx,
- CFloat dy,
- CMatrixOrder order)
+ CFloat dx,
+ CFloat dy,
+ CMatrixOrder order)
{
/* assertions */
CASSERT((_this != 0));
Index: libCrayons/src/CHatchBrush.c
diff -u libCrayons/src/CHatchBrush.c:1.2 libCrayons/src/CHatchBrush.c:1.3
--- libCrayons/src/CHatchBrush.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CHatchBrush.c Mon Mar 6 20:05:14 2006
@@ -19,6 +19,7 @@
*/
#include "CHatchBrush.h"
+#include "CUtils.h"
#ifdef __cplusplus
extern "C" {
@@ -27,15 +28,15 @@
/* Clone this hatch brush. */
static CStatus
CHatchBrush_Clone(CBrush *_this,
- CBrush **_clone)
+ CBrush **_clone)
{
/* declarations */
CHatchBrush *brush;
CHatchBrush **clone;
/* assertions */
- CASSERT((_this != 0));
- CASSERT((clone != 0));
+ CASSERT((_this != 0));
+ CASSERT((_clone != 0));
/* get this as a hatch brush */
brush = (CHatchBrush *)_this;
@@ -62,7 +63,7 @@
/* Create a pattern for this brush. */
static CStatus
CHatchBrush_CreatePattern(CBrush *_this,
- CPattern *pattern)
+ CPattern *pattern)
{
/* assertions */
CASSERT((_this != 0));
@@ -71,12 +72,7 @@
/* create the pattern */
{
/* declarations */
- pixman_format_t *format;
- CHatchBrush *brush;
- CByte *data;
- CColor fg;
- CColor bg;
- CUInt32 stride;
+ CHatchBrush *brush;
/* get this as a hatch brush */
brush = (CHatchBrush *)_this;
@@ -84,68 +80,16 @@
/* set the pattern transformation */
pattern->transform = 0;
- /* calculate the pre-multiplied foreground */
- {
- /* declarations */
- CByte a, r, g, b;
-
- /* get the foreground */
- fg = brush->foreground;
-
- /* get the components and pre-multiply */
- a = ((CColor_A(fg)));
- r = ((CColor_R(fg) * a) / 255);
- g = ((CColor_G(fg) * a) / 255);
- b = ((CColor_B(fg) * a) / 255);
-
- /* set the foreground */
- fg = CPixmanPixel_FromARGB(a, r, g, b);
- }
-
- /* calculate the pre-multiplied background */
- {
- /* declarations */
- CByte a, r, g, b;
-
- /* get the background */
- bg = brush->background;
-
- /* get the components and pre-multiply */
- a = ((CColor_A(bg)));
- r = ((CColor_R(bg) * a) / 255);
- g = ((CColor_G(bg) * a) / 255);
- b = ((CColor_B(bg) * a) / 255);
-
- /* set the background */
- bg = CPixmanPixel_FromARGB(a, r, g, b);
- }
-
- /* create the pixman format */
- format = pixman_format_create(CHatchBrush_DataFormat);
-
- /* ensure we have a format */
- CStatus_Require((format != 0), CStatus_OutOfMemory);
-
- /* create the pixman image */
- pattern->image =
- pixman_image_create
- (format, CHatchBrush_StyleWidth,
CHatchBrush_StyleHeight);
-
- /* destroy the pixman format */
- pixman_format_destroy(format);
-
- /* ensure we have an image */
- CStatus_Require((pattern->image != 0), CStatus_OutOfMemory);
-
- /* get the data and stride */
- data = (CByte *)pixman_image_get_data(pattern->image);
- stride = (CUInt32)pixman_image_get_stride(pattern->image);
-
- /* get the image data for the style */
- CHatchBrush_StyleToData(brush->style, data, stride, fg, bg);
-
- /* set the repeat flag */
- pixman_image_set_repeat(pattern->image, 1);
+ /* create the hatch pattern */
+ CStatus_Check
+ (CUtils_CreateHatchPattern
+ (&pattern->image,
+ CHatchBrush_Styles[brush->style],
+ CHatchBrush_StyleWidth,
+ CHatchBrush_StyleHeight,
+ brush->foreground,
+ brush->background,
+ 1));
}
/* return successfully */
@@ -155,9 +99,9 @@
/* Create a hatch brush. */
CStatus
CHatchBrush_Create(CHatchBrush **_this,
- CHatchStyle style,
- CColor foreground,
- CColor background)
+ CHatchStyle style,
+ CColor foreground,
+ CColor background)
{
/* ensure we have a this pointer pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -186,7 +130,7 @@
/* Get the background color of the hatch. */
CStatus
CHatchBrush_GetBackgroundColor(CHatchBrush *_this,
- CColor *background)
+ CColor *background)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -204,7 +148,7 @@
/* Get the foreground color of the hatch. */
CStatus
CHatchBrush_GetForegroundColor(CHatchBrush *_this,
- CColor *foreground)
+ CColor *foreground)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -222,7 +166,7 @@
/* Get the style of the hatch. */
CStatus
CHatchBrush_GetHatchStyle(CHatchBrush *_this,
- CHatchStyle *style)
+ CHatchStyle *style)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
Index: libCrayons/src/CImage.c
diff -u libCrayons/src/CImage.c:1.2 libCrayons/src/CImage.c:1.3
--- libCrayons/src/CImage.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CImage.c Mon Mar 6 20:05:14 2006
@@ -106,24 +106,24 @@
#if 0
CStatus
CImage_CreateData(CImage **_this,
- CByte *data,
- CUInt32 count)
+ CByte *data,
+ CUInt32 count)
{
/* TODO */
return CStatus_NotImplemented;
}
CStatus
CImage_CreateFile(CImage **_this,
- CChar16 *filename,
- CBool useICM)
+ CChar16 *filename,
+ CBool useICM)
{
/* TODO */
return CStatus_NotImplemented;
}
CStatus
CImage_CreateStream(CImage **_this,
- CStream *stream,
- CBool useICM)
+ CStream *stream,
+ CBool useICM)
{
/* TODO */
return CStatus_NotImplemented;
@@ -217,7 +217,7 @@
/* Get the flags of this image. */
CStatus
CImage_GetFlags(CImage *_this,
- CImageFlag *flags)
+ CImageFlag *flags)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -239,7 +239,7 @@
/* Get the height of this image. */
CStatus
CImage_GetHeight(CImage *_this,
- CUInt32 *height)
+ CUInt32 *height)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -261,7 +261,7 @@
/* Get the horizontal resolution of this image. */
CStatus
CImage_GetHorizontalResolution(CImage *_this,
- CFloat *dpiX)
+ CFloat *dpiX)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -283,7 +283,7 @@
/* Get the type of this image. */
CStatus
CImage_GetImageType(CImage *_this,
- CImageType *type)
+ CImageType *type)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -301,7 +301,7 @@
/* Get the size of this image. */
CStatus
CImage_GetPhysicalDimension(CImage *_this,
- CSizeF *size)
+ CSizeF *size)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -324,7 +324,7 @@
/* Get the pixel format of this image. */
CStatus
CImage_GetPixelFormat(CImage *_this,
- CPixelFormat *pixelFormat)
+ CPixelFormat *pixelFormat)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -346,7 +346,7 @@
/* Get the raw format of this image. */
CStatus
CImage_GetRawFormat(CImage *_this,
- CGuid *format)
+ CGuid *format)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -364,7 +364,7 @@
/* Get the vertical resolution of this image. */
CStatus
CImage_GetVerticalResolution(CImage *_this,
- CFloat *dpiY)
+ CFloat *dpiY)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -386,7 +386,7 @@
/* Get the width of this image. */
CStatus
CImage_GetWidth(CImage *_this,
- CUInt32 *width)
+ CUInt32 *width)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -419,7 +419,7 @@
/* Clone this image. */
CStatus
CImage_Clone(CImage *_this,
- CImage **clone)
+ CImage **clone)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -492,8 +492,8 @@
/* Get a bounding rectangle for this image. */
CStatus
CImage_GetBounds(CImage *_this,
- CGraphicsUnit pageUnit,
- CRectangleF *bounds)
+ CGraphicsUnit pageUnit,
+ CRectangleF *bounds)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -530,9 +530,9 @@
/* Get parameter information for a specific encoder. */
CStatus
CImage_GetEncoderParameters(CImage *_this,
- CGuid encoder,
- CEncoderParameter **parameters,
- CUInt32 *count)
+ CGuid encoder,
+ CEncoderParameter **parameters,
+ CUInt32 *count)
{
/* TODO */
return CStatus_NotImplemented;
@@ -542,8 +542,8 @@
/* Get the raw image data of this image. */
CStatus
CImage_GetData(CImage *_this,
- CByte **data,
- CUInt32 *count)
+ CByte **data,
+ CUInt32 *count)
{
/* TODO */
return CStatus_NotImplemented;
@@ -560,7 +560,7 @@
/* Get the palette of this image. */
CStatus
CImage_GetPalette(CImage *_this,
- CColorPalette **palette)
+ CColorPalette **palette)
{
#if 0
/* declarations */
@@ -599,7 +599,7 @@
/* Set the palette of this image. */
CStatus
CImage_SetPalette(CImage *_this,
- CColorPalette *palette)
+ CColorPalette *palette)
{
#if 0
/* declarations */
@@ -668,8 +668,8 @@
/* Get a specific property item. */
CStatus
CImage_GetPropertyItem(CImage *_this,
- CPropertyID id,
- CPropertyItem *item)
+ CPropertyID id,
+ CPropertyItem *item)
{
#if 0
/* ensure we have a this pointer */
@@ -725,7 +725,7 @@
/* Set a property on this image. */
CStatus
CImage_SetPropertyItem(CImage *_this,
- CPropertyItem *item)
+ CPropertyItem *item)
{
/* TODO */
return CStatus_NotImplemented;
@@ -734,7 +734,7 @@
/* Remove a specific property item. */
CStatus
CImage_RemovePropertyItem(CImage *_this,
- CPropertyID id)
+ CPropertyID id)
{
/* TODO */
return CStatus_NotImplemented;
@@ -743,8 +743,8 @@
/* Get a list of the property ids of this image. */
CStatus
CImage_GetPropertyIDs(CImage *_this,
- CPropertyID **ids,
- CUInt32 *count)
+ CPropertyID **ids,
+ CUInt32 *count)
{
/* TODO */
return CStatus_NotImplemented;
@@ -753,8 +753,8 @@
/* Get a list of the property items of this image. */
CStatus
CImage_GetPropertyItems(CImage *_this,
- CPropertyItem **propertyItems,
- CUInt32 *count)
+ CPropertyItem **propertyItems,
+ CUInt32 *count)
{
/* TODO */
return CStatus_NotImplemented;
@@ -772,9 +772,9 @@
/* Get a thumbnail version of this image. */
CStatus
CImage_GetThumbnailImage(CImage *_this,
- CUInt32 width,
- CUInt32 height,
- CImage **thumbnail)
+ CUInt32 width,
+ CUInt32 height,
+ CImage **thumbnail)
{
/* TODO */
return CStatus_NotImplemented;
@@ -783,7 +783,7 @@
/* Rotate and/or flip this image. */
CStatus
CImage_RotateFlip(CImage *_this,
- CRotateFlipType rotateFlipType)
+ CRotateFlipType rotateFlipType)
{
/* TODO */
return CStatus_NotImplemented;
@@ -801,10 +801,10 @@
/* Save this image. */
CStatus
CImage_Save(CImage *_this,
- CStream *stream,
- CGuid encoder,
- CEncoderParameter *parameters,
- CUInt32 count)
+ CStream *stream,
+ CGuid encoder,
+ CEncoderParameter *parameters,
+ CUInt32 count)
{
/* TODO */
return CStatus_NotImplemented;
@@ -813,17 +813,17 @@
/* Add a frame to the previously saved image file. */
CStatus
CImage_SaveAdd(CImage *_this,
- CEncoderParameter *parameters,
- CUInt32 count)
+ CEncoderParameter *parameters,
+ CUInt32 count)
{
/* TODO */
return CStatus_NotImplemented;
}
CStatus
CImage_SaveAddImage(CImage *_this,
- CImage *image,
- CEncoderParameter *parameters,
- CUInt32 count)
+ CImage *image,
+ CEncoderParameter *parameters,
+ CUInt32 count)
{
/* TODO */
return CStatus_NotImplemented;
@@ -844,8 +844,8 @@
/* Get the number of frames in a specific dimension. */
CStatus
CImage_GetFrameCount(CImage *_this,
- CGuid dimension,
- CUInt32 *frameCount)
+ CGuid dimension,
+ CUInt32 *frameCount)
{
#if 0
/* ensure we have a this pointer */
@@ -897,8 +897,8 @@
/* Get a list of the frame dimensions of this image. */
CStatus
CImage_GetFrameDimensions(CImage *_this,
- CGuid **dimensions,
- CUInt32 *count)
+ CGuid **dimensions,
+ CUInt32 *count)
{
#if 0
/* ensure we have a this pointer */
@@ -959,8 +959,8 @@
/* Select a new frame and make it the active one. */
CStatus
CImage_SelectActiveFrame(CImage *_this,
- CGuid dimension,
- CUInt32 frameIndex)
+ CGuid dimension,
+ CUInt32 frameIndex)
{
#if 0
/* ensure we have a this pointer */
Index: libCrayons/src/CLineBrush.c
diff -u libCrayons/src/CLineBrush.c:1.2 libCrayons/src/CLineBrush.c:1.3
--- libCrayons/src/CLineBrush.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CLineBrush.c Mon Mar 6 20:05:14 2006
@@ -19,6 +19,7 @@
*/
#include "CLineBrush.h"
+#include "CBlend.h"
#include "CMatrix.h"
#include "CUtils.h"
@@ -32,12 +33,12 @@
static void
CLineBrush_Initialize(CLineBrush *_this,
- CRectangleF rectangle,
- CColor startColor,
- CColor endColor,
- CFloat angle,
- CBool isAngleScalable,
- CWrapMode wrapMode)
+ CRectangleF rectangle,
+ CColor startColor,
+ CColor endColor,
+ CFloat angle,
+ CBool isAngleScalable,
+ CWrapMode wrapMode)
{
/* assertions */
CASSERT((_this != 0));
@@ -86,7 +87,7 @@
/* Clone this line brush. */
static CStatus
CLineBrush_Clone(CBrush *_this,
- CBrush **_clone)
+ CBrush **_clone)
{
/* assertions */
CASSERT((_this != 0));
@@ -153,7 +154,7 @@
/* Create a pattern for this brush. */
static CStatus
CLineBrush_CreatePattern(CBrush *_this,
- CPattern *pattern)
+ CPattern *pattern)
{
/* declarations */
CLineBrush *brush;
@@ -177,12 +178,12 @@
/* Create a line brush. */
CStatus
CLineBrush_Create(CLineBrush **_this,
- CRectangleF rectangle,
- CColor startColor,
- CColor endColor,
- CFloat angle,
- CBool isAngleScalable,
- CWrapMode wrapMode)
+ CRectangleF rectangle,
+ CColor startColor,
+ CColor endColor,
+ CFloat angle,
+ CBool isAngleScalable,
+ CWrapMode wrapMode)
{
/* ensure we have a this pointer pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -210,7 +211,7 @@
/* Get the gradient blend. */
CStatus
CLineBrush_GetBlend(CLineBrush *_this,
- CBlend *blend)
+ CBlend *blend)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -228,7 +229,7 @@
/* Set the gradient blend. */
CStatus
CLineBrush_SetBlend(CLineBrush *_this,
- CBlend blend)
+ CBlend blend)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -276,8 +277,8 @@
/* Get the start and end colors of the gradient. */
CStatus
CLineBrush_GetColors(CLineBrush *_this,
- CColor *startColor,
- CColor *endColor)
+ CColor *startColor,
+ CColor *endColor)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -299,8 +300,8 @@
/* Set the start and end colors of the gradient. */
CStatus
CLineBrush_SetColor(CLineBrush *_this,
- CColor startColor,
- CColor endColor)
+ CColor startColor,
+ CColor endColor)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -319,7 +320,7 @@
/* Get the color blend of the gradient. */
CStatus
CLineBrush_GetColorBlend(CLineBrush *_this,
- CColorBlend *colorBlend)
+ CColorBlend *colorBlend)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -337,7 +338,7 @@
/* Set the color blend of the gradient. */
CStatus
CLineBrush_SetColorBlend(CLineBrush *_this,
- CColorBlend colorBlend)
+ CColorBlend colorBlend)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -385,7 +386,7 @@
/* Get the gamma correction flag of the gradient. */
CStatus
CLineBrush_GetGammaCorrection(CLineBrush *_this,
- CBool *gammaCorrection)
+ CBool *gammaCorrection)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -403,7 +404,7 @@
/* Set the gamma correction flag of the gradient. */
CStatus
CLineBrush_SetGammaCorrection(CLineBrush *_this,
- CBool gammaCorrection)
+ CBool gammaCorrection)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -421,7 +422,7 @@
/* Get the bounding rectangle of the gradient. */
CStatus
CLineBrush_GetRectangle(CLineBrush *_this,
- CRectangleF *rectangle)
+ CRectangleF *rectangle)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -439,7 +440,7 @@
/* Get the wrap mode of the gradient. */
CStatus
CLineBrush_GetWrapMode(CLineBrush *_this,
- CWrapMode *wrapMode)
+ CWrapMode *wrapMode)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -457,7 +458,7 @@
/* Set the wrap mode of the gradient. */
CStatus
CLineBrush_SetWrapMode(CLineBrush *_this,
- CWrapMode wrapMode)
+ CWrapMode wrapMode)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -475,7 +476,7 @@
/* Get the transformation matrix of the gradient. */
CStatus
CLineBrush_GetTransform(CLineBrush *_this,
- CMatrix *matrix)
+ CMatrix *matrix)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -487,8 +488,8 @@
/* Multiply the transformation matrix of the gradient by another matrix. */
CStatus
CLineBrush_MultiplyTransform(CLineBrush *_this,
- CMatrix *matrix,
- CMatrixOrder order)
+ CMatrix *matrix,
+ CMatrixOrder order)
{
/* declarations */
CAffineTransformF t;
@@ -531,8 +532,8 @@
/* Rotate the transformation matrix of the gradient. */
CStatus
CLineBrush_RotateTransform(CLineBrush *_this,
- CFloat angle,
- CMatrixOrder order)
+ CFloat angle,
+ CMatrixOrder order)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -550,9 +551,9 @@
/* Scale the transformation matrix of the gradient. */
CStatus
CLineBrush_ScaleTransform(CLineBrush *_this,
- CFloat sx,
- CFloat sy,
- CMatrixOrder order)
+ CFloat sx,
+ CFloat sy,
+ CMatrixOrder order)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -570,8 +571,8 @@
/* Set the shape of the gradient to a triangle. */
CStatus
CLineBrush_SetTriangularShape(CLineBrush *_this,
- CFloat focus,
- CFloat scale)
+ CFloat focus,
+ CFloat scale)
{
/* declarations */
CUInt32 count;
@@ -629,8 +630,8 @@
/* Set the shape of the gradient to a sigma bell. */
CStatus
CLineBrush_SetSigmaBellShape(CLineBrush *_this,
- CFloat focus,
- CFloat scale)
+ CFloat focus,
+ CFloat scale)
{
/* declarations */
CUInt32 count;
@@ -688,7 +689,7 @@
/* Set the transformation matrix of the gradient. */
CStatus
CLineBrush_SetTransform(CLineBrush *_this,
- CMatrix *matrix)
+ CMatrix *matrix)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -708,9 +709,9 @@
/* Translate the transformation matrix of the gradient. */
CStatus
CLineBrush_TranslateTransform(CLineBrush *_this,
- CFloat dx,
- CFloat dy,
- CMatrixOrder order)
+ CFloat dx,
+ CFloat dy,
+ CMatrixOrder order)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
Index: libCrayons/src/CMath.c
diff -u libCrayons/src/CMath.c:1.2 libCrayons/src/CMath.c:1.3
--- libCrayons/src/CMath.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CMath.c Mon Mar 6 20:05:14 2006
@@ -19,12 +19,7 @@
*/
#include "CMath.h"
-
-#ifdef HAVE_MATH_H
- #include <math.h>
-#else
- #error "Basic arithmetic functions (e.g. cos, sqrt) could not be found."
-#endif
+#include <math.h>
#ifdef __cplusplus
extern "C" {
Index: libCrayons/src/CMatrix.c
diff -u libCrayons/src/CMatrix.c:1.2 libCrayons/src/CMatrix.c:1.3
--- libCrayons/src/CMatrix.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CMatrix.c Mon Mar 6 20:05:14 2006
@@ -47,10 +47,10 @@
/* Create a parallelogram warp matrix. */
CStatus
CMatrix_CreateParallelogram(CMatrix **_this,
- CRectangleF rect,
- CPointF tl,
- CPointF tr,
- CPointF bl)
+ CRectangleF rect,
+ CPointF tl,
+ CPointF tr,
+ CPointF bl)
{
/* declarations */
CStatus status;
@@ -83,12 +83,12 @@
/* Create a matrix with the given elements. */
CStatus
CMatrix_CreateElements(CMatrix **_this,
- CFloat m11,
- CFloat m12,
- CFloat m21,
- CFloat m22,
- CFloat dx,
- CFloat dy)
+ CFloat m11,
+ CFloat m12,
+ CFloat m21,
+ CFloat m22,
+ CFloat dx,
+ CFloat dy)
{
/* ensure we have a this pointer pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -107,10 +107,30 @@
return CStatus_OK;
}
+/* Destroy this matrix. */
+CStatus
+CMatrix_Destroy(CMatrix **_this)
+{
+ /* ensure we have a this pointer pointer */
+ CStatus_Require((_this != 0), CStatus_ArgumentNull);
+
+ /* ensure we have a this pointer */
+ CStatus_Require((*_this != 0), CStatus_ArgumentNull);
+
+ /* dispose of the matrix */
+ CFree(*_this);
+
+ /* null the this pointer */
+ *_this = 0;
+
+ /* return successfully */
+ return CStatus_OK;
+}
+
/* Get the determinant of this matrix. */
CStatus
CMatrix_GetDeterminant(CMatrix *_this,
- CFloat *determinant)
+ CFloat *determinant)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -119,8 +139,7 @@
CStatus_Require((determinant != 0), CStatus_ArgumentNull);
/* get the determinant */
- CAffineTransformF_GetDeterminant
- (&(_this->transform), determinant);
+ *determinant = CAffineTransformF_GetDeterminant(&(_this->transform));
/* return successfully */
return CStatus_OK;
@@ -129,7 +148,7 @@
/* Get the inverse of this matrix. */
CStatus
CMatrix_GetInverse(CMatrix *_this,
- CMatrix *inverse)
+ CMatrix *inverse)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -146,7 +165,7 @@
/* Get the transformation of this matrix. */
CINTERNAL CStatus
CMatrix_GetTransform(CMatrix *_this,
- CAffineTransformF *transform)
+ CAffineTransformF *transform)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -164,7 +183,7 @@
/* Set the transformation of this matrix. */
CINTERNAL CStatus
CMatrix_SetTransform(CMatrix *_this,
- CAffineTransformF *transform)
+ CAffineTransformF *transform)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -182,8 +201,8 @@
/* Multiply this matrix with another. */
CStatus
CMatrix_Multiply(CMatrix *_this,
- CMatrix *other,
- CMatrixOrder order)
+ CMatrix *other,
+ CMatrixOrder order)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -202,8 +221,8 @@
/* Determine if the given matrices are equal. */
CStatus
CMatrix_Equals(CMatrix *_this,
- CMatrix *other,
- CBool *eq)
+ CMatrix *other,
+ CBool *eq)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -215,7 +234,7 @@
CStatus_Require((eq != 0), CStatus_ArgumentNull);
/* determine equality */
- CAffineTransformF_Equals(&(_this->transform), &(other->transform), eq);
+ *eq = CAffineTransformF_Equals(&(_this->transform),
&(other->transform));
/* return successfully */
return CStatus_OK;
@@ -224,8 +243,8 @@
/* Determine if the given matrices are not equal. */
CStatus
CMatrix_NotEquals(CMatrix *_this,
- CMatrix *other,
- CBool *ne)
+ CMatrix *other,
+ CBool *ne)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -237,7 +256,7 @@
CStatus_Require((ne != 0), CStatus_ArgumentNull);
/* determine equality */
- CAffineTransformF_NotEquals(&(_this->transform), &(other->transform),
ne);
+ *ne = CAffineTransformF_NotEquals(&(_this->transform),
&(other->transform));
/* return successfully */
return CStatus_OK;
@@ -246,8 +265,8 @@
/* Rotate this matrix. */
CStatus
CMatrix_Rotate(CMatrix *_this,
- CFloat angle,
- CMatrixOrder order)
+ CFloat angle,
+ CMatrixOrder order)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -262,9 +281,9 @@
/* Scale this matrix. */
CStatus
CMatrix_Scale(CMatrix *_this,
- CFloat scaleX,
- CFloat scaleY,
- CMatrixOrder order)
+ CFloat scaleX,
+ CFloat scaleY,
+ CMatrixOrder order)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -279,9 +298,9 @@
/* Shear this matrix. */
CStatus
CMatrix_Shear(CMatrix *_this,
- CFloat shearX,
- CFloat shearY,
- CMatrixOrder order)
+ CFloat shearX,
+ CFloat shearY,
+ CMatrixOrder order)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -296,9 +315,9 @@
/* Translate this matrix. */
CStatus
CMatrix_Translate(CMatrix *_this,
- CFloat offsetX,
- CFloat offsetY,
- CMatrixOrder order)
+ CFloat offsetX,
+ CFloat offsetY,
+ CMatrixOrder order)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -313,8 +332,8 @@
/* Transform a list of points. */
CStatus
CMatrix_TransformPoints(CMatrix *_this,
- CPointF *points,
- CUInt32 count)
+ CPointF *points,
+ CUInt32 count)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -332,8 +351,8 @@
/* Transform a list of vectors. */
CStatus
CMatrix_TransformVectors(CMatrix *_this,
- CPointF *points,
- CUInt32 count)
+ CPointF *points,
+ CUInt32 count)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -348,6 +367,7 @@
return CStatus_OK;
}
+
#ifdef __cplusplus
};
#endif
Index: libCrayons/src/CMemory.c
diff -u libCrayons/src/CMemory.c:1.2 libCrayons/src/CMemory.c:1.3
--- libCrayons/src/CMemory.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CMemory.c Mon Mar 6 20:05:14 2006
@@ -20,17 +20,6 @@
#include "CrayonsInternal.h"
-#ifdef HAVE_STRING_H
- #include <string.h>
-#else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
-#endif
-#ifdef HAVE_MEMORY_H
- #include <memory.h>
-#endif
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -43,14 +32,14 @@
CINTERNAL void *
CRealloc(void *ptr,
- CUInt32 size)
+ CUInt32 size)
{
return realloc(ptr, size);
}
CINTERNAL void *
CCalloc(CUInt32 count,
- CUInt32 size)
+ CUInt32 size)
{
return calloc(count, size);
}
@@ -63,8 +52,8 @@
CINTERNAL void *
CMemSet(void *_dst,
- CByte value,
- CUInt32 length)
+ CByte value,
+ CUInt32 length)
{
#ifdef HAVE_MEMSET
return memset(_dst, value, length);
@@ -89,8 +78,8 @@
CINTERNAL void *
CMemCopy(void *_dst,
- const void *_src,
- CUInt32 length)
+ const void *_src,
+ CUInt32 length)
{
#ifdef HAVE_MEMCPY
return memcpy(_dst, _src, length);
@@ -120,8 +109,8 @@
CINTERNAL void *
CMemMove(void *_dst,
- const void *_src,
- CUInt32 length)
+ const void *_src,
+ CUInt32 length)
{
#ifdef HAVE_MEMMOVE
return memmove(_dst, _src, length);
@@ -169,8 +158,8 @@
CINTERNAL int
CMemCmp(const void *_a,
- const void *_b,
- CUInt32 length)
+ const void *_b,
+ CUInt32 length)
{
#ifdef HAVE_MEMCMP
return memcmp(_a, _b, length);
Index: libCrayons/src/CMutex.c
diff -u libCrayons/src/CMutex.c:1.4 libCrayons/src/CMutex.c:1.5
--- libCrayons/src/CMutex.c:1.4 Sun Dec 11 13:08:34 2005
+++ libCrayons/src/CMutex.c Mon Mar 6 20:05:14 2006
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <Crayons.h>
+#include "CrayonsConfig.h"
#ifdef __cplusplus
extern "C" {
Index: libCrayons/src/CPThreadMutex.c
diff -u libCrayons/src/CPThreadMutex.c:1.2 libCrayons/src/CPThreadMutex.c:1.3
--- libCrayons/src/CPThreadMutex.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CPThreadMutex.c Mon Mar 6 20:05:14 2006
@@ -72,6 +72,12 @@
/* finalize the mutex */
pthread_mutex_destroy(&((*_this)->mutex));
+
+ /* dispose of the mutex */
+ CFree(*_this);
+
+ /* null the this pointer */
+ *_this = 0;
}
Index: libCrayons/src/CPath.c
diff -u libCrayons/src/CPath.c:1.2 libCrayons/src/CPath.c:1.3
--- libCrayons/src/CPath.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CPath.c Mon Mar 6 20:05:14 2006
@@ -34,7 +34,7 @@
#define _SetPoint(currP, currT, x, y, type)
\
*(currT) = (type);
\
- CPoint_X(*(currP)) = (x);
\
+ CPoint_X(*(currP)) = (x);
\
CPoint_Y(*(currP)) = (y)
#define _NextPoint(currP, currT)
\
++currP; ++currT
@@ -43,11 +43,11 @@
_NextPoint((currP), (currT))
#define _MoveTo(currP, currT, x, y)
\
do {
\
- _SetPointAdvance((currP), (currT), (x), (y), CPathType_Start);
\
+ _SetPointAdvance((currP), (currT), (x), (y), CPathType_Start);
\
} while(0)
#define _LineTo(currP, currT, x, y)
\
do {
\
- _SetPointAdvance((currP), (currT), (x), (y), CPathType_Line);
\
+ _SetPointAdvance((currP), (currT), (x), (y), CPathType_Line);
\
} while(0)
#define _LineToClose(currP, currT, x, y)
\
do {
\
@@ -55,23 +55,23 @@
} while(0)
#define _CurveTo(currP, currT, x1, y1, x2, y2, x3, y3)
\
do {
\
- _SetPointAdvance((currP), (currT), (x1), (y1),
CPathType_Bezier); \
- _SetPointAdvance((currP), (currT), (x2), (y2),
CPathType_Bezier); \
- _SetPointAdvance((currP), (currT), (x3), (y3),
CPathType_Bezier); \
+ _SetPointAdvance((currP), (currT), (x1), (y1),
CPathType_Bezier); \
+ _SetPointAdvance((currP), (currT), (x2), (y2),
CPathType_Bezier); \
+ _SetPointAdvance((currP), (currT), (x3), (y3),
CPathType_Bezier); \
} while(0)
#define _CurveToClose(currP, currT, x1, y1, x2, y2, x3, y3)
\
do {
\
- _SetPointAdvance((currP), (currT), (x1), (y1),
CPathType_Bezier); \
- _SetPointAdvance((currP), (currT), (x2), (y2),
CPathType_Bezier); \
+ _SetPointAdvance((currP), (currT), (x1), (y1),
CPathType_Bezier); \
+ _SetPointAdvance((currP), (currT), (x2), (y2),
CPathType_Bezier); \
_SetPointAdvance((currP), (currT), (x3), (y3),
_TYPE_BEZIER_CLOSE); \
} while(0)
#define _BeginAdd(path, n, plist, tlist, x1, y1)
\
do {
\
/* get the current count */
\
- const CUInt32 _cc_ = (path)->count;
\
+ const CUInt32 _cc_ = (path)->count;
\
\
/* ensure the capacity of the point and type lists */
\
- CStatus_Check(CPath_EnsureCapacity((path), (_cc_ + (n))));
\
+ CStatus_Check(CPath_EnsureCapacity((path), (_cc_ + (n))));
\
\
/* update the count */
\
(path)->count = (_cc_ + (n));
\
@@ -98,10 +98,10 @@
#define _BeginNew(path, n, plist, tlist, x1, y1)
\
do {
\
/* get the current count */
\
- const CUInt32 _cc_ = (path)->count;
\
+ const CUInt32 _cc_ = (path)->count;
\
\
/* ensure the capacity of the point and type lists */
\
- CStatus_Check(CPath_EnsureCapacity((path), (_cc_ + (n))));
\
+ CStatus_Check(CPath_EnsureCapacity((path), (_cc_ + (n))));
\
\
/* update the count */
\
(path)->count = (_cc_ + (n));
\
@@ -178,7 +178,7 @@
\*/
static CStatus
CPath_EnsureCapacity(CPath *_this,
- CUInt32 minimum)
+ CUInt32 minimum)
{
/* assertions */
CASSERT((_this != 0));
@@ -246,7 +246,7 @@
/* Get the fill mode of this path. */
CStatus
CPath_GetFillMode(CPath *_this,
- CFillMode *fillMode)
+ CFillMode *fillMode)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -264,7 +264,7 @@
/* Set the fill mode of this path. */
CStatus
CPath_SetFillMode(CPath *_this,
- CFillMode fillMode)
+ CFillMode fillMode)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -279,8 +279,8 @@
/* Get the points in this path. */
CStatus
CPath_GetPoints(CPath *_this,
- CPointF **points,
- CUInt32 *count)
+ CPointF **points,
+ CUInt32 *count)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -318,8 +318,8 @@
/* Get the types of the points in this path. */
CStatus
CPath_GetTypes(CPath *_this,
- CByte **types,
- CUInt32 *count)
+ CByte **types,
+ CUInt32 *count)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -357,9 +357,9 @@
/* Get the points and types in this path. */
CStatus
CPath_GetPathData(CPath *_this,
- CPointF **points,
- CByte **types,
- CUInt32 *count)
+ CPointF **points,
+ CByte **types,
+ CUInt32 *count)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -414,9 +414,9 @@
/* Set the points and types in this path. */
CStatus
CPath_SetPathData(CPath *_this,
- CPointF *points,
- CByte *types,
- CUInt32 count)
+ CPointF *points,
+ CByte *types,
+ CUInt32 count)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -457,12 +457,12 @@
/* Add an arc to the current figure. */
CStatus
CPath_AddArc(CPath *_this,
- CFloat x,
- CFloat y,
- CFloat width,
- CFloat height,
- CFloat startAngle,
- CFloat sweepAngle)
+ CFloat x,
+ CFloat y,
+ CFloat width,
+ CFloat height,
+ CFloat startAngle,
+ CFloat sweepAngle)
{
/* TODO */
return CStatus_NotImplemented;
@@ -471,14 +471,14 @@
/* Add a bezier curve to the current figure. */
CStatus
CPath_AddBezier(CPath *_this,
- CFloat x1,
- CFloat y1,
- CFloat x2,
- CFloat y2,
- CFloat x3,
- CFloat y3,
- CFloat x4,
- CFloat y4)
+ CFloat x1,
+ CFloat y1,
+ CFloat x2,
+ CFloat y2,
+ CFloat x3,
+ CFloat y3,
+ CFloat x4,
+ CFloat y4)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -506,8 +506,8 @@
/* Add a sequence of connected bezier curves to the current figure. */
CStatus
CPath_AddBeziers(CPath *_this,
- CPointF *points,
- CUInt32 count)
+ CPointF *points,
+ CUInt32 count)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -533,15 +533,15 @@
/* perform standard startup procedures for path segment
additions */
_BeginAdd
- (_this, count,
- p, t,
+ (_this, count,
+ p, t,
CPoint_X(*points), CPoint_Y(*points++));
/* add the curve segments */
while(points != end)
{
_CurveTo
- (p, t,
+ (p, t,
CPoint_X(*points), CPoint_Y(*points++),
CPoint_X(*points), CPoint_Y(*points++),
CPoint_X(*points), CPoint_Y(*points++));
@@ -558,9 +558,9 @@
/* Add a closed curve to this path. */
CStatus
CPath_AddClosedCardinalCurve(CPath *_this,
- CPointF *points,
- CUInt32 count,
- CFloat tension)
+ CPointF *points,
+ CUInt32 count,
+ CFloat tension)
{
/* TODO */
return CStatus_NotImplemented;
@@ -569,11 +569,11 @@
/* Add a curve to the current figure. */
CStatus
CPath_AddCardinalCurve(CPath *_this,
- CPointF *points,
- CUInt32 count,
- CUInt32 offset,
- CUInt32 numberOfSegments,
- CFloat tension)
+ CPointF *points,
+ CUInt32 count,
+ CUInt32 offset,
+ CUInt32 numberOfSegments,
+ CFloat tension)
{
/* TODO */
return CStatus_NotImplemented;
@@ -582,10 +582,10 @@
/* Add an ellipse to this path. */
CStatus
CPath_AddEllipse(CPath *_this,
- CFloat x,
- CFloat y,
- CFloat width,
- CFloat height)
+ CFloat x,
+ CFloat y,
+ CFloat width,
+ CFloat height)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -638,10 +638,10 @@
/* Add a line to the current figure. */
CStatus
CPath_AddLine(CPath *_this,
- CFloat x1,
- CFloat y1,
- CFloat x2,
- CFloat y2)
+ CFloat x1,
+ CFloat y1,
+ CFloat x2,
+ CFloat y2)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -666,8 +666,8 @@
/* Add a sequence of connected line segments to the current figure. */
CStatus
CPath_AddLines(CPath *_this,
- CPointF *points,
- CUInt32 count)
+ CPointF *points,
+ CUInt32 count)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -689,15 +689,15 @@
/* perform standard startup procedures for path segment
additions */
_BeginAdd
- (_this, count,
- p, t,
+ (_this, count,
+ p, t,
CPoint_X(*points), CPoint_Y(*points++));
/* add the line segments */
while(points != end)
{
_LineTo
- (p, t,
+ (p, t,
CPoint_X(*points), CPoint_Y(*points++));
}
}
@@ -709,8 +709,8 @@
/* Add the contents of another path to this path. */
CStatus
CPath_AddPath(CPath *_this,
- CPath *path,
- CBool connect)
+ CPath *path,
+ CBool connect)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -759,12 +759,12 @@
/* Add a pie section to this path. */
CStatus
CPath_AddPie(CPath *_this,
- CFloat x,
- CFloat y,
- CFloat width,
- CFloat height,
- CFloat startAngle,
- CFloat sweepAngle)
+ CFloat x,
+ CFloat y,
+ CFloat width,
+ CFloat height,
+ CFloat startAngle,
+ CFloat sweepAngle)
{
/* TODO */
return CStatus_NotImplemented;
@@ -773,8 +773,8 @@
/* Add a polygon to this path. */
CStatus
CPath_AddPolygon(CPath *_this,
- CPointF *points,
- CUInt32 count)
+ CPointF *points,
+ CUInt32 count)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -804,21 +804,21 @@
/* perform standard startup procedures for new figure additions
*/
_BeginNew
- (_this, count,
- p, t,
+ (_this, count,
+ p, t,
CPoint_X(*points), CPoint_Y(*points++));
/* add the polygon edges */
while(points != last)
{
_LineTo
- (p, t,
+ (p, t,
CPoint_X(*points), CPoint_Y(*points++));
}
/* complete the polygon */
_LineToClose
- (p, t,
+ (p, t,
CPoint_X(*points), CPoint_Y(*points));
}
@@ -829,10 +829,10 @@
/* Add a rectangle to this path. */
CStatus
CPath_AddRectangle(CPath *_this,
- CFloat x,
- CFloat y,
- CFloat width,
- CFloat height)
+ CFloat x,
+ CFloat y,
+ CFloat width,
+ CFloat height)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -863,8 +863,8 @@
/* Add a sequence of rectangles to this path. */
CStatus
CPath_AddRectangles(CPath *_this,
- CRectangleF *rects,
- CUInt32 count)
+ CRectangleF *rects,
+ CUInt32 count)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -929,13 +929,13 @@
/* Add a string to this path. */
CStatus
CPath_AddString(CPath *_this,
- CChar16 *s,
- CUInt32 length,
- CFontFamily *family,
- CFontStyle style,
- CFloat emSize,
- CRectangleF layoutRect,
- CStringFormat *format)
+ CChar16 *s,
+ CUInt32 length,
+ CFontFamily *family,
+ CFontStyle style,
+ CFloat emSize,
+ CRectangleF layoutRect,
+ CStringFormat *format)
{
/* TODO */
return CStatus_NotImplemented;
@@ -970,7 +970,7 @@
/* Clone this path. */
CStatus
CPath_Clone(CPath *_this,
- CPath **clone)
+ CPath **clone)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -1099,8 +1099,8 @@
/* Flatten curves in this path into sequences of connected line segments. */
CStatus
CPath_Flatten(CPath *_this,
- CMatrix *matrix,
- CFloat flatness)
+ CMatrix *matrix,
+ CFloat flatness)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -1170,7 +1170,7 @@
/* Get the point count of this path. */
CStatus
CPath_GetCount(CPath *_this,
- CUInt32 *count)
+ CUInt32 *count)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -1188,9 +1188,9 @@
/* Get the bounds of this path. */
CStatus
CPath_GetBounds(CPath *_this,
- CMatrix *matrix,
- CPen *pen,
- CRectangleF *bounds)
+ CMatrix *matrix,
+ CPen *pen,
+ CRectangleF *bounds)
{
/* TODO */
return CStatus_NotImplemented;
@@ -1199,7 +1199,7 @@
/* Get the last point in this path. */
CStatus
CPath_GetLastPoint(CPath *_this,
- CPointF *point)
+ CPointF *point)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -1220,11 +1220,11 @@
/* Determine if a point is visible within an outline of this path. */
CStatus
CPath_IsOutlineVisible(CPath *_this,
- CFloat x,
- CFloat y,
- CPen *pen,
- CGraphics *graphics,
- CBool *visible)
+ CFloat x,
+ CFloat y,
+ CPen *pen,
+ CGraphics *graphics,
+ CBool *visible)
{
/* TODO */
return CStatus_NotImplemented;
@@ -1233,10 +1233,10 @@
/* Determine if a point is visible within this path. */
CStatus
CPath_IsVisible(CPath *_this,
- CFloat x,
- CFloat y,
- CGraphics *graphics,
- CBool *visible)
+ CFloat x,
+ CFloat y,
+ CGraphics *graphics,
+ CBool *visible)
{
/* TODO */
return CStatus_NotImplemented;
@@ -1307,7 +1307,7 @@
/* Transform the points of this path by a matrix. */
CStatus
CPath_Transform(CPath *_this,
- CMatrix *matrix)
+ CMatrix *matrix)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -1333,15 +1333,15 @@
/* Warp the points of this path. */
CStatus
CPath_Warp(CPath *_this,
- CMatrix *matrix,
- CPointF *dstPoints,
- CUInt32 dstLength,
- CFloat srcX,
- CFloat srcY,
- CFloat srcWidth,
- CFloat srcHeight,
- CWarpMode warpMode,
- CFloat flatness)
+ CMatrix *matrix,
+ CPointF *dstPoints,
+ CUInt32 dstLength,
+ CFloat srcX,
+ CFloat srcY,
+ CFloat srcWidth,
+ CFloat srcHeight,
+ CWarpMode warpMode,
+ CFloat flatness)
{
/* TODO */
return CStatus_NotImplemented;
@@ -1350,9 +1350,9 @@
/* Widen this path. */
CStatus
CPath_Widen(CPath *_this,
- CPen *pen,
- CMatrix *matrix,
- CFloat flatness)
+ CPen *pen,
+ CMatrix *matrix,
+ CFloat flatness)
{
/* TODO */
return CStatus_NotImplemented;
@@ -1361,7 +1361,7 @@
/* Transform the points of this path by an affine transformation. */
CINTERNAL void
CPath_TransformAffine(CPath *_this,
- CAffineTransformF *transform)
+ CAffineTransformF *transform)
{
/* assertions */
CASSERT((_this != 0));
@@ -1378,8 +1378,8 @@
/* Stroke this path to another path. */
CINTERNAL CStatus
CPath_Stroke(CPath *_this,
- CPath *stroke,
- CStroker *stroker)
+ CPath *stroke,
+ CStroker *stroker)
{
/* assertions */
CASSERT((_this != 0));
@@ -1389,7 +1389,8 @@
/* stroke the path */
CStatus_Check
(CStroker_Stroke
- (stroker, stroke, _this->points, _this->types,
_this->count));
+ (stroker, stroke, _this->points, _this->types,
_this->count,
+ _this->hasCurves));
/* return successfully */
return CStatus_OK;
@@ -1398,7 +1399,7 @@
/* Fill this path to trapezoids. */
CINTERNAL CStatus
CPath_Fill(CPath *_this,
- CTrapezoids *trapezoids)
+ CTrapezoids *trapezoids)
{
/* declarations */
CFillMode fillMode;
Index: libCrayons/src/CPathBrush.c
diff -u libCrayons/src/CPathBrush.c:1.2 libCrayons/src/CPathBrush.c:1.3
--- libCrayons/src/CPathBrush.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CPathBrush.c Mon Mar 6 20:05:14 2006
@@ -19,6 +19,7 @@
*/
#include "CPathBrush.h"
+#include "CBlend.h"
#include "CMatrix.h"
#include "CPath.h"
#include "CUtils.h"
@@ -34,7 +35,7 @@
/* Initialize this path brush. */
static CStatus
CPathBrush_Initialize(CPathBrush *_this,
- CPath *path)
+ CPath *path)
{
/* assertions */
CASSERT((_this != 0));
@@ -180,7 +181,7 @@
/* Clone this path brush. */
static CStatus
CPathBrush_Clone(CBrush *_this,
- CBrush **_clone)
+ CBrush **_clone)
{
/* assertions */
CASSERT((_this != 0));
@@ -256,7 +257,7 @@
/* Create a pattern for this brush. */
static CStatus
CPathBrush_CreatePattern(CBrush *_this,
- CPattern *pattern)
+ CPattern *pattern)
{
/* declarations */
CPathBrush *brush;
@@ -280,7 +281,7 @@
/* Create a path brush. */
CStatus
CPathBrush_Create(CPathBrush **_this,
- CPath *path)
+ CPath *path)
{
/* ensure we have a this pointer pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -315,7 +316,7 @@
/* Get the gradient blend. */
CStatus
CPathBrush_GetBlend(CPathBrush *_this,
- CBlend *blend)
+ CBlend *blend)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -333,7 +334,7 @@
/* Set the gradient blend. */
CStatus
CPathBrush_SetBlend(CPathBrush *_this,
- CBlend blend)
+ CBlend blend)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -381,7 +382,7 @@
/* Get the center color of the gradient. */
CStatus
CPathBrush_GetCenterColor(CPathBrush *_this,
- CColor *centerColor)
+ CColor *centerColor)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -399,7 +400,7 @@
/* Set the center color of the gradient. */
CStatus
CPathBrush_SetCenterColor(CPathBrush *_this,
- CColor centerColor)
+ CColor centerColor)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -417,7 +418,7 @@
/* Get the center point of the gradient. */
CStatus
CPathBrush_GetCenterPoint(CPathBrush *_this,
- CPointF *centerPoint)
+ CPointF *centerPoint)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -435,7 +436,7 @@
/* Set the center point of the gradient. */
CStatus
CPathBrush_SetCenterPoint(CPathBrush *_this,
- CPointF centerPoint)
+ CPointF centerPoint)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -453,7 +454,7 @@
/* Get the color blend of the gradient. */
CStatus
CPathBrush_GetColorBlend(CPathBrush *_this,
- CColorBlend *colorBlend)
+ CColorBlend *colorBlend)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -471,7 +472,7 @@
/* Set the color blend of the gradient. */
CStatus
CPathBrush_SetColorBlend(CPathBrush *_this,
- CColorBlend colorBlend)
+ CColorBlend colorBlend)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -519,7 +520,7 @@
/* Get the focus point of the gradient. */
CStatus
CPathBrush_GetFocusPoint(CPathBrush *_this,
- CPointF *focusPoint)
+ CPointF *focusPoint)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -537,7 +538,7 @@
/* Set the focus point of the gradient. */
CStatus
CPathBrush_SetFocusPoint(CPathBrush *_this,
- CPointF focusPoint)
+ CPointF focusPoint)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -555,7 +556,7 @@
/* Get the bounding rectangle of the gradient. */
CStatus
CPathBrush_GetRectangle(CPathBrush *_this,
- CRectangleF *rectangle)
+ CRectangleF *rectangle)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -573,8 +574,8 @@
/* Get the surrounding colors of the gradient. */
CStatus
CPathBrush_GetSurroundColors(CPathBrush *_this,
- CColor **surroundColors,
- CUInt32 *count)
+ CColor **surroundColors,
+ CUInt32 *count)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -607,8 +608,8 @@
/* Set the colors of the gradient path points. */
CStatus
CPathBrush_SetSurroundColors(CPathBrush *_this,
- CColor *surroundColors,
- CUInt32 count)
+ CColor *surroundColors,
+ CUInt32 count)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -663,7 +664,7 @@
/* Get the wrap mode of the gradient. */
CStatus
CPathBrush_GetWrapMode(CPathBrush *_this,
- CWrapMode *wrapMode)
+ CWrapMode *wrapMode)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -681,7 +682,7 @@
/* Set the wrap mode of the gradient. */
CStatus
CPathBrush_SetWrapMode(CPathBrush *_this,
- CWrapMode wrapMode)
+ CWrapMode wrapMode)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -699,7 +700,7 @@
/* Get the transformation matrix of the gradient. */
CStatus
CPathBrush_GetTransform(CPathBrush *_this,
- CMatrix *matrix)
+ CMatrix *matrix)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -711,8 +712,8 @@
/* Multiply the transformation matrix of the gradient by another matrix. */
CStatus
CPathBrush_MultiplyTransform(CPathBrush *_this,
- CMatrix *matrix,
- CMatrixOrder order)
+ CMatrix *matrix,
+ CMatrixOrder order)
{
/* declarations */
CAffineTransformF t;
@@ -755,8 +756,8 @@
/* Rotate the transformation matrix of the gradient. */
CStatus
CPathBrush_RotateTransform(CPathBrush *_this,
- CFloat angle,
- CMatrixOrder order)
+ CFloat angle,
+ CMatrixOrder order)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -774,9 +775,9 @@
/* Scale the transformation matrix of the gradient. */
CStatus
CPathBrush_ScaleTransform(CPathBrush *_this,
- CFloat sx,
- CFloat sy,
- CMatrixOrder order)
+ CFloat sx,
+ CFloat sy,
+ CMatrixOrder order)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -794,8 +795,8 @@
/* Set the shape of the gradient to a triangle. */
CStatus
CPathBrush_SetTriangularShape(CPathBrush *_this,
- CFloat focus,
- CFloat scale)
+ CFloat focus,
+ CFloat scale)
{
/* declarations */
CUInt32 count;
@@ -853,8 +854,8 @@
/* Set the shape of the gradient to a sigma bell. */
CStatus
CPathBrush_SetSigmaBellShape(CPathBrush *_this,
- CFloat focus,
- CFloat scale)
+ CFloat focus,
+ CFloat scale)
{
/* declarations */
CUInt32 count;
@@ -912,7 +913,7 @@
/* Set the transformation matrix of the gradient. */
CStatus
CPathBrush_SetTransform(CPathBrush *_this,
- CMatrix *matrix)
+ CMatrix *matrix)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -932,9 +933,9 @@
/* Translate the transformation matrix of the gradient. */
CStatus
CPathBrush_TranslateTransform(CPathBrush *_this,
- CFloat dx,
- CFloat dy,
- CMatrixOrder order)
+ CFloat dx,
+ CFloat dy,
+ CMatrixOrder order)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
Index: libCrayons/src/CPathInterpreter.c
diff -u libCrayons/src/CPathInterpreter.c:1.2
libCrayons/src/CPathInterpreter.c:1.3
--- libCrayons/src/CPathInterpreter.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CPathInterpreter.c Mon Mar 6 20:05:14 2006
@@ -26,9 +26,9 @@
CINTERNAL CStatus
CPathInterpreter_Interpret(CPathInterpreter *_this,
- const CPointF *points,
- const CByte *types,
- CUInt32 count)
+ const CPointF *points,
+ const CByte *types,
+ CUInt32 count)
{
/* declarations */
const CPointF *currP;
Index: libCrayons/src/CPen.c
diff -u libCrayons/src/CPen.c:1.2 libCrayons/src/CPen.c:1.3
--- libCrayons/src/CPen.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CPen.c Mon Mar 6 20:05:14 2006
@@ -48,8 +48,8 @@
static CStatus
CPen_Initialize(CPen *_this,
- CBrush *brush,
- CFloat width)
+ CBrush *brush,
+ CFloat width)
{
/* assertions */
CASSERT((_this != 0));
@@ -123,8 +123,8 @@
/* Create a pen. */
CStatus
CPen_Create(CPen **_this,
- CBrush *brush,
- CFloat width)
+ CBrush *brush,
+ CFloat width)
{
/* declarations */
CStatus status;
@@ -174,7 +174,7 @@
/* Get the alignment of this pen. */
CStatus
CPen_GetAlignment(CPen *_this,
- CPenAlignment *alignment)
+ CPenAlignment *alignment)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -192,7 +192,7 @@
/* Set the alignment of this pen. */
CStatus
CPen_SetAlignment(CPen *_this,
- CPenAlignment alignment)
+ CPenAlignment alignment)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -207,7 +207,7 @@
/* Get the brush of this pen. */
CStatus
CPen_GetBrush(CPen *_this,
- CBrush **brush)
+ CBrush **brush)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -222,7 +222,7 @@
/* Set the brush of this pen. */
CStatus
CPen_SetBrush(CPen *_this,
- CBrush *brush)
+ CBrush *brush)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -254,9 +254,9 @@
/* Set the line and dash caps of this pen. */
CStatus
CPen_SetCaps(CPen *_this,
- CLineCap startCap,
- CLineCap endCap,
- CDashCap dashCap)
+ CLineCap startCap,
+ CLineCap endCap,
+ CDashCap dashCap)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -273,7 +273,7 @@
/* Get the color of this pen. */
CStatus
CPen_GetColor(CPen *_this,
- CColor *color)
+ CColor *color)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -309,8 +309,8 @@
/* Get the compound array of this pen. */
CStatus
CPen_GetCompoundArray(CPen *_this,
- CFloat **compoundArray,
- CUInt32 *count)
+ CFloat **compoundArray,
+ CUInt32 *count)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -360,8 +360,8 @@
/* Set the compound array of this pen. */
CStatus
CPen_SetCompoundArray(CPen *_this,
- const CFloat *compoundArray,
- CUInt32 count)
+ const CFloat *compoundArray,
+ CUInt32 count)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -466,7 +466,7 @@
/* Get the custom end cap of this pen. */
CStatus
CPen_GetCustomEndCap(CPen *_this,
- CCustomLineCap **customEndCap)
+ CCustomLineCap **customEndCap)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -495,7 +495,7 @@
/* Set the custom end cap of this pen. */
CStatus
CPen_SetCustomEndCap(CPen *_this,
- CCustomLineCap *customEndCap)
+ CCustomLineCap *customEndCap)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -531,7 +531,7 @@
/* Get the custom start cap of this pen. */
CStatus
CPen_GetCustomStartCap(CPen *_this,
- CCustomLineCap **customStartCap)
+ CCustomLineCap **customStartCap)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -560,7 +560,7 @@
/* Set the custom start cap of this pen. */
CStatus
CPen_SetCustomStartCap(CPen *_this,
- CCustomLineCap *customStartCap)
+ CCustomLineCap *customStartCap)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -596,7 +596,7 @@
/* Get the dash cap of this pen. */
CStatus
CPen_GetDashCap(CPen *_this,
- CDashCap *dashCap)
+ CDashCap *dashCap)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -614,7 +614,7 @@
/* Set the dash cap of this pen. */
CStatus
CPen_SetDashCap(CPen *_this,
- CDashCap dashCap)
+ CDashCap dashCap)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -629,7 +629,7 @@
/* Get the dash offset of this pen. */
CStatus
CPen_GetDashOffset(CPen *_this,
- CFloat *dashOffset)
+ CFloat *dashOffset)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -647,7 +647,7 @@
/* Set the dash offset of this pen. */
CStatus
CPen_SetDashOffset(CPen *_this,
- CFloat dashOffset)
+ CFloat dashOffset)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -662,8 +662,8 @@
/* Get the dash pattern of this pen. */
CStatus
CPen_GetDashPattern(CPen *_this,
- CFloat **dashPattern,
- CUInt32 *count)
+ CFloat **dashPattern,
+ CUInt32 *count)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -712,8 +712,8 @@
/* Set the dash pattern of this pen. */
CStatus
CPen_SetDashPattern(CPen *_this,
- const CFloat *dashPattern,
- CUInt32 count)
+ const CFloat *dashPattern,
+ CUInt32 count)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -778,7 +778,7 @@
/* Get the dash style of this pen. */
CStatus
CPen_GetDashStyle(CPen *_this,
- CDashStyle *dashStyle)
+ CDashStyle *dashStyle)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -796,7 +796,7 @@
/* Set the dash style of this pen. */
CStatus
CPen_SetDashStyle(CPen *_this,
- CDashStyle dashStyle)
+ CDashStyle dashStyle)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -825,7 +825,7 @@
/* Get the end cap of this pen. */
CStatus
CPen_GetEndCap(CPen *_this,
- CLineCap *endCap)
+ CLineCap *endCap)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -843,7 +843,7 @@
/* Set the end cap of this pen. */
CStatus
CPen_SetEndCap(CPen *_this,
- CLineCap endCap)
+ CLineCap endCap)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -858,7 +858,7 @@
/* Get the line join of this pen. */
CStatus
CPen_GetLineJoin(CPen *_this,
- CLineJoin *lineJoin)
+ CLineJoin *lineJoin)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -876,7 +876,7 @@
/* Set the line join of this pen. */
CStatus
CPen_SetLineJoin(CPen *_this,
- CLineJoin lineJoin)
+ CLineJoin lineJoin)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -891,7 +891,7 @@
/* Get the miter limit of this pen. */
CStatus
CPen_GetMiterLimit(CPen *_this,
- CFloat *miterLimit)
+ CFloat *miterLimit)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -909,7 +909,7 @@
/* Set the miter limit of this pen. */
CStatus
CPen_SetMiterLimit(CPen *_this,
- CFloat miterLimit)
+ CFloat miterLimit)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -924,7 +924,7 @@
/* Get the type of this pen. */
CStatus
CPen_GetPenType(CPen *_this,
- CPenType *type)
+ CPenType *type)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -953,7 +953,7 @@
/* Get the start cap of this pen. */
CStatus
CPen_GetStartCap(CPen *_this,
- CLineCap *startCap)
+ CLineCap *startCap)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -971,7 +971,7 @@
/* Set the start cap of this pen. */
CStatus
CPen_SetStartCap(CPen *_this,
- CLineCap startCap)
+ CLineCap startCap)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -986,7 +986,7 @@
/* Get the width of this pen. */
CStatus
CPen_GetWidth(CPen *_this,
- CFloat *width)
+ CFloat *width)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -1004,7 +1004,7 @@
/* Set the width of this pen. */
CStatus
CPen_SetWidth(CPen *_this,
- CFloat width)
+ CFloat width)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -1019,7 +1019,7 @@
/* Clone this pen. */
CStatus
CPen_Clone(CPen *_this,
- CPen **clone)
+ CPen **clone)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -1143,7 +1143,7 @@
/* Get the transformation matrix of this pen. */
CStatus
CPen_GetTransform(CPen *_this,
- CMatrix *matrix)
+ CMatrix *matrix)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -1155,8 +1155,8 @@
/* Multiply the transformation matrix of this pen by another matrix. */
CStatus
CPen_MultiplyTransform(CPen *_this,
- CMatrix *matrix,
- CMatrixOrder order)
+ CMatrix *matrix,
+ CMatrixOrder order)
{
/* declarations */
CAffineTransformF t;
@@ -1193,8 +1193,8 @@
/* Rotate the transformation matrix of this pen. */
CStatus
CPen_RotateTransform(CPen *_this,
- CFloat angle,
- CMatrixOrder order)
+ CFloat angle,
+ CMatrixOrder order)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -1209,9 +1209,9 @@
/* Scale the transformation matrix of this pen. */
CStatus
CPen_ScaleTransform(CPen *_this,
- CFloat sx,
- CFloat sy,
- CMatrixOrder order)
+ CFloat sx,
+ CFloat sy,
+ CMatrixOrder order)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -1226,7 +1226,7 @@
/* Set the transformation matrix of this pen. */
CStatus
CPen_SetTransform(CPen *_this,
- CMatrix *matrix)
+ CMatrix *matrix)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -1243,9 +1243,9 @@
/* Translate the transformation matrix of this pen. */
CStatus
CPen_TranslateTransform(CPen *_this,
- CFloat dx,
- CFloat dy,
- CMatrixOrder order)
+ CFloat dx,
+ CFloat dy,
+ CMatrixOrder order)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -1260,7 +1260,7 @@
/* Get a pattern for this pen. */
CINTERNAL CStatus
CPen_GetPattern(CPen *_this,
- CPattern *pattern)
+ CPattern *pattern)
{
/* assertions */
CASSERT((_this != 0));
Index: libCrayons/src/CPointArray.c
diff -u libCrayons/src/CPointArray.c:1.2 libCrayons/src/CPointArray.c:1.3
--- libCrayons/src/CPointArray.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CPointArray.c Mon Mar 6 20:05:14 2006
@@ -74,7 +74,7 @@
CINTERNAL CStatus
CPointArrayX_AppendPointNoRepeat(CPointArrayX *_this,
- CPointX *point)
+ CPointX *point)
{
/* assertions */
CASSERT((_this != 0));
@@ -109,7 +109,7 @@
CINTERNAL CStatus
CPointArrayF_AppendPointNoRepeat(CPointArrayF *_this,
- CPointF *point)
+ CPointF *point)
{
/* assertions */
CASSERT((_this != 0));
@@ -144,7 +144,7 @@
CINTERNAL CStatus
CPointArrayX_AppendPoint(CPointArrayX *_this,
- CPointX *point)
+ CPointX *point)
{
/* assertions */
CASSERT((_this != 0));
@@ -164,7 +164,7 @@
CINTERNAL CStatus
CPointArrayF_AppendPoint(CPointArrayF *_this,
- CPointF *point)
+ CPointF *point)
{
/* assertions */
CASSERT((_this != 0));
@@ -184,7 +184,7 @@
CINTERNAL CStatus
CPointArrayX_EnsureCapacity(CPointArrayX *_this,
- CUInt32 minimum)
+ CUInt32 minimum)
{
/* assertions */
CASSERT((_this != 0));
@@ -242,7 +242,7 @@
CINTERNAL CStatus
CPointArrayF_EnsureCapacity(CPointArrayF *_this,
- CUInt32 minimum)
+ CUInt32 minimum)
{
/* assertions */
CASSERT((_this != 0));
Index: libCrayons/src/CPolygon.c
diff -u libCrayons/src/CPolygon.c:1.2 libCrayons/src/CPolygon.c:1.3
--- libCrayons/src/CPolygon.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CPolygon.c Mon Mar 6 20:05:14 2006
@@ -98,8 +98,8 @@
CINTERNAL CStatus
CPolygonX_AddEdge(CPolygonX *_this,
- CPointX *point1,
- CPointX *point2)
+ CPointX *point1,
+ CPointX *point2)
{
/* assertions */
CASSERT((_this != 0));
@@ -188,7 +188,7 @@
CINTERNAL CStatus
CPolygonX_MoveTo(CPolygonX *_this,
- CPointX *point)
+ CPointX *point)
{
/* assertions */
CASSERT((_this != 0));
@@ -210,7 +210,7 @@
CINTERNAL CStatus
CPolygonX_LineTo(CPolygonX *_this,
- CPointX *point)
+ CPointX *point)
{
/* assertions */
CASSERT((_this != 0));
Index: libCrayons/src/CRegion.c
diff -u libCrayons/src/CRegion.c:1.2 libCrayons/src/CRegion.c:1.3
--- libCrayons/src/CRegion.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CRegion.c Mon Mar 6 20:05:14 2006
@@ -36,86 +36,86 @@
#define _OperationPath(_this, type, path)
\
do {
\
/* declarations */
\
- CRegionOp *_op;
\
- CRegionPath *_data;
\
+ CRegionOp *_op;
\
+ CRegionPath *_data;
\
\
/* create the path node */
\
- CStatus_Check
\
- (CRegionPath_Create
\
+ CStatus_Check
\
+ (CRegionPath_Create
\
(&_data, (path)));
\
\
/* create the operation node */
\
- if(!(CRegionOp_Alloc(_op)))
\
+ if(!(CRegionOp_Alloc(_op)))
\
{
\
- return CStatus_OutOfMemory;
\
+ return CStatus_OutOfMemory;
\
}
\
\
/* initialize the operation node */
\
- _op->_base = CRegionNode_ ## type;
\
+ _op->_base = CRegionNode_ ## type;
\
_op->left = (_this)->head;
\
- _op->right = ((CRegionNode *)_data);
\
+ _op->right = ((CRegionNode *)_data);
\
\
/* reset the head node */
\
- (_this)->head = ((CRegionNode *)_op);
\
+ (_this)->head = ((CRegionNode *)_op);
\
\
/* handle change event */
\
- CRegion_OnChange((_this));
\
+ CRegion_OnChange((_this));
\
} while(0)
#define _OperationRectangle(_this, type, rectangle)
\
do {
\
/* declarations */
\
- CRegionOp *_op;
\
- CRegionRect *_data;
\
+ CRegionOp *_op;
\
+ CRegionRect *_data;
\
\
/* create the rectangle node */
\
- CStatus_Check
\
- (CRegionRect_Create
\
+ CStatus_Check
\
+ (CRegionRect_Create
\
(&_data, (rectangle)));
\
\
/* create the operation node */
\
- if(!(CRegionOp_Alloc(_op)))
\
+ if(!(CRegionOp_Alloc(_op)))
\
{
\
- return CStatus_OutOfMemory;
\
+ return CStatus_OutOfMemory;
\
}
\
\
/* initialize the operation node */
\
- _op->_base = CRegionNode_ ## type;
\
+ _op->_base = CRegionNode_ ## type;
\
_op->left = (_this)->head;
\
- _op->right = ((CRegionNode *)_data);
\
+ _op->right = ((CRegionNode *)_data);
\
\
/* reset the head node */
\
- (_this)->head = ((CRegionNode *)_op);
\
+ (_this)->head = ((CRegionNode *)_op);
\
\
/* handle change event */
\
- CRegion_OnChange((_this));
\
+ CRegion_OnChange((_this));
\
} while(0)
#define _OperationRegion(_this, type, other)
\
do {
\
/* declarations */
\
- CRegionOp *_op;
\
- CRegionNode *_data;
\
+ CRegionOp *_op;
\
+ CRegionNode *_data;
\
\
/* create the copy nodes */
\
- CStatus_Check
\
- (CRegionNode_Clone
\
+ CStatus_Check
\
+ (CRegionNode_Clone
\
((other)->head, &_data));
\
\
/* create the operation node */
\
- if(!(CRegionOp_Alloc(_op)))
\
+ if(!(CRegionOp_Alloc(_op)))
\
{
\
- return CStatus_OutOfMemory;
\
+ return CStatus_OutOfMemory;
\
}
\
\
/* initialize the operation node */
\
- _op->_base = CRegionNode_ ## type;
\
+ _op->_base = CRegionNode_ ## type;
\
_op->left = (_this)->head;
\
- _op->right = ((CRegionNode *)_data);
\
+ _op->right = ((CRegionNode *)_data);
\
\
/* reset the head node */
\
- (_this)->head = ((CRegionNode *)_op);
\
+ (_this)->head = ((CRegionNode *)_op);
\
\
/* handle change event */
\
- CRegion_OnChange((_this));
\
+ CRegion_OnChange((_this));
\
} while(0)
CINTERNAL void
@@ -143,7 +143,7 @@
static CStatus
CRegionPath_Create(CRegionPath **_this,
- CPath *path)
+ CPath *path)
{
/* declarations */
CPointF *points;
@@ -185,7 +185,7 @@
static CStatus
CRegionRect_Create(CRegionRect **_this,
- CRectangleF rectangle)
+ CRectangleF rectangle)
{
/* assertions */
CASSERT((_this != 0));
@@ -207,7 +207,7 @@
static CStatus
CRegionNode_Clone(CRegionNode *_this,
- CRegionNode **clone)
+ CRegionNode **clone)
{
/* declarations */
CRegionCloner cloner;
@@ -250,10 +250,10 @@
/* Generate the mask for this region. */
static CStatus
CRegion_GenerateMask(CRegion *_this,
- CAffineTransformF *transform,
- CUInt32 width,
- CUInt32 height,
- CBool gray)
+ CAffineTransformF *transform,
+ CUInt32 width,
+ CUInt32 height,
+ CBool gray)
{
/* assertions */
CASSERT((_this != 0));
@@ -275,14 +275,11 @@
/* bail out now if the mask is okay as is */
if(w == width && h == height && g == gray)
{
- /* declarations */
- CBool eq;
-
- /* determine if the transformations are equal */
- CAffineTransformF_Equals(transform,
&(_this->mask.transform), &eq);
-
/* bail out now if everything matches */
- CStatus_Require((!eq), CStatus_OK);
+ CStatus_Require
+ ((!CAffineTransformF_Equals
+ (transform, &(_this->mask.transform))),
+ CStatus_OK);
}
/* destroy the current mask image */
@@ -326,7 +323,7 @@
/* Initialize this region. */
static void
CRegion_Initialize(CRegion *_this,
- CRegionNode *head)
+ CRegionNode *head)
{
/* assertions */
CASSERT((_this != 0));
@@ -365,14 +362,17 @@
{
/* declarations */
CRegionDisposer disposer;
- void *data;
+ void *data;
+
+ /* set the data to the default */
+ data = 0;
/* initialize the disposer */
CRegionDisposer_Initialize(&disposer);
- /* dispose of the node */
+ /* dispose of the nodes */
CRegionInterpreter_Interpret
- (((CRegionInterpreter *)(&disposer)),
_this->head, data);
+ (((CRegionInterpreter *)(&disposer)),
_this->head, &data);
/* finalize the disposer */
CRegionDisposer_Finalize(&disposer);
@@ -428,7 +428,7 @@
/* Create a path region. */
CStatus
CRegion_CreatePath(CRegion **_this,
- CPath *path)
+ CPath *path)
{
/* declarations */
CRegionPath *node;
@@ -458,7 +458,7 @@
/* Create a rectangular region. */
CStatus
CRegion_CreateRectangle(CRegion **_this,
- CRectangleF rectangle)
+ CRectangleF rectangle)
{
/* declarations */
CRegionRect *node;
@@ -488,8 +488,8 @@
/* Create a region from serialized region data. */
CStatus
CRegion_CreateData(CRegion **_this,
- CByte *data,
- CUInt32 count)
+ CByte *data,
+ CUInt32 count)
{
#if 0
/* ensure we have a this pointer pointer */
@@ -513,7 +513,7 @@
/* Create a region from a GDI region. */
CStatus
CRegion_CreateHRGN(CRegion **_this,
- void *hrgn)
+ void *hrgn)
{
#if 0
/* ensure we have a this pointer pointer */
@@ -560,7 +560,7 @@
/* Clone this region. */
CStatus
CRegion_Clone(CRegion *_this,
- CRegion **clone)
+ CRegion **clone)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -597,8 +597,8 @@
/* Form the combination of this region with a path. */
CStatus
CRegion_CombinePath(CRegion *_this,
- CPath *path,
- CCombineMode combineMode)
+ CPath *path,
+ CCombineMode combineMode)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -711,8 +711,8 @@
/* Form the combination of this region with a rectangle. */
CStatus
CRegion_CombineRectangle(CRegion *_this,
- CRectangleF rectangle,
- CCombineMode combineMode)
+ CRectangleF rectangle,
+ CCombineMode combineMode)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -822,8 +822,8 @@
/* Form the combination of this region with another region. */
CStatus
CRegion_CombineRegion(CRegion *_this,
- CRegion *other,
- CCombineMode combineMode)
+ CRegion *other,
+ CCombineMode combineMode)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -962,9 +962,9 @@
/* Determine if two regions are equal after applying a transformation. */
CStatus
CRegion_Equals(CRegion *_this,
- CRegion *other,
- CGraphics *graphics,
- CBool *eq)
+ CRegion *other,
+ CGraphics *graphics,
+ CBool *eq)
{
/* TODO */
return CStatus_NotImplemented;
@@ -973,8 +973,8 @@
/* Get the bounds of this region on a particular graphics context. */
CStatus
CRegion_GetBounds(CRegion *_this,
- CGraphics *graphics,
- CRectangleF *bounds)
+ CGraphics *graphics,
+ CRectangleF *bounds)
{
/* TODO */
return CStatus_NotImplemented;
@@ -983,8 +983,8 @@
/* Get the raw region data for this region. */
CStatus
CRegion_GetData(CRegion *_this,
- CByte **data,
- CUInt32 *count)
+ CByte **data,
+ CUInt32 *count)
{
/* TODO */
return CStatus_NotImplemented;
@@ -993,9 +993,9 @@
/* Get an array of rectangles which represents this region. */
CStatus
CRegion_GetRegionScans(CRegion *_this,
- CMatrix *matrix,
- CRectangleF **scans,
- CUInt32 *count)
+ CMatrix *matrix,
+ CRectangleF **scans,
+ CUInt32 *count)
{
/* TODO */
return CStatus_NotImplemented;
@@ -1004,8 +1004,8 @@
/* Determine if this region is empty on a particular graphics context. */
CStatus
CRegion_IsEmpty(CRegion *_this,
- CGraphics *graphics,
- CBool *empty)
+ CGraphics *graphics,
+ CBool *empty)
{
/* TODO */
return CStatus_NotImplemented;
@@ -1014,8 +1014,8 @@
/* Determine if this region is infinite on a particular graphics context. */
CStatus
CRegion_IsInfinite(CRegion *_this,
- CGraphics *graphics,
- CBool *infinite)
+ CGraphics *graphics,
+ CBool *infinite)
{
/* TODO */
return CStatus_NotImplemented;
@@ -1024,9 +1024,9 @@
/* Determine if a point is contained within this region. */
CStatus
CRegion_IsVisiblePoint(CRegion *_this,
- CGraphics *graphics,
- CPointF point,
- CBool *visible)
+ CGraphics *graphics,
+ CPointF point,
+ CBool *visible)
{
/* TODO */
return CStatus_NotImplemented;
@@ -1035,9 +1035,9 @@
/* Determine if any part of a rectangle is contained within this region. */
CStatus
CRegion_IsVisibleRectangle(CRegion *_this,
- CGraphics *graphics,
- CRectangleF rectangle,
- CBool *visible)
+ CGraphics *graphics,
+ CRectangleF rectangle,
+ CBool *visible)
{
/* TODO */
return CStatus_NotImplemented;
@@ -1104,14 +1104,13 @@
/* Transform this region by a matrix. */
CStatus
CRegion_Transform(CRegion *_this,
- CMatrix *matrix)
+ CMatrix *matrix)
{
/* declarations */
CRegionTransformer transformer;
CAffineTransformF t;
- CBool eq;
CStatus status;
- void *data;
+ void *data;
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -1121,11 +1120,10 @@
(CMatrix_GetTransform
(matrix, &t));
- /* determine if we have the identity transformation */
- CAffineTransformF_Equals(&t, &CAffineTransformF_Identity, &eq);
-
/* bail out now if there's nothing to do */
- CStatus_Require((!eq), CStatus_OK);
+ CStatus_Require
+ ((!CAffineTransformF_Equals(&t, &CAffineTransformF_Identity)),
+ CStatus_OK);
/* initialize the transformer */
CRegionTransformer_Initialize(&transformer, &t);
@@ -1148,13 +1146,13 @@
/* Translate this region by a specific amount. */
CStatus
CRegion_Translate(CRegion *_this,
- CFloat dx,
- CFloat dy)
+ CFloat dx,
+ CFloat dy)
{
/* declarations */
CRegionTranslator translator;
CStatus status;
- void *data;
+ void *data;
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -1183,8 +1181,8 @@
/* Get the mask for this region. */
CINTERNAL CStatus
CRegion_GetMask(CRegion *_this,
- CAffineTransformF *transform,
- pixman_image_t *mask)
+ CAffineTransformF *transform,
+ pixman_image_t *mask)
{
/* declarations */
CUInt32 w;
Index: libCrayons/src/CRegionCloner.c
diff -u libCrayons/src/CRegionCloner.c:1.2 libCrayons/src/CRegionCloner.c:1.3
--- libCrayons/src/CRegionCloner.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CRegionCloner.c Mon Mar 6 20:05:14 2006
@@ -26,10 +26,10 @@
static CStatus
CRegionCloner_Op(CRegionInterpreter *_this,
- CRegionOp *op,
- void *left,
- void *right,
- void **data)
+ CRegionOp *op,
+ void *left,
+ void *right,
+ void **data)
{
/* declarations */
CRegionOp *ro;
@@ -61,8 +61,8 @@
static CStatus
CRegionCloner_Data(CRegionInterpreter *_this,
- CRegionNode *node,
- void **data)
+ CRegionNode *node,
+ void **data)
{
/* assertions */
CASSERT((_this != 0));
Index: libCrayons/src/CRegionDisposer.c
diff -u libCrayons/src/CRegionDisposer.c:1.2
libCrayons/src/CRegionDisposer.c:1.3
--- libCrayons/src/CRegionDisposer.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CRegionDisposer.c Mon Mar 6 20:05:14 2006
@@ -26,10 +26,10 @@
static CStatus
CRegionDisposer_Op(CRegionInterpreter *_this,
- CRegionOp *op,
- void *left,
- void *right,
- void **data)
+ CRegionOp *op,
+ void *left,
+ void *right,
+ void **data)
{
/* assertions */
CASSERT((_this != 0));
@@ -47,8 +47,8 @@
static CStatus
CRegionDisposer_Data(CRegionInterpreter *_this,
- CRegionNode *node,
- void **data)
+ CRegionNode *node,
+ void **data)
{
/* assertions */
CASSERT((_this != 0));
Index: libCrayons/src/CRegionInterpreter.c
diff -u libCrayons/src/CRegionInterpreter.c:1.2
libCrayons/src/CRegionInterpreter.c:1.3
--- libCrayons/src/CRegionInterpreter.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CRegionInterpreter.c Mon Mar 6 20:05:14 2006
@@ -27,8 +27,8 @@
static const CRegionInterpreter CRegionInterpreter_Zero;
CINTERNAL void
-CRegionInterpreter_Initialize(CRegionInterpreter *_this,
- const CRegionInterpreterClass *_class)
+CRegionInterpreter_Initialize(CRegionInterpreter *_this,
+ const CRegionInterpreterClass *_class)
{
/* assertions */
CASSERT((_this != 0));
@@ -62,12 +62,12 @@
CINTERNAL CStatus
CRegionInterpreter_Interpret(CRegionInterpreter *_this,
- CRegionNode *head,
- void **data)
+ CRegionNode *head,
+ void **data)
{
/* declarations */
CRegionStack *stack;
- void *tmp;
+ void *tmp;
CStatus status;
/* assertions */
Index: libCrayons/src/CRegionRasterizer.c
diff -u libCrayons/src/CRegionRasterizer.c:1.2
libCrayons/src/CRegionRasterizer.c:1.3
--- libCrayons/src/CRegionRasterizer.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CRegionRasterizer.c Mon Mar 6 20:05:14 2006
@@ -31,7 +31,7 @@
{
PIXMAN_OPERATOR_SRC,
PIXMAN_OPERATOR_IN,
- PIXMAN_OPERATOR_OVER,
+ PIXMAN_OPERATOR_ADD,
PIXMAN_OPERATOR_XOR,
PIXMAN_OPERATOR_OUT,
PIXMAN_OPERATOR_OUT_REVERSE
@@ -39,8 +39,8 @@
static CStatus
CRegionRasterizer_CreateMaskSimple(CRegionRasterizer *_this,
- CByte value,
- pixman_image_t **mask)
+ CByte value,
+ pixman_image_t **mask)
{
/* assertions */
CASSERT((_this != 0));
@@ -69,11 +69,11 @@
static CStatus
CRegionRasterizer_CreateMaskPath(CRegionRasterizer *_this,
- const CPointF *points,
- const CByte *types,
- CUInt32 count,
- CFillMode fillMode,
- pixman_image_t **mask)
+ const CPointF *points,
+ const CByte *types,
+ CUInt32 count,
+ CFillMode fillMode,
+ pixman_image_t **mask)
{
/* declarations */
CTrapezoidX *trapezoids;
@@ -114,8 +114,8 @@
static CStatus
CRegionRasterizer_Data(CRegionInterpreter *_this,
- CRegionNode *node,
- void **data)
+ CRegionNode *node,
+ void **data)
{
/* declarations */
CRegionRasterizer *rast;
@@ -243,10 +243,10 @@
static CStatus
CRegionRasterizer_Op(CRegionInterpreter *_this,
- CRegionOp *op,
- void *left,
- void *right,
- void **data)
+ CRegionOp *op,
+ void *left,
+ void *right,
+ void **data)
{
/* declarations */
CRegionRasterizer *rast;
@@ -309,10 +309,10 @@
CINTERNAL CStatus
CRegionRasterizer_Initialize(CRegionRasterizer *_this,
- CAffineTransformF *transform,
- CFloat width,
- CFloat height,
- CBool gray)
+ CAffineTransformF *transform,
+ CFloat width,
+ CFloat height,
+ CBool gray)
{
/* assertions */
CASSERT((_this != 0));
Index: libCrayons/src/CRegionStack.c
diff -u libCrayons/src/CRegionStack.c:1.2 libCrayons/src/CRegionStack.c:1.3
--- libCrayons/src/CRegionStack.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CRegionStack.c Mon Mar 6 20:05:14 2006
@@ -85,7 +85,7 @@
CINTERNAL CStatus
CRegionStack_Push(CRegionStack **_this,
- CRegionOp *op)
+ CRegionOp *op)
{
/* declarations */
CRegionStack *stack;
@@ -113,7 +113,7 @@
CRegionStack *next;
/* allocate the next stack */
- if(!CRegionStack_Alloc(stack))
+ if(!CRegionStack_Alloc(next))
{
return CStatus_OutOfMemory;
}
Index: libCrayons/src/CRegionTransformer.c
diff -u libCrayons/src/CRegionTransformer.c:1.2
libCrayons/src/CRegionTransformer.c:1.3
--- libCrayons/src/CRegionTransformer.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CRegionTransformer.c Mon Mar 6 20:05:14 2006
@@ -27,10 +27,10 @@
static CStatus
CRegionTransformer_Op(CRegionInterpreter *_this,
- CRegionOp *op,
- void *left,
- void *right,
- void **data)
+ CRegionOp *op,
+ void *left,
+ void *right,
+ void **data)
{
/* assertions */
CASSERT((_this != 0));
@@ -80,8 +80,8 @@
static CStatus
CRegionTransformer_Data(CRegionInterpreter *_this,
- CRegionNode *node,
- void **data)
+ CRegionNode *node,
+ void **data)
{
/* declarations */
CRegionTransformer *t;
@@ -165,8 +165,8 @@
static CStatus
CRegionTransformer_DataSimple(CRegionInterpreter *_this,
- CRegionNode *node,
- void **data)
+ CRegionNode *node,
+ void **data)
{
/* declarations */
CRegionTransformer *t;
@@ -284,7 +284,7 @@
CINTERNAL void
CRegionTransformer_Initialize(CRegionTransformer *_this,
- CAffineTransformF *transform)
+ CAffineTransformF *transform)
{
/* assertions */
CASSERT((_this != 0));
Index: libCrayons/src/CRegionTranslator.c
diff -u libCrayons/src/CRegionTranslator.c:1.2
libCrayons/src/CRegionTranslator.c:1.3
--- libCrayons/src/CRegionTranslator.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CRegionTranslator.c Mon Mar 6 20:05:14 2006
@@ -27,8 +27,8 @@
static CStatus
CRegionTranslator_Data(CRegionInterpreter *_this,
- CRegionNode *node,
- void **data)
+ CRegionNode *node,
+ void **data)
{
/* declarations */
CRegionTranslator *rt;
@@ -70,10 +70,10 @@
static CStatus
CRegionTranslator_Op(CRegionInterpreter *_this,
- CRegionOp *op,
- void *left,
- void *right,
- void **data)
+ CRegionOp *op,
+ void *left,
+ void *right,
+ void **data)
{
/* assertions */
CASSERT((_this != 0));
@@ -98,8 +98,8 @@
CINTERNAL void
CRegionTranslator_Initialize(CRegionTranslator *_this,
- CFloat dx,
- CFloat dy)
+ CFloat dx,
+ CFloat dy)
{
/* assertions */
CASSERT((_this != 0));
Index: libCrayons/src/CSolidBrush.c
diff -u libCrayons/src/CSolidBrush.c:1.2 libCrayons/src/CSolidBrush.c:1.3
--- libCrayons/src/CSolidBrush.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CSolidBrush.c Mon Mar 6 20:05:14 2006
@@ -28,7 +28,7 @@
/* Initialize this solid brush. */
static void
CSolidBrush_Initialize(CSolidBrush *_this,
- CColor color)
+ CColor color)
{
/* assertions */
CASSERT((_this != 0));
@@ -53,15 +53,15 @@
/* Clone this solid brush. */
static CStatus
CSolidBrush_Clone(CBrush *_this,
- CBrush **_clone)
+ CBrush **_clone)
{
/* declarations */
CSolidBrush *brush;
CSolidBrush **clone;
/* assertions */
- CASSERT((_this != 0));
- CASSERT((clone != 0));
+ CASSERT((_this != 0));
+ CASSERT((_clone != 0));
/* get this as a solid brush */
brush = (CSolidBrush *)_this;
@@ -76,7 +76,7 @@
/* Create a pattern for this brush. */
static CStatus
CSolidBrush_CreatePattern(CBrush *_this,
- CPattern *pattern)
+ CPattern *pattern)
{
/* declarations */
CSolidBrush *brush;
@@ -98,7 +98,7 @@
/* Create a solid brush. */
CStatus
CSolidBrush_Create(CSolidBrush **_this,
- CColor color)
+ CColor color)
{
/* ensure we have a this pointer pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -119,7 +119,7 @@
/* Get the color of this brush. */
CStatus
CSolidBrush_GetColor(CSolidBrush *_this,
- CColor *color)
+ CColor *color)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -137,7 +137,7 @@
/* Set the color of this brush. */
CStatus
CSolidBrush_SetColor(CSolidBrush *_this,
- CColor color)
+ CColor color)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
Index: libCrayons/src/CStringFormat.c
diff -u libCrayons/src/CStringFormat.c:1.2 libCrayons/src/CStringFormat.c:1.3
--- libCrayons/src/CStringFormat.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CStringFormat.c Mon Mar 6 20:05:14 2006
@@ -26,8 +26,8 @@
static void
CStringFormat_Initialize(CStringFormat *_this,
- CStringFormatFlag flags,
- CLanguageID language)
+ CStringFormatFlag flags,
+ CLanguageID language)
{
/* assertions */
CASSERT((_this != 0));
@@ -41,9 +41,9 @@
_this->method = CDigitSubstitute_None;
_this->language = language;
_this->firstTabOffset = 0;
- _this->tabStops = NULL;
+ _this->tabStops = 0;
_this->tabStopCount = 0;
- _this->characterRanges = NULL;
+ _this->characterRanges = 0;
_this->characterRangeCount = 0;
}
@@ -76,8 +76,8 @@
/* Create a string format. */
CStatus
CStringFormat_Create(CStringFormat **_this,
- CStringFormatFlag flags,
- CLanguageID language)
+ CStringFormatFlag flags,
+ CLanguageID language)
{
/* ensure we have a this pointer pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -160,7 +160,7 @@
/* Clone this string format. */
CStatus
CStringFormat_Clone(CStringFormat *_this,
- CStringFormat **clone)
+ CStringFormat **clone)
{
/* declarations */
CStatus status;
@@ -209,7 +209,7 @@
/* Get the alignment of this string format. */
CStatus
CStringFormat_GetAlignment(CStringFormat *_this,
- CStringAlignment *alignment)
+ CStringAlignment *alignment)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -227,7 +227,7 @@
/* Set the alignment of this string format. */
CStatus
CStringFormat_SetAlignment(CStringFormat *_this,
- CStringAlignment alignment)
+ CStringAlignment alignment)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -242,8 +242,8 @@
/* Get the character ranges of this string format. */
CStatus
CStringFormat_GetCharacterRanges(CStringFormat *_this,
- CCharacterRange **characterRanges,
- CUInt32 *count)
+ CCharacterRange **characterRanges,
+ CUInt32 *count)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -281,8 +281,8 @@
/* Set the character ranges of this string format. */
CStatus
CStringFormat_SetCharacterRanges(CStringFormat *_this,
- CCharacterRange *characterRanges,
- CUInt32 count)
+ CCharacterRange *characterRanges,
+ CUInt32 count)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -347,8 +347,8 @@
/* Get the digit substitution settings of this string format. */
CStatus
CStringFormat_GetDigitSubstitution(CStringFormat *_this,
- CDigitSubstitute *method,
- CLanguageID *language)
+ CDigitSubstitute *method,
+ CLanguageID *language)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -372,8 +372,8 @@
/* Set the digit substitution settings of this string format. */
CStatus
CStringFormat_SetDigitSubstitution(CStringFormat *_this,
- CDigitSubstitute method,
- CLanguageID language)
+ CDigitSubstitute method,
+ CLanguageID language)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -391,7 +391,7 @@
/* Get the format flags of this string format. */
CStatus
CStringFormat_GetFormatFlags(CStringFormat *_this,
- CStringFormatFlag *formatFlags)
+ CStringFormatFlag *formatFlags)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -409,7 +409,7 @@
/* Set the format flags of this string format. */
CStatus
CStringFormat_SetFormatFlags(CStringFormat *_this,
- CStringFormatFlag formatFlags)
+ CStringFormatFlag formatFlags)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -424,7 +424,7 @@
/* Get the hotkey prefix mode of this string format. */
CStatus
CStringFormat_GetHotkeyPrefix(CStringFormat *_this,
- CHotkeyPrefix *hotkeyPrefix)
+ CHotkeyPrefix *hotkeyPrefix)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -442,7 +442,7 @@
/* Set the hotkey prefix mode of this string format. */
CStatus
CStringFormat_SetHotkeyPrefix(CStringFormat *_this,
- CHotkeyPrefix hotkeyPrefix)
+ CHotkeyPrefix hotkeyPrefix)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -457,7 +457,7 @@
/* Get the line alignment of this string format. */
CStatus
CStringFormat_GetLineAlignment(CStringFormat *_this,
- CStringAlignment *lineAlignment)
+ CStringAlignment *lineAlignment)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -475,7 +475,7 @@
/* Set the line alignment of this string format. */
CStatus
CStringFormat_SetLineAlignment(CStringFormat *_this,
- CStringAlignment lineAlignment)
+ CStringAlignment lineAlignment)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -490,9 +490,9 @@
/* Get the tab stop settings of this string format. */
CStatus
CStringFormat_GetTabStops(CStringFormat *_this,
- CFloat *firstTabOffset,
- CFloat **tabStops,
- CUInt32 *count)
+ CFloat *firstTabOffset,
+ CFloat **tabStops,
+ CUInt32 *count)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -536,9 +536,9 @@
/* Set the tab stop settings of this string format. */
CStatus
CStringFormat_SetTabStops(CStringFormat *_this,
- CFloat firstTabOffset,
- CFloat *tabStops,
- CUInt32 count)
+ CFloat firstTabOffset,
+ CFloat *tabStops,
+ CUInt32 count)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -606,7 +606,7 @@
/* Get the trimming mode of this string format. */
CStatus
CStringFormat_GetTrimming(CStringFormat *_this,
- CStringTrimming *trimming)
+ CStringTrimming *trimming)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -624,7 +624,7 @@
/* Set the trimming mode of this string format. */
CStatus
CStringFormat_SetTrimming(CStringFormat *_this,
- CStringTrimming trimming)
+ CStringTrimming trimming)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
Index: libCrayons/src/CStroker.c
diff -u libCrayons/src/CStroker.c:1.2 libCrayons/src/CStroker.c:1.3
--- libCrayons/src/CStroker.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CStroker.c Mon Mar 6 20:05:14 2006
@@ -39,117 +39,117 @@
#define CStrokeCapper_Cap(c, p, cX, cY, sX, sY) \
((c)->Cap((c), (p), (cX), (cY), (sX), (sY)))
-#define CStroker_CirclePoints(array, radius, transform, scale) \
+#define CStroker_CirclePoints(array, radius, transform, scale)
\
do {
\
/* declarations */
\
- CBezierF bezier;
\
- CPointF points[12];
\
+ CBezierF bezier;
\
+ CPointF points[12];
\
\
/* calculate the width and radius */
\
- const CDouble r = (radius);
\
- const CDouble w = (r * 2.0f);
\
+ const CDouble r = (radius);
\
+ const CDouble w = (r * 2.0f);
\
\
/* calculate the distance along the tangents */
\
- const CDouble d = (r * CMath_Arc90Fraction);
\
+ const CDouble d = (r * CMath_Arc90Fraction);
\
\
/* calculate the tangential control points */
\
- const CFloat p = (r + d);
\
- const CFloat m = (r - d);
\
+ const CFloat p = (r + d);
\
+ const CFloat m = (r - d);
\
\
/* initialize the points */
\
- CPoint_X(points[0]) = w; CPoint_Y(points[0]) = r;
\
- CPoint_X(points[1]) = w; CPoint_Y(points[1]) = m;
\
- CPoint_X(points[2]) = p; CPoint_Y(points[2]) = 0;
\
- CPoint_X(points[3]) = r; CPoint_Y(points[3]) = 0;
\
- CPoint_X(points[4]) = m; CPoint_Y(points[4]) = 0;
\
- CPoint_X(points[5]) = 0; CPoint_Y(points[5]) = m;
\
- CPoint_X(points[6]) = 0; CPoint_Y(points[6]) = r;
\
- CPoint_X(points[7]) = 0; CPoint_Y(points[7]) = p;
\
- CPoint_X(points[8]) = m; CPoint_Y(points[8]) = w;
\
- CPoint_X(points[9]) = r; CPoint_Y(points[9]) = w;
\
- CPoint_X(points[10]) = p; CPoint_Y(points[10]) = w;
\
- CPoint_X(points[11]) = w; CPoint_Y(points[11]) = p;
\
+ CPoint_X(points[0]) = w; CPoint_Y(points[0]) = r;
\
+ CPoint_X(points[1]) = w; CPoint_Y(points[1]) = m;
\
+ CPoint_X(points[2]) = p; CPoint_Y(points[2]) = 0;
\
+ CPoint_X(points[3]) = r; CPoint_Y(points[3]) = 0;
\
+ CPoint_X(points[4]) = m; CPoint_Y(points[4]) = 0;
\
+ CPoint_X(points[5]) = 0; CPoint_Y(points[5]) = m;
\
+ CPoint_X(points[6]) = 0; CPoint_Y(points[6]) = r;
\
+ CPoint_X(points[7]) = 0; CPoint_Y(points[7]) = p;
\
+ CPoint_X(points[8]) = m; CPoint_Y(points[8]) = w;
\
+ CPoint_X(points[9]) = r; CPoint_Y(points[9]) = w;
\
+ CPoint_X(points[10]) = p; CPoint_Y(points[10]) = w;
\
+ CPoint_X(points[11]) = w; CPoint_Y(points[11]) = p;
\
\
/* transform or scale the points */
\
if((transform) != 0)
\
{
\
- CAffineTransformF_TransformPoints((transform), points,
12); \
+ CAffineTransformF_TransformPoints((transform), points,
12); \
}
\
else
\
{
\
- CVectorF_ScalePoints((scale), points, 12);
\
+ CVectorF_ScalePoints((scale), points, 12);
\
}
\
\
/* reset the count */
\
- CPointArray_Count(*(array)) = 0;
\
+ CPointArray_Count(*(array)) = 0;
\
\
/* initialize the first quadrant */
\
- CBezierF_Initialize
\
+ CBezierF_Initialize
\
(&bezier, &points[0], &points[1], &points[2],
&points[3]); \
\
/* flatten the first quadrant */
\
- CStatus_Check
\
- (CBezierF_Flatten
\
- (&bezier, (array), CFiller_TOLERANCE));
\
+ CStatus_Check
\
+ (CBezierF_Flatten
\
+ (&bezier, (array), CFiller_TOLERANCE));
\
\
/* initialize the second quadrant */
\
- CBezierF_Initialize
\
+ CBezierF_Initialize
\
(&bezier, &points[3], &points[4], &points[5],
&points[6]); \
\
/* flatten the second quadrant */
\
- CStatus_Check
\
- (CBezierF_Flatten
\
- (&bezier, (array), CFiller_TOLERANCE));
\
+ CStatus_Check
\
+ (CBezierF_Flatten
\
+ (&bezier, (array), CFiller_TOLERANCE));
\
\
/* initialize the third quadrant */
\
- CBezierF_Initialize
\
+ CBezierF_Initialize
\
(&bezier, &points[6], &points[7], &points[8],
&points[9]); \
\
/* flatten the third quadrant */
\
- CStatus_Check
\
- (CBezierF_Flatten
\
- (&bezier, (array), CFiller_TOLERANCE));
\
+ CStatus_Check
\
+ (CBezierF_Flatten
\
+ (&bezier, (array), CFiller_TOLERANCE));
\
\
/* initialize the fourth quadrant */
\
- CBezierF_Initialize
\
+ CBezierF_Initialize
\
(&bezier, &points[9], &points[10], &points[11],
&points[0]); \
\
/* flatten the fourth quadrant */
\
- CStatus_Check
\
- (CBezierF_Flatten
\
- (&bezier, (array), CFiller_TOLERANCE));
\
+ CStatus_Check
\
+ (CBezierF_Flatten
\
+ (&bezier, (array), CFiller_TOLERANCE));
\
} while(0)
-#define CStroker_TempSpacePoints(array, points, count, size) \
+#define CStroker_TempSpacePoints(array, points, count, size)
\
do {
\
/* declarations */
\
- CPointF *tmp;
\
+ CPointF *tmp;
\
\
/* get the points */
\
- tmp = CPointArray_Points(*(array));
\
+ tmp = CPointArray_Points(*(array));
\
\
/* get the count */
\
- (count) = CPointArray_Count(*(array));
\
+ (count) = CPointArray_Count(*(array));
\
\
/* calculate the size */
\
- (size) = ((count) * sizeof(CPointF));
\
+ (size) = ((count) * sizeof(CPointF));
\
\
/* allocate the points */
\
- if(!((points) = (CPointF *)CMalloc((size) << 1)))
\
+ if(!((points) = (CPointF *)CMalloc((size) << 1)))
\
{
\
- return CStatus_OutOfMemory;
\
+ return CStatus_OutOfMemory;
\
}
\
\
/* copy the points */
\
- CMemCopy((points), tmp, (size));
\
+ CMemCopy((points), tmp, (size));
\
} while(0)
static CStatus
CStroker_StrokeSubpaths(CStroker *_this,
- CPath *path,
- CPointF *points,
- CByte *types,
- CUInt32 count)
+ CPath *path,
+ CPointF *points,
+ CByte *types,
+ CUInt32 count)
{
/* declarations */
CByte *type;
@@ -226,9 +226,9 @@
static CStatus
CStroker_FullStroke(CStroker *_this,
- CPath *path,
- CPointF *points,
- CUInt32 count)
+ CPath *path,
+ CPointF *points,
+ CUInt32 count)
{
/* declarations */
CAffineTransformF *transform;
@@ -267,6 +267,10 @@
/* get the pen radius */
radius = _this->radius;
+ /* set the previous cosine and sine to the default */
+ prevC = 0;
+ prevS = 0;
+
/* generate the stroke */
while(next != end)
{
@@ -415,9 +419,9 @@
static CStatus
CStroker_FastStroke(CStroker *_this,
- CPath *path,
- CPointF *points,
- CUInt32 count)
+ CPath *path,
+ CPointF *points,
+ CUInt32 count)
{
/* declarations */
CPointF *end;
@@ -509,17 +513,17 @@
static CMATH CPointF
CStrokeJoiner_MiterIntersect(CPointF a,
- CPointF b,
- CFloat prevC,
- CFloat prevS,
- CFloat currC,
- CFloat currS,
- CDouble cross)
+ CPointF b,
+ CFloat prevC,
+ CFloat prevS,
+ CFloat currC,
+ CFloat currS,
+ CDouble cross)
{
/* declarations */
CPointF intersect;
- CDouble iX;
- CDouble iY;
+ CDouble iX;
+ CDouble iY;
/* get the point components */
const CFloat aX = CPoint_X(a);
@@ -554,13 +558,13 @@
static CStatus
CStrokeJoiner_AddMiter(CStrokeJoiner *_this,
- CPath *path,
- CFloat centerX,
- CFloat centerY,
- CFloat prevC,
- CFloat prevS,
- CFloat currC,
- CFloat currS)
+ CPath *path,
+ CFloat centerX,
+ CFloat centerY,
+ CFloat prevC,
+ CFloat prevS,
+ CFloat currC,
+ CFloat currS)
{
/* assertions */
CASSERT((_this != 0));
@@ -676,13 +680,13 @@
static CStatus
CStrokeJoiner_AddRound(CStrokeJoiner *_this,
- CPath *path,
- CFloat centerX,
- CFloat centerY,
- CFloat prevC,
- CFloat prevS,
- CFloat currC,
- CFloat currS)
+ CPath *path,
+ CFloat centerX,
+ CFloat centerY,
+ CFloat prevC,
+ CFloat prevS,
+ CFloat currC,
+ CFloat currS)
{
/* assertions */
CASSERT((_this != 0));
@@ -726,13 +730,13 @@
static CStatus
CStrokeJoiner_AddBevel(CStrokeJoiner *_this,
- CPath *path,
- CFloat centerX,
- CFloat centerY,
- CFloat prevC,
- CFloat prevS,
- CFloat currC,
- CFloat currS)
+ CPath *path,
+ CFloat centerX,
+ CFloat centerY,
+ CFloat prevC,
+ CFloat prevS,
+ CFloat currC,
+ CFloat currS)
{
/* assertions */
CASSERT((_this != 0));
@@ -796,11 +800,11 @@
static CStatus
CStrokeCapper_AddSquare(CStrokeCapper *_this,
- CPath *path,
- CFloat *centerX,
- CFloat *centerY,
- CFloat slopeX,
- CFloat slopeY)
+ CPath *path,
+ CFloat *centerX,
+ CFloat *centerY,
+ CFloat slopeX,
+ CFloat slopeY)
{
/* assertions */
CASSERT((_this != 0));
@@ -853,11 +857,11 @@
static CStatus
CStrokeCapper_AddSquareAnchor(CStrokeCapper *_this,
- CPath *path,
- CFloat *centerX,
- CFloat *centerY,
- CFloat slopeX,
- CFloat slopeY)
+ CPath *path,
+ CFloat *centerX,
+ CFloat *centerY,
+ CFloat slopeX,
+ CFloat slopeY)
{
/* assertions */
CASSERT((_this != 0));
@@ -909,11 +913,11 @@
static CStatus
CStrokeCapper_AddTriangle(CStrokeCapper *_this,
- CPath *path,
- CFloat *centerX,
- CFloat *centerY,
- CFloat slopeX,
- CFloat slopeY)
+ CPath *path,
+ CFloat *centerX,
+ CFloat *centerY,
+ CFloat slopeX,
+ CFloat slopeY)
{
/* assertions */
CASSERT((_this != 0));
@@ -964,11 +968,11 @@
static CStatus
CStrokeCapper_AddDiamondAnchor(CStrokeCapper *_this,
- CPath *path,
- CFloat *centerX,
- CFloat *centerY,
- CFloat slopeX,
- CFloat slopeY)
+ CPath *path,
+ CFloat *centerX,
+ CFloat *centerY,
+ CFloat slopeX,
+ CFloat slopeY)
{
/* assertions */
CASSERT((_this != 0));
@@ -1020,11 +1024,11 @@
static CStatus
CStrokeCapper_AddRound(CStrokeCapper *_this,
- CPath *path,
- CFloat *centerX,
- CFloat *centerY,
- CFloat slopeX,
- CFloat slopeY)
+ CPath *path,
+ CFloat *centerX,
+ CFloat *centerY,
+ CFloat slopeX,
+ CFloat slopeY)
{
/* assertions */
CASSERT((_this != 0));
@@ -1067,11 +1071,11 @@
static CStatus
CStrokeCapper_AddArrowAnchor(CStrokeCapper *_this,
- CPath *path,
- CFloat *centerX,
- CFloat *centerY,
- CFloat slopeX,
- CFloat slopeY)
+ CPath *path,
+ CFloat *centerX,
+ CFloat *centerY,
+ CFloat slopeX,
+ CFloat slopeY)
{
/* assertions */
CASSERT((_this != 0));
@@ -1161,11 +1165,11 @@
static CStatus
CStrokeJoiner_Initialize(CStrokeJoiner *_this,
- CPointArrayF *array,
- CAffineTransformF *transform,
- CLineJoin join,
- CFloat radius,
- CFloat limit)
+ CPointArrayF *array,
+ CAffineTransformF *transform,
+ CLineJoin join,
+ CFloat radius,
+ CFloat limit)
{
/* assertions */
CASSERT((_this != 0));
@@ -1186,11 +1190,11 @@
|*| a distance of the limit times the width,
instead of a
|*| bevel fallback, as is the case for
MiterClipped
\*/
- _this->u.other.transform = transform;
+ _this->u.other.transform = transform;
CVector_X(_this->u.other.scale) = radius;
CVector_Y(_this->u.other.scale) = radius;
- _this->u.other.limitSquared = (limit * limit);
- _this->Join =
CStrokeJoiner_AddMiter;
+ _this->u.other.limitSquared = (limit * limit);
+ _this->Join =
CStrokeJoiner_AddMiter;
}
break;
case CLineJoin_Round:
@@ -1212,10 +1216,10 @@
case CLineJoin_Bevel:
default:
{
- _this->u.other.transform = transform;
+ _this->u.other.transform = transform;
CVector_X(_this->u.other.scale) = radius;
CVector_Y(_this->u.other.scale) = radius;
- _this->Join =
CStrokeJoiner_AddBevel;
+ _this->Join =
CStrokeJoiner_AddBevel;
}
break;
}
@@ -1243,11 +1247,11 @@
static CStatus
CStrokeCapper_Initialize(CStrokeCapper *_this,
- CPointArrayF *array,
- CAffineTransformF *transform,
- CVectorF *scale,
- CLineCap cap,
- CFloat radius)
+ CPointArrayF *array,
+ CAffineTransformF *transform,
+ CVectorF *scale,
+ CLineCap cap,
+ CFloat radius)
{
/* assertions */
CASSERT((_this != 0));
@@ -1353,8 +1357,8 @@
CINTERNAL CStatus
CStroker_Initialize(CStroker *_this,
- CPen *pen,
- CAffineTransformF *deviceTransform)
+ CPen *pen,
+ CAffineTransformF *deviceTransform)
{
/* assertions */
CASSERT((_this != 0));
@@ -1461,10 +1465,11 @@
CINTERNAL CStatus
CStroker_Stroke(CStroker *_this,
- CPath *path,
- CPointF *points,
- CByte *types,
- CUInt32 count)
+ CPath *path,
+ CPointF *points,
+ CByte *types,
+ CUInt32 count,
+ CBool hasCurves)
{
/* declarations */
CStatus status;
@@ -1480,56 +1485,69 @@
/* stroke path */
{
- /* declarations */
- CPointF *newPoints;
- CByte *newTypes;
- CUInt32 newCount;
-
/* assertions */
CASSERT((points != 0));
CASSERT((types != 0));
- /* scale the path */
- CVectorF_ScalePoints(&(_this->scale), points, count);
+ /* scale the path, as needed */
+ if(_this->Stroke == CStroker_FullStroke)
+ {
+ CVectorF_ScalePoints(&(_this->scale), points, count);
+ }
- /* flatten the path */
+ /* stroke the path */
+ if(!hasCurves)
+ {
+ /* stroke the subpaths */
+ status =
+ CStroker_StrokeSubpaths
+ (_this, path, points, types, count);
+ }
+ else
{
/* declarations */
- CFlattener flattener;
- CUInt32 capacity;
-
- /* initialize the flattener */
- CFlattener_Initialize(&flattener);
+ CPointF *newPoints;
+ CByte *newTypes;
+ CUInt32 newCount;
/* flatten the path */
- status =
- CFlattener_Flatten
- (&flattener, points, types, count,
CFiller_TOLERANCE);
-
- /* handle flattening failures */
- if(status != CStatus_OK)
{
- /* finalize the flattener */
- CFlattener_Finalize(&flattener, 0, 0, 0, 0);
+ /* declarations */
+ CFlattener flattener;
+ CUInt32 capacity;
+
+ /* initialize the flattener */
+ CFlattener_Initialize(&flattener);
+
+ /* flatten the path */
+ status =
+ CFlattener_Flatten
+ (&flattener, points, types,
count, CFiller_TOLERANCE);
- /* return status */
- return status;
+ /* handle flattening failures */
+ if(status != CStatus_OK)
+ {
+ /* finalize the flattener */
+ CFlattener_Finalize(&flattener, 0, 0,
0, 0);
+
+ /* return status */
+ return status;
+ }
+
+ /* finalize the flattener */
+ CFlattener_Finalize
+ (&flattener, &newPoints, &newTypes,
&newCount, &capacity);
}
- /* finalize the flattener */
- CFlattener_Finalize
- (&flattener, &newPoints, &newTypes, &newCount,
&capacity);
+ /* stroke the subpaths */
+ status =
+ CStroker_StrokeSubpaths
+ (_this, path, newPoints, newTypes,
newCount);
+ /* free the flattened path */
+ CFree(newPoints);
+ CFree(newTypes);
}
-
- /* stroke the subpaths */
- status =
- CStroker_StrokeSubpaths
- (_this, path, newPoints, newTypes, newCount);
-
- /* free the flattened path */
- CFree(newPoints);
- CFree(newTypes);
}
/* return status */
Index: libCrayons/src/CSurface.c
diff -u libCrayons/src/CSurface.c:1.2 libCrayons/src/CSurface.c:1.3
--- libCrayons/src/CSurface.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CSurface.c Mon Mar 6 20:05:14 2006
@@ -25,46 +25,80 @@
#endif
CStatus
-CSurface_Lock(CSurface *_this)
+CSurface_Reference(CSurface *_this)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
- /* lock this surface */
- CMutex_Lock(_this->lock);
+ /* update the reference count synchronously */
+ CSurface_Lock(_this);
+ {
+ ++(_this->refCount);
+ }
+ CSurface_Unlock(_this);
/* return successfully */
return CStatus_OK;
}
CStatus
-CSurface_Unlock(CSurface *_this)
+CSurface_Destroy(CSurface **_this)
{
- /* ensure we have a this pointer */
+ /* declarations */
+ CMutex *lock;
+ CBool lockOwner;
+
+ /* ensure we have a this pointer pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
- /* unlock this surface */
- CMutex_Unlock(_this->lock);
+ /* ensure we have a this pointer */
+ CStatus_Require((*_this != 0), CStatus_ArgumentNull);
- /* return successfully */
- return CStatus_OK;
-}
+ /* get the lock */
+ lock = (*_this)->lock;
-CStatus
-CSurface_GetBoundsF(CSurface *_this,
- CRectangleF *bounds)
-{
- /* ensure we have a this pointer */
- CStatus_Require((_this != 0), CStatus_ArgumentNull);
+ /* finalize this surface synchronously */
+ CMutex_Lock(lock);
+ {
+ /* update the reference count */
+ --((*_this)->refCount);
- /* ensure we have a bounds pointer */
- CStatus_Require((bounds != 0), CStatus_ArgumentNull);
+ /* finalize, as needed */
+ if((*_this)->refCount != 0)
+ {
+ lockOwner = 0;
+ }
+ else
+ {
+ /* set the lock ownership flag */
+ lockOwner = 1;
- /* set the width and height */
- CRectangle_X(*bounds) = _this->x;
- CRectangle_Y(*bounds) = _this->y;
- CRectangle_Width(*bounds) = _this->width;
- CRectangle_Height(*bounds) = _this->height;
+ /* finalize the clip mask, as needed */
+ if((*_this)->clip != 0)
+ {
+ pixman_image_destroy((*_this)->clip);
+ }
+
+ /* finalize the compositing mask, as needed */
+ if((*_this)->comp != 0)
+ {
+ pixman_image_destroy((*_this)->comp);
+ }
+
+ /* finalize the surface */
+ (*_this)->_class->Finalize(*_this);
+
+ /* dispose of the surface */
+ CFree(*_this);
+ }
+ }
+ CMutex_Unlock(lock);
+
+ /* destroy the lock, as needed */
+ if(lockOwner) { CMutex_Destroy(&lock); }
+
+ /* null the surface pointer */
+ *_this = 0;
/* return successfully */
return CStatus_OK;
@@ -72,10 +106,10 @@
CStatus
CSurface_GetBounds(CSurface *_this,
- CUInt32 *x,
- CUInt32 *y,
- CUInt32 *width,
- CUInt32 *height)
+ CUInt32 *x,
+ CUInt32 *y,
+ CUInt32 *width,
+ CUInt32 *height)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -86,11 +120,15 @@
CStatus_Require((width != 0), CStatus_ArgumentNull);
CStatus_Require((height != 0), CStatus_ArgumentNull);
- /* set the width and height */
- *x = _this->x;
- *y = _this->y;
- *width = _this->width;
- *height = _this->height;
+ /* set the width and height, synchronously */
+ CSurface_Lock(_this);
+ {
+ *x = _this->x;
+ *y = _this->y;
+ *width = _this->width;
+ *height = _this->height;
+ }
+ CSurface_Unlock(_this);
/* return successfully */
return CStatus_OK;
@@ -98,57 +136,115 @@
CStatus
CSurface_SetBounds(CSurface *_this,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height)
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height)
{
+ /* declarations */
+ CStatus status;
+
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
- /* bail out now if nothing has changed */
- if(x == _this->x && y == _this->y &&
- width == _this->width && height == _this->height)
+ /* set the status to the default */
+ status = CStatus_OK;
+
+ /* set the bounds, synchronously */
+ CSurface_Lock(_this);
{
- return CStatus_OK;
- }
+ /* bail out now if nothing has changed */
+ if(x == _this->x && y == _this->y &&
+ width == _this->width && height == _this->height)
+ {
+ status = CStatus_OK;
+ goto GOTO_Cleanup;
+ }
- /* ensure the width is within bounds */
- CStatus_Require
- ((width > 0 && (x + width) < 32768),
CStatus_ArgumentOutOfRange);
-
- /* ensure the height is within bounds */
- CStatus_Require
- ((height > 0 && (y + height) < 32768),
CStatus_ArgumentOutOfRange);
+ /* ensure the width is within bounds */
+ if(!(width > 0 && (x + width) < 32768))
+ {
+ status = CStatus_ArgumentOutOfRange;
+ goto GOTO_Cleanup;
+ }
- /* set the width and height */
- _this->x = x;
- _this->y = y;
- _this->width = width;
- _this->height = height;
+ /* ensure the height is within bounds */
+ if(!(height > 0 && (y + height) < 32768))
+ {
+ status = CStatus_ArgumentOutOfRange;
+ goto GOTO_Cleanup;
+ }
- /* finalize the clip mask, as needed */
- if(_this->clip != 0)
- {
- pixman_image_destroy(_this->clip);
- _this->clip = 0;
- }
+ /* set the width and height */
+ _this->x = x;
+ _this->y = y;
+ _this->width = width;
+ _this->height = height;
- /* finalize the compositing mask, as needed */
- if(_this->comp != 0)
- {
- pixman_image_destroy(_this->comp);
- _this->comp = 0;
+ /* finalize the clip mask, as needed */
+ if(_this->clip != 0)
+ {
+ pixman_image_destroy(_this->clip);
+ _this->clip = 0;
+ }
+
+ /* finalize the compositing mask, as needed */
+ if(_this->comp != 0)
+ {
+ pixman_image_destroy(_this->comp);
+ _this->comp = 0;
+ }
}
+GOTO_Cleanup:
+ CSurface_Unlock(_this);
- /* return successfully */
- return CStatus_OK;
+ /* return status */
+ return status;
+}
+
+CINTERNAL void
+CSurface_Lock(CSurface *_this)
+{
+ /* assertions */
+ CASSERT((_this != 0));
+
+ /* lock this surface */
+ CMutex_Lock(_this->lock);
+}
+
+CINTERNAL void
+CSurface_Unlock(CSurface *_this)
+{
+ /* assertions */
+ CASSERT((_this != 0));
+
+ /* unlock this surface */
+ CMutex_Unlock(_this->lock);
+}
+
+CINTERNAL CRectangleF
+CSurface_GetBoundsF(CSurface *_this)
+{
+ /* declarations */
+ CRectangleF bounds;
+
+ /* assertions */
+ CASSERT((_this != 0));
+
+ /* set the width and height */
+ CRectangle_X(bounds) = _this->x;
+ CRectangle_Y(bounds) = _this->y;
+ CRectangle_Width(bounds) = _this->width;
+ CRectangle_Height(bounds) = _this->height;
+
+ /* return the bounds */
+ return bounds;
}
CINTERNAL CStatus
CSurface_GetClipMask(CSurface *_this,
- pixman_image_t **mask,
- CBool gray)
+ pixman_image_t **mask,
+ CBool gray)
{
/* declarations */
pixman_format_t *format;
@@ -203,9 +299,9 @@
}
CINTERNAL CStatus
-CSurface_GetCompositingMask(CSurface *_this,
- pixman_image_t **mask,
- CBool gray)
+CSurface_GetCompositingMask(CSurface *_this,
+ pixman_image_t **mask,
+ CBool gray)
{
/* declarations */
pixman_format_t *format;
@@ -259,96 +355,16 @@
return CStatus_OK;
}
-CStatus
-CSurface_Reference(CSurface *_this)
-{
- /* assertions */
- CASSERT((_this != 0));
-
- /* update the reference count synchronously */
- CSurface_Lock(_this);
- {
- ++(_this->refCount);
- }
- CSurface_Unlock(_this);
-
- /* return successfully */
- return CStatus_OK;
-}
-
-CStatus
-CSurface_Destroy(CSurface **_this)
-{
- /* declarations */
- CMutex *lock;
- CBool lockOwner;
-
- /* ensure we have a this pointer pointer */
- CStatus_Require((_this != 0), CStatus_ArgumentNull);
-
- /* ensure we have a this pointer */
- CStatus_Require((*_this != 0), CStatus_ArgumentNull);
-
- /* get the lock */
- lock = (*_this)->lock;
-
- /* finalize this surface synchronously */
- CMutex_Lock(lock);
- {
- /* update the reference count */
- --((*_this)->refCount);
-
- /* finalize, as needed */
- if((*_this)->refCount != 0)
- {
- lockOwner = 0;
- }
- else
- {
- /* set the lock ownership flag */
- lockOwner = 1;
-
- /* finalize the clip mask, as needed */
- if((*_this)->clip != 0)
- {
- pixman_image_destroy((*_this)->clip);
- }
-
- /* finalize the compositing mask, as needed */
- if((*_this)->comp != 0)
- {
- pixman_image_destroy((*_this)->comp);
- }
-
- /* finalize the surface */
- (*_this)->_class->Finalize(*_this);
-
- /* dispose of the surface */
- CFree(*_this);
- }
- }
- CMutex_Unlock(lock);
-
- /* destroy the lock, as needed */
- if(lockOwner) { CMutex_Destroy(&lock); }
-
- /* null the surface pointer */
- *_this = 0;
-
- /* return successfully */
- return CStatus_OK;
-}
-
-CStatus
+CINTERNAL CStatus
CSurface_Composite(CSurface *_this,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- pixman_image_t *src,
- pixman_image_t *mask,
- CInterpolationMode interpolationMode,
- CCompositingMode compositingMode)
+ CInt32 x,
+ CInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ pixman_image_t *src,
+ pixman_image_t *mask,
+ CInterpolationMode interpolationMode,
+ CCompositingMode compositingMode)
{
/* declarations */
pixman_operator_t op;
@@ -432,14 +448,14 @@
return CStatus_OK;
}
-CStatus
+CINTERNAL CStatus
CSurface_Clear(CSurface *_this,
- CColor color)
+ CColor color)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
- /* perform the compositing operation */
+ /* clear the surface */
CStatus_Check
(_this->_class->Clear
(_this, color));
@@ -448,14 +464,14 @@
return CStatus_OK;
}
-CStatus
+CINTERNAL CStatus
CSurface_Flush(CSurface *_this,
- CFlushIntention intention)
+ CFlushIntention intention)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
- /* perform the compositing operation */
+ /* flush the surface */
CStatus_Check
(_this->_class->Flush
(_this, intention));
@@ -465,12 +481,50 @@
}
CINTERNAL CStatus
+CSurface_GetDpiX(CSurface *_this,
+ CFloat *dpiX)
+{
+ /* ensure we have a this pointer */
+ CStatus_Require((_this != 0), CStatus_ArgumentNull);
+
+ /* ensure we have a horizontal resolution pointer */
+ CStatus_Require((dpiX != 0), CStatus_ArgumentNull);
+
+ /* get the horizontal resolution */
+ CStatus_Check
+ (_this->_class->GetDpiX
+ (_this, dpiX));
+
+ /* return successfully */
+ return CStatus_OK;
+}
+
+CINTERNAL CStatus
+CSurface_GetDpiY(CSurface *_this,
+ CFloat *dpiY)
+{
+ /* ensure we have a this pointer */
+ CStatus_Require((_this != 0), CStatus_ArgumentNull);
+
+ /* ensure we have a vertical resolution pointer */
+ CStatus_Require((dpiY != 0), CStatus_ArgumentNull);
+
+ /* get the vertical resolution */
+ CStatus_Check
+ (_this->_class->GetDpiY
+ (_this, dpiY));
+
+ /* return successfully */
+ return CStatus_OK;
+}
+
+CINTERNAL CStatus
CSurface_Initialize(CSurface *_this,
- const CSurfaceClass *_class,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height)
+ const CSurfaceClass *_class,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height)
{
/* assertions */
CASSERT((_this != 0));
Index: libCrayons/src/CTextureBrush.c
diff -u libCrayons/src/CTextureBrush.c:1.2 libCrayons/src/CTextureBrush.c:1.3
--- libCrayons/src/CTextureBrush.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CTextureBrush.c Mon Mar 6 20:05:14 2006
@@ -30,15 +30,15 @@
/* Clone this texture brush. */
static CStatus
CTextureBrush_Clone(CBrush *_this,
- CBrush **_clone)
+ CBrush **_clone)
{
/* declarations */
CTextureBrush *brush;
CTextureBrush **clone;
/* assertions */
- CASSERT((_this != 0));
- CASSERT((clone != 0));
+ CASSERT((_this != 0));
+ CASSERT((_clone != 0));
/* get this as a texture brush */
brush = (CTextureBrush *)_this;
@@ -78,7 +78,7 @@
/* Create a pattern for this brush. */
static CStatus
CTextureBrush_CreatePattern(CBrush *_this,
- CPattern *pattern)
+ CPattern *pattern)
{
/* assertions */
CASSERT((_this != 0));
@@ -142,9 +142,9 @@
/* Intialize this texture brush. */
static CStatus
CTextureBrush_Initialize(CTextureBrush *_this,
- CImage *image,
- CRectangleF rectangle,
- CWrapMode wrapMode)
+ CImage *image,
+ CRectangleF rectangle,
+ CWrapMode wrapMode)
{
/* assertions */
CASSERT((_this != 0));
@@ -173,9 +173,9 @@
/* Create a texture brush. */
CStatus
CTextureBrush_Create(CTextureBrush **_this,
- CImage *image,
- CRectangleF rectangle,
- CWrapMode wrapMode)
+ CImage *image,
+ CRectangleF rectangle,
+ CWrapMode wrapMode)
{
/* ensure we have a this pointer pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -198,7 +198,7 @@
/* Get the image of the texture. */
CStatus
CTextureBrush_GetImage(CTextureBrush *_this,
- CImage **image)
+ CImage **image)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -213,7 +213,7 @@
/* Get the wrap mode of the texture. */
CStatus
CTextureBrush_GetWrapMode(CTextureBrush *_this,
- CWrapMode *wrapMode)
+ CWrapMode *wrapMode)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -231,7 +231,7 @@
/* Set the wrap mode of the texture. */
CStatus
CTextureBrush_SetWrapMode(CTextureBrush *_this,
- CWrapMode wrapMode)
+ CWrapMode wrapMode)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -249,7 +249,7 @@
/* Get the transformation matrix of the texture. */
CStatus
CTextureBrush_GetTransform(CTextureBrush *_this,
- CMatrix *matrix)
+ CMatrix *matrix)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -261,8 +261,8 @@
/* Multiply the transformation matrix of the texture by another matrix. */
CStatus
CTextureBrush_MultiplyTransform(CTextureBrush *_this,
- CMatrix *matrix,
- CMatrixOrder order)
+ CMatrix *matrix,
+ CMatrixOrder order)
{
/* declarations */
CAffineTransformF t;
@@ -305,8 +305,8 @@
/* Rotate the transformation matrix of the texture. */
CStatus
CTextureBrush_RotateTransform(CTextureBrush *_this,
- CFloat angle,
- CMatrixOrder order)
+ CFloat angle,
+ CMatrixOrder order)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -324,9 +324,9 @@
/* Scale the transformation matrix of the texture. */
CStatus
CTextureBrush_ScaleTransform(CTextureBrush *_this,
- CFloat sx,
- CFloat sy,
- CMatrixOrder order)
+ CFloat sx,
+ CFloat sy,
+ CMatrixOrder order)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -344,7 +344,7 @@
/* Set the transformation matrix of the texture. */
CStatus
CTextureBrush_SetTransform(CTextureBrush *_this,
- CMatrix *matrix)
+ CMatrix *matrix)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
@@ -364,9 +364,9 @@
/* Translate the transformation matrix of the texture. */
CStatus
CTextureBrush_TranslateTransform(CTextureBrush *_this,
- CFloat dx,
- CFloat dy,
- CMatrixOrder order)
+ CFloat dx,
+ CFloat dy,
+ CMatrixOrder order)
{
/* ensure we have a this pointer */
CStatus_Require((_this != 0), CStatus_ArgumentNull);
Index: libCrayons/src/CTrapezoids.c
diff -u libCrayons/src/CTrapezoids.c:1.2 libCrayons/src/CTrapezoids.c:1.3
--- libCrayons/src/CTrapezoids.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CTrapezoids.c Mon Mar 6 20:05:14 2006
@@ -88,10 +88,10 @@
/* Add a trapezoid. */
static CStatus
CTrapezoids_AddTrapezoid(CTrapezoids *_this,
- CFixed top,
- CFixed bottom,
- const CLineX *left,
- const CLineX *right)
+ CFixed top,
+ CFixed bottom,
+ const CLineX *left,
+ const CLineX *right)
{
/* declarations */
CUInt32 count;
@@ -169,7 +169,7 @@
/* Compare the tops of two edges. */
static int
CEdgeX_CompareTop(const void *_a,
- const void *_b)
+ const void *_b)
{
/* get the edges */
const CEdgeX *a = (const CEdgeX *)_a;
@@ -182,7 +182,7 @@
/* Compare the current x positions of two edges. */
static int
CEdgeX_CompareCurrentX(const void *_a,
- const void *_b)
+ const void *_b)
{
/* declarations */
int cmp;
@@ -213,7 +213,8 @@
/* Calculate the intersection of the given line segments. */
static CMATH CIntersectionInfo
-CLineX_CalculateIntersection(CLineX a, CLineX b)
+CLineX_CalculateIntersection(CLineX a,
+ CLineX b)
{
/* declarations */
CIntersectionInfo info;
@@ -229,7 +230,8 @@
/* calculate the intersection, if possible */
if(sA == sB)
{
- info.ok = 0;
+ info.intersection = 0;
+ info.ok = 0;
}
else
{
@@ -254,7 +256,8 @@
/* Calculate the x position of the line at the given y position. */
static CMATH CFixed
-CLineX_CalculateCurrentX(CLineX line, CFixed y)
+CLineX_CalculateCurrentX(CLineX line,
+ CFixed y)
{
/* declarations */
CFixed dx;
@@ -278,8 +281,8 @@
/* Tessellate the polygon into trapezoids (corrupts polygon). */
CINTERNAL CStatus
CTrapezoids_TessellatePolygon(CTrapezoids *_this,
- CPolygonX *polygon,
- CFillMode fillMode)
+ CPolygonX *polygon,
+ CFillMode fillMode)
{
/* declarations */
CFixed top;
@@ -481,10 +484,10 @@
/* Fill the path to these trapezoids. */
CINTERNAL CStatus
CTrapezoids_Fill(CTrapezoids *_this,
- CPointF *points,
- CByte *types,
- CUInt32 count,
- CFillMode fillMode)
+ CPointF *points,
+ CByte *types,
+ CUInt32 count,
+ CFillMode fillMode)
{
/* declarations */
CStatus status;
Index: libCrayons/src/CUtils.c
diff -u libCrayons/src/CUtils.c:1.2 libCrayons/src/CUtils.c:1.3
--- libCrayons/src/CUtils.c:1.2 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CUtils.c Mon Mar 6 20:05:14 2006
@@ -20,31 +20,506 @@
#include "CUtils.h"
+#if TIME_WITH_SYS_TIME
+ #include <sys/time.h>
+ #include <time.h>
+#elif HAVE_SYS_TIME_H
+ #include <sys/time.h>
+#else
+ #include <time.h>
+#endif
+
+#if HAVE_ERRNO_H
+ #include <errno.h>
+#endif
+
+#if HAVE_FCNTL_H
+ #include <fcntl.h>
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
+/*\
+|*| NOTE: The CUTILS_* defines/ifdefs here are a hack to get something akin
+|*| to C# region blocks; they serve a purely aesthetic purpose.
+\*/
+
+/******************************************************************************/
+#define CUTILS_IO
+#ifdef CUTILS_IO
+/* Temporary directory environment variable name. */
+#ifdef C_SYSTEM_WIN32
+ #define CUtils_TempDirEnvVar "TMP"
+#else
+ #define CUtils_TempDirEnvVar "TMPDIR"
+#endif
+
+/* Setup for mkstemp fallback implementation. */
+#if (!defined(HAVE_MKSTEMP) && defined(HAVE_OPEN))
+ /* Valid file name characters for temporary file name generation. */
+ static const CChar8 CUtils_TempFileCharacters[] =
+
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+
+ /*\
+ |*| NOTE: There are 62^6 possible random file names, but we shouldn't
+ |*| need to try anywhere near all of them, and 62^3 attempts is
+ |*| good enough for glibc, so it should be good enough for us.
+ \*/
+ #define CUtils_TempFileAttempts 238328
+
+ /* windows is retarded */
+ #ifdef C_SYSTEM_WIN32
+ #define CUtils_OpenTempFileBasic(template) \
+ (open(template, (O_RDWR|O_CREAT|O_EXCL|_O_BINARY),
(S_IRUSR|S_IWUSR)))
+ #else
+ #define CUtils_OpenTempFileBasic(template) \
+ (open(template, (O_RDWR|O_CREAT|O_EXCL),
(S_IRUSR|S_IWUSR)))
+ #endif
+
+ /* make this easier to read */
+ #define CUtils_OpenTempFile(template, fd)
\
+ do {
\
+ /* attempt to create the file, retrying if interrupted
*/ \
+ while(((fd) = CUtils_OpenTempFileBasic(template)) ==
-1) \
+ {
\
+ if(errno != EINTR) { break; }
\
+ }
\
+ } while(0)
+#endif
+
+/*\
+|*| Delete a file.
+|*|
+|*| path - path of file to be deleted
+|*|
+|*| Returns status code.
+\*/
+CINTERNAL CStatus
+CUtils_DeleteFile(const CChar8 *path)
+{
+#if !(defined(HAVE_REMOVE) || defined(HAVE_UNLINK))
+ return CStatus_IOError
+#else
+ /* delete the file */
+#ifdef HAVE_REMOVE
+ if(remove((const char *)path) != 0)
+#else
+ if(unlink((const char *)path) != 0)
+#endif
+ {
+ return CStatus_IOError;
+ }
+
+ /* return successfully */
+ return CStatus_OK;
+#endif
+}
+
+/*\
+|*| Determine if a file exists.
+|*|
+|*| path - path of file
+|*|
+|*| NOTE: this may check if the name exists in the
+|*| filesystem without determining if it is
+|*| a file, if the system does not provide a
+|*| method with which to check the file type
+|*|
+|*| Returns true if the file exists, false otherwise.
+\*/
+CINTERNAL CBool
+CUtils_FileExists(const CChar8 *path)
+{
+#ifdef HAVE_STAT
+ /* declarations */
+ struct stat st;
+
+ /* determine and return if the file exists */
+ return (stat((const char *)path, &st) == 0 && S_ISREG(st.st_mode));
+#elif defined(HAVE_ACCESS)
+ /* determine and return if the file exists (better than nothing) */
+ return (access(path, F_OK) == 0);
+#else
+ /* fail */
+ return 0;
+#endif
+}
+
+/*\
+|*| Determine if a directory exists.
+|*|
+|*| path - path of directory
+|*|
+|*| NOTE: this may check if the name exists in the
+|*| filesystem without determining if it is a
+|*| directory, if the system does not provide
+|*| a method with which to check the file type
+|*|
+|*| Returns true if the directory exists, false otherwise.
+\*/
+CINTERNAL CBool
+CUtils_DirectoryExists(const CChar8 *path)
+{
+#ifdef HAVE_STAT
+ /* declarations */
+ struct stat st;
+
+ /* determine and return if the directory exists */
+ return (stat((const char *)path, &st) == 0 && S_ISDIR(st.st_mode));
+#elif defined(HAVE_ACCESS)
+ /* determine and return if the file exists (better than nothing) */
+ return (access(path, F_OK) == 0);
+#else
+ /* fail */
+ return 0;
+#endif
+}
+
+/*\
+|*| Gets a temporary file template.
+|*|
+|*| template - template string suitable for mkstemp
+|*| length - length of template (not counting trailing null)
+|*|
+|*| Returns status code.
+\*/
+static CStatus
+CUtils_GetTempFileTemplate(CChar8 **template,
+ CUInt32 *length)
+{
+ /* declarations */
+ const CChar8 *dir;
+ CUInt32 len;
+
+ /* get the temporary directory from the environment */
+ dir = (const CChar8 *)getenv(CUtils_TempDirEnvVar);
+
+ /* get the temporary from the fallbacks, as needed */
+ if(dir == 0 || !CUtils_DirectoryExists(dir))
+ {
+ /* use the same fallbacks as tmpfile */
+ #ifdef P_tmpdir
+ if(CUtils_DirectoryExists((const CChar8 *)P_tmpdir))
+ {
+ dir = (const CChar8 *)P_tmpdir;
+ }
+ else
+ #endif
+ {
+ #ifndef C_SYSTEM_WIN32
+ if(CUtils_DirectoryExists((const CChar8 *)"/tmp"))
+ {
+ dir = (const CChar8 *)"/tmp";
+ }
+ else
+ #endif
+ {
+ return CStatus_IOError;
+ }
+ }
+ }
+
+ /* get the the temporary directory name length */
+ len = strlen((const char *)dir);
+
+ /* eliminate trailing directory separator characters */
+ while(len > 1 && dir[len - 1] == CUtils_DirectorySeparator) { --len; }
+
+ /* calculate the template length */
+ *length = (len + 9);
+
+ /* allocate the template */
+ if(!(*template = (CChar8 *)CMalloc((*length) + 1)))
+ {
+ return CStatus_OutOfMemory;
+ }
+
+ /* initialize the template */
+ sprintf
+ ((char *)*template, "%.*s%cCrXXXXXX", len, dir,
+ CUtils_DirectorySeparator);
+
+ /* return successfully */
+ return CStatus_OK;
+}
+
+/*\
+|*| Create a new temporary file.
+|*|
+|*| filename - name of temporary file
+|*| handle - handle to file
+|*|
+|*| NOTE: deletion of the file, closing of the handle,
+|*| and freeing of the filename, are left to the
+|*| caller of this method
+|*|
+|*| Returns status code.
+\*/
+CINTERNAL CStatus
+CUtils_CreateTemporaryFile(CChar8 **filename,
+ CIOHandle *handle)
+{
+#if !(defined(HAVE_MKSTEMP) || defined(HAVE_OPEN))
+ /* fail */
+ return CStatus_IOError;
+#else
+ /* declarations */
+ CChar8 *template;
+ CUInt32 length;
+
+ /* assertions */
+ CASSERT((filename != 0));
+ CASSERT((handle != 0));
+
+ /* set the filename and handle to the defaults */
+ *filename = 0;
+ *handle = CIOHandle_Invalid;
+
+ /* get the temporary file template */
+ CStatus_Check
+ (CUtils_GetTempFileTemplate
+ (&template, &length));
+
+ /* create the temporary file */
+ {
+ #ifdef HAVE_MKSTEMP
+ /* create the temporary file */
+ *handle = (CIOHandle)mkstemp((char *)template);
+
+ /* handle temporary file creation failures */
+ if(*handle == CIOHandle_Invalid)
+ {
+ CFree(template);
+ return CStatus_IOError;
+ }
+
+ /* set the filename */
+ *filename = template;
+
+ /* return successfully */
+ return CStatus_OK;
+ #else
+ /* declarations */
+ static CUInt64 randomValue;
+ CUInt64 randomBits;
+ CUInt32 attempts;
+ CChar8 *randomChars;
+
+ /*\
+ |*| NOTE: although this uses a static variable, it's just
+ |*| random data, so we shouldn't have to worry about
+ |*| it... this is based on the algorithm used by
+ |*| glibc, so it should work well
+ \*/
+
+ /* get the random template characters */
+ randomChars = (template + (length - 6));
+
+ /* get some random bits */
+ {
+ #ifdef HAVE_GETTIMEOFDAY
+ /* declarations */
+ struct timeval tv;
+
+ /* get the time information */
+ gettimeofday(&tv, 0);
+
+ /* calculate the random bits from the time information
*/
+ randomBits = ((((CUInt64)tv.tv_usec) << 16) ^
tv.tv_sec);
+ #else
+ /* get the fallback time information (better than
nothing) */
+ randomBits = (CUInt64)time(0);
+ #endif
+ }
+
+ /* calculate the random value */
+ {
+ #ifdef HAVE_GETPID
+ /* update the random value with time and pid */
+ randomValue += (randomBits ^ getpid());
+ #else
+ /* update the random value with time (better than
nothing) */
+ randomValue += randomBits;
+ #endif
+ }
+
+ /* attempt to create the temporary file */
+ for(attempts = 0; attempts < CUtils_TempFileAttempts;
++attempts)
+ {
+ /* declarations */
+ CUInt64 tmp;
+ int fd;
+
+ /* get the random value */
+ tmp = randomValue;
+
+ /* fill in the random template characters */
+ randomChars[0] = CUtils_TempFileCharacters[tmp % 62];
tmp /= 62;
+ randomChars[1] = CUtils_TempFileCharacters[tmp % 62];
tmp /= 62;
+ randomChars[2] = CUtils_TempFileCharacters[tmp % 62];
tmp /= 62;
+ randomChars[3] = CUtils_TempFileCharacters[tmp % 62];
tmp /= 62;
+ randomChars[4] = CUtils_TempFileCharacters[tmp % 62];
tmp /= 62;
+ randomChars[5] = CUtils_TempFileCharacters[tmp % 62];
+
+ /* create the file */
+ CUtils_OpenTempFile(template, fd);
+
+ /* bail out now on file creation success */
+ if(fd != -1)
+ {
+ /* set the filename */
+ *filename = template;
+
+ /* set the handle */
+ *handle = (CIOHandle)fd;
+
+ /* return successfully */
+ return CStatus_OK;
+ }
+
+ /* handle errors */
+ if(errno != EEXIST) { break; }
+
+ /* update the random value */
+ randomValue += 7777;
+ }
+
+ /* free the template */
+ CFree(template);
+
+ /* return error status */
+ return CStatus_IOError;
+ #endif
+ }
+#endif
+}
+
+/*\
+|*| Close an IO handle.
+|*|
+|*| handle - handle to close
+|*|
+|*| Returns status code.
+\*/
+CINTERNAL CStatus
+CUtils_CloseIOHandle(CIOHandle handle)
+{
+#ifdef HAVE_OPEN
+ /* declarations */
+ int tmp;
+ int fd;
+
+ /* get the file descriptor */
+ fd = (int)handle;
+
+ /* attempt to close the file, retrying if interrupted */
+ while((tmp = close(fd)) == -1)
+ {
+ if(errno != EINTR) { return CStatus_IOError; }
+ }
+
+ /* return successfully */
+ return CStatus_OK;
+#else
+ /* fail */
+ return CStatus_IOError;
+#endif
+}
+
+/*\
+|*| Write data to the resource of an IO handle.
+|*|
+|*| handle - handle to resource
+|*| memory - data to be written
+|*| length - length of data
+|*| written - length of written data
+|*|
+|*| Returns status code.
+\*/
+CINTERNAL CStatus
+CUtils_WriteIOHandle(CIOHandle handle,
+ const CByte *memory,
+ CUInt32 length,
+ CUInt32 *written)
+{
+#ifdef HAVE_WRITE
+ /* declarations */
+ ssize_t result;
+ int fd;
+
+ /* get the file descriptor */
+ fd = (int)handle;
+
+ /* set the amount written to the default */
+ *written = 0;
+
+ /* set the result to the default */
+ result = 0;
+
+ /* write the data */
+ while(length > 0)
+ {
+ /* attempt to write the data, retrying if interrupted */
+ if((result = write(fd, memory, (size_t)length)) >= 0)
+ {
+ /* update the amount written */
+ *written += result;
+
+ /* update the data length */
+ length -= result;
+
+ /* update the data pointer */
+ memory += result;
+ }
+ else
+ {
+ /* bail out now if an error occurred */
+ if(errno != EINTR) { break; }
+ }
+ }
+
+ /* return error status, as needed */
+ if(result == -1) { return CStatus_IOError; }
+
+ /* return successfully */
+ return CStatus_OK;
+#else
+ /* fail */
+ *written = 0;
+ return CStatus_IOError;
+#endif
+}
+#endif
+/******************************************************************************/
+
+
+
+/******************************************************************************/
+#define CUTILS_UNITS
+#ifdef CUTILS_UNITS
/* Convert a value from one unit to another. */
CINTERNAL CFloat
CUtils_ConvertUnits(CGraphicsUnit fromUnit,
- CGraphicsUnit toUnit,
- CFloat value)
+ CGraphicsUnit toUnit,
+ CFloat value)
{
/* get the vertical resolution */
- const CFloat dpiY = CGraphics_DefaultDpiY;
+ const CFloat dpi = CGraphics_DefaultDpi;
/* return the converted value */
- return CUtils_ConvertUnitsDPI(fromUnit, toUnit, value, dpiY, dpiY);
+ return CUtils_ConvertUnitsDPI(fromUnit, toUnit, value, dpi, dpi);
}
CINTERNAL CFloat
CUtils_ConvertUnitsDPI(CGraphicsUnit fromUnit,
- CGraphicsUnit toUnit,
- CFloat value,
- CFloat fromDpiY,
- CFloat toDpiY)
+ CGraphicsUnit toUnit,
+ CFloat value,
+ CFloat fromDpi,
+ CFloat toDpi)
{
/* bail out now if there's nothing to do */
- if(fromUnit == toUnit) { return value; }
+ if(fromUnit == toUnit || value == 0.0f) { return value; }
/*\
|*| NOTE: we assume we have inch input, convert to inch scaled target,
then
@@ -56,7 +531,7 @@
switch(toUnit)
{
case CGraphicsUnit_World:
- case CGraphicsUnit_Pixel: { value *= toDpiY; }
break;
+ case CGraphicsUnit_Pixel: { value *= toDpi; }
break;
case CGraphicsUnit_Display: { value *= 75.0f; }
break;
case CGraphicsUnit_Point: { value *= 72.0f; }
break;
case CGraphicsUnit_Inch: { /* nothing to do here */ }
break;
@@ -68,7 +543,7 @@
switch(fromUnit)
{
case CGraphicsUnit_World:
- case CGraphicsUnit_Pixel: { value /= fromDpiY; }
break;
+ case CGraphicsUnit_Pixel: { value /= fromDpi; }
break;
case CGraphicsUnit_Display: { value /= 75.0f; }
break;
case CGraphicsUnit_Point: { value /= 72.0f; }
break;
case CGraphicsUnit_Inch: { /* nothing to do here */ }
break;
@@ -79,30 +554,237 @@
/* return the converted value */
return value;
}
+#endif
+/******************************************************************************/
-/* TODO: should we support 0xC080 encoded nulls? */
-#define CUtils_Char8Length(c) \
+/******************************************************************************/
+#define CUTILS_STRINGS
+#ifdef CUTILS_STRINGS
+
+#define CUtils_Char32_ToChar8Length(c) \
(((c) < 0x80) ? 1 : \
(((c) < 0x800) ? 2 : \
- (((c) < 0x10000) ? 3 : \
- (((c) < 0x200000) ? 4 : \
- (((c) < 0x4000000) ? 5 : 6)))))
+ (((c) < 0x10000) ? 3 : 4)))
+
+#define CUtils_Char16_IsHighSurrogate(c) ((c) >= 0xD800 && (c) <= 0xDBFF)
+#define CUtils_Char16_IsLowSurrogate(c) ((c) >= 0xDC00 && (c) <= 0xDFFF)
+
+#define CUtils_Char16_SurrogatesToChar32(hi, lo) \
+ ((((((CChar32)hi) & 0x03FF) << 10) | (((CChar32)lo) & 0x03FF)) +
0x10000)
+
+#define CUtils_Char8_IsLengthOne(c) (((c) & 0x80) == 0x00)
+#define CUtils_Char8_IsLengthTwo(c) (((c) & 0xE0) == 0xC0)
+#define CUtils_Char8_IsLengthThree(c) (((c) & 0xF0) == 0xE0)
+#define CUtils_Char8_IsLengthFour(c) (((c) & 0xF8) == 0xF0)
+#define CUtils_Char8_IsMultiValid(c) (((c) & 0xC0) == 0x80)
+
+/* Convert a UTF16 character to a UTF32 character. */
+CINTERNAL CUInt32
+CUtils_Char16ToChar32(const CChar16 *src,
+ CChar32 *dst,
+ CUInt32 len)
+{
+ /* declarations */
+ CChar16 c16;
+ CChar16 lo;
+
+ /* bail out now if there's nothing to do */
+ if(len == 0) { return 0; }
+
+ /* get the character */
+ c16 = src[0];
+
+ /* process the character, based on range */
+ if(!CUtils_Char16_IsHighSurrogate(c16))
+ {
+ /* ensure we don't have a low surrogate */
+ if(CUtils_Char16_IsLowSurrogate(c16)) { return 0; }
+
+ /* set the full character */
+ *dst = (CChar32)c16;
+
+ /* return the count */
+ return 1;
+ }
+ else
+ {
+ /* bail out now if there's nothing to do */
+ if(len == 1) { return 0; }
+
+ /* get the low surrogate */
+ lo = src[1];
+
+ /* ensure we have a low surrogate */
+ if(!CUtils_Char16_IsLowSurrogate(lo)) { return 0; }
-#define CUtils_SurrogatesToChar32(hi, lo) \
- (((((CChar32)hi) - 0xD800) << 10) + (((CChar32)lo) & 0x03FF) + 0x10000)
+ /* combine the surrogates to get the full character */
+ *dst = CUtils_Char16_SurrogatesToChar32(c16, lo);
+
+ /* return the count */
+ return 2;
+ }
+}
+
+/* Convert a UTF8 string to a UTF16 string. */
+CINTERNAL CStatus
+CUtils_Str8ToStr16(const CChar8 *string,
+ CChar16 **result)
+{
+ /* declarations */
+ const CChar8 *src;
+ CChar16 *end;
+ CChar16 *dst;
+ CUInt32 count;
+
+ /* get the character pointer */
+ src = string;
+
+ /* set the count to the default */
+ count = 0;
+
+ /* calculate the UTF16 length */
+ while(*src)
+ {
+ /* declarations */
+ CChar8 c8;
+
+ /* get the current character */
+ c8 = *src++;
+
+ /* process the current character, based on range */
+ if(CUtils_Char8_IsLengthOne(c8))
+ {
+ /* update the count */
+ ++count;
+ }
+ else if(CUtils_Char8_IsLengthTwo(c8))
+ {
+ /* update the input pointer and ensure we have a
character */
+ CStatus_Require
+ (CUtils_Char8_IsMultiValid(*src++),
CStatus_Argument);
+
+ /* update the count */
+ ++count;
+ }
+ else if(CUtils_Char8_IsLengthThree(c8))
+ {
+ /* update the input pointer and ensure we have a
character */
+ CStatus_Require
+ (CUtils_Char8_IsMultiValid(*src++),
CStatus_Argument);
+
+ /* update the input pointer and ensure we have a
character */
+ CStatus_Require
+ (CUtils_Char8_IsMultiValid(*src++),
CStatus_Argument);
+
+ /* update the count */
+ ++count;
+ }
+ else if(CUtils_Char8_IsLengthFour(c8))
+ {
+ /* update the input pointer and ensure we have a
character */
+ CStatus_Require
+ (CUtils_Char8_IsMultiValid(*src++),
CStatus_Argument);
+
+ /* update the input pointer and ensure we have a
character */
+ CStatus_Require
+ (CUtils_Char8_IsMultiValid(*src++),
CStatus_Argument);
+
+ /* update the input pointer and ensure we have a
character */
+ CStatus_Require
+ (CUtils_Char8_IsMultiValid(*src++),
CStatus_Argument);
+
+ /* update the count */
+ count += 2;
+ }
+ else
+ {
+ /* invalid character */
+ return CStatus_Argument;
+ }
+ }
+
+ /* allocate the UTF16 string */
+ if(!(*result = (CChar16 *)CMalloc((count + 1) * sizeof(CChar16))))
+ {
+ return CStatus_OutOfMemory;
+ }
+
+ /* get the input character pointer */
+ src = string;
+
+ /* get the output character pointer */
+ dst = *result;
+
+ /* get the end of output pointer */
+ end = (dst + count);
+
+ /* generate the UTF8 output */
+ while(dst != end)
+ {
+ /* declarations */
+ CChar32 c32;
+ CChar8 c8;
+
+ /* get the current character */
+ c8 = *src++;
+
+ /* encode the current input character in UTF16 */
+ if(CUtils_Char8_IsLengthOne(c8))
+ {
+ *dst++ = (CChar16)c8;
+ }
+ else if(CUtils_Char8_IsLengthTwo(c8))
+ {
+ /* decode the character */
+ c32 = (((CChar32)(c8 & 0x1F)) << 6); c8 = *src++;
+ c32 |= (((CChar32)(c8 & 0x3F)) << 0);
+
+ /* encode the character */
+ *dst++ = (CChar16)c32;
+ }
+ else if(CUtils_Char8_IsLengthThree(c8))
+ {
+ /* decode the character */
+ c32 = (((CChar32)(c8 & 0x0F)) << 12); c8 = *src++;
+ c32 |= (((CChar32)(c8 & 0x3F)) << 6); c8 = *src++;
+ c32 |= (((CChar32)(c8 & 0x3F)) << 0);
+
+ /* encode the character */
+ *dst++ = (CChar16)c32;
+ }
+ else
+ {
+ /* decode the character */
+ c32 = (((CChar32)(c8 & 0x07)) << 18); c8 = *src++;
+ c32 |= (((CChar32)(c8 & 0x3F)) << 12); c8 = *src++;
+ c32 |= (((CChar32)(c8 & 0x3F)) << 6); c8 = *src++;
+ c32 |= (((CChar32)(c8 & 0x3F)) << 0);
+
+ /* encode the character */
+ *dst++ = ((((c32 - 0x10000) >> 10) & 0x03FF) | 0xD800);
+ *dst++ = ((((c32 - 0x10000) >> 0) & 0x03FF) | 0xDC00);
+ }
+ }
+
+ /* null terminate the output */
+ *dst = (CChar16)'\0';
+
+ /* return successfully */
+ return CStatus_OK;
+}
/* Convert a UTF16 string to a UTF8 string. */
CINTERNAL CStatus
-CUtils_Char16ToChar8(CChar16 *string,
- CChar8 **result)
+CUtils_Str16ToStr8(const CChar16 *string,
+ CChar8 **result)
{
/* declarations */
- CChar8 *end;
- CChar8 *dst;
- CChar16 *src;
- CUInt32 count;
+ const CChar16 *src;
+ CChar8 *end;
+ CChar8 *dst;
+ CUInt32 count;
/* get the character pointer */
src = string;
@@ -116,44 +798,39 @@
/* declarations */
CChar32 c32;
CChar16 c16;
+ CChar16 lo;
/* get the current character */
c16 = *src;
/* process the current character, based on range */
- if(c16 < 0xD800 || c16 > 0xDBFF)
+ if(!CUtils_Char16_IsHighSurrogate(c16))
{
/* ensure we don't have a low surrogate */
CStatus_Require
- ((c16 < 0xDC00 || c16 > 0xDFFF),
CStatus_Argument);
+ ((!CUtils_Char16_IsLowSurrogate(c16)),
CStatus_Argument);
/* set the full character */
c32 = (CChar32)c16;
}
else
{
- /* declarations */
- CChar16 hi;
-
- /* get the high surrogate */
- hi = c16;
-
/* get the low surrogate and update the input pointer */
- c16 = *(++src);
+ lo = *(++src);
/* ensure we have a low surrogate */
CStatus_Require
- ((c16 > 0xDBFF && c16 < 0xE000),
CStatus_Argument);
+ (CUtils_Char16_IsLowSurrogate(lo),
CStatus_Argument);
/* combine the surrogates to get the full character */
- c32 = CUtils_SurrogatesToChar32(hi, c16);
+ c32 = CUtils_Char16_SurrogatesToChar32(c16, lo);
}
/* update the count */
- count += CUtils_Char8Length(c32);
+ count += CUtils_Char32_ToChar8Length(c32);
/* move to the next character position */
- ++c16;
+ ++src;
}
/* allocate the UTF8 string */
@@ -175,31 +852,26 @@
while(dst != end)
{
/* declarations */
- CChar16 c16;
CChar32 c32;
+ CChar16 c16;
+ CChar16 lo;
/* get the current character */
c16 = *src;
/* get the current input character in UTF32 */
- if(c16 < 0xD800 || c16 > 0xDBFF)
+ if(!CUtils_Char16_IsHighSurrogate(c16))
{
/* set the full character */
c32 = (CChar32)c16;
}
else
{
- /* declarations */
- CChar16 hi;
-
- /* get the high surrogate */
- hi = c16;
-
/* get the low surrogate and update the input position
*/
- c16 = *(++src);
+ lo = *(++src);
/* get the UTF32 character */
- c32 = CUtils_SurrogatesToChar32(hi, c16);
+ c32 = CUtils_Char16_SurrogatesToChar32(c16, lo);
}
/* encode the full character into the output buffer */
@@ -218,26 +890,10 @@
*dst++ = (CChar8)(0x80 | ((c32 >> 6) & 0x3F));
*dst++ = (CChar8)(0x80 | ((c32 >> 0) & 0x3F));
}
- else if(c32 < 0x200000)
- {
- *dst++ = (CChar8)(0xF0 | ((c32 >> 18) & 0xFF));
- *dst++ = (CChar8)(0x80 | ((c32 >> 12) & 0x3F));
- *dst++ = (CChar8)(0x80 | ((c32 >> 6) & 0x3F));
- *dst++ = (CChar8)(0x80 | ((c32 >> 0) & 0x3F));
- }
- else if(c32 < 0x4000000)
- {
- *dst++ = (CChar8)(0xF8 | ((c32 >> 24) & 0xFF));
- *dst++ = (CChar8)(0x80 | ((c32 >> 18) & 0x3F));
- *dst++ = (CChar8)(0x80 | ((c32 >> 12) & 0x3F));
- *dst++ = (CChar8)(0x80 | ((c32 >> 6) & 0x3F));
- *dst++ = (CChar8)(0x80 | ((c32 >> 0) & 0x3F));
- }
else
{
- *dst++ = (CChar8)(0xFC | ((c32 >> 30) & 0xFF));
- *dst++ = (CChar8)(0x80 | ((c32 >> 24) & 0x3F));
- *dst++ = (CChar8)(0x80 | ((c32 >> 18) & 0x3F));
+ CASSERT((c32 < 0x110000));
+ *dst++ = (CChar8)(0xF0 | ((c32 >> 18) & 0xFF));
*dst++ = (CChar8)(0x80 | ((c32 >> 12) & 0x3F));
*dst++ = (CChar8)(0x80 | ((c32 >> 6) & 0x3F));
*dst++ = (CChar8)(0x80 | ((c32 >> 0) & 0x3F));
@@ -253,54 +909,199 @@
/* return successfully */
return CStatus_OK;
}
+#endif
+/******************************************************************************/
+
+
+
+/******************************************************************************/
+#define CUTILS_HASHING
+#ifdef CUTILS_HASHING
+/*\
+|*| Hash an array of bytes.
+|*|
+|*| data - data to be hashed
+|*| length - length of data
+|*| init - initial hash value
+|*|
+|*| NOTE: incremental hashing can be achieved by using the
+|*| result of a previous hash operation as the initial
+|*| hash value
+|*|
+|*| Returns hash value.
+\*/
+CINTERNAL CUInt32
+CUtils_HashBest(const CByte *data,
+ CUInt32 length,
+ CUInt32 init)
+{
+ /* declarations */
+ CUInt32 len;
+ CUInt32 a;
+ CUInt32 b;
+ CUInt32 c;
+
+ /* combine input data */
+ #define CUtils_HashBest_Combine(a, b, c, d) \
+ ((((CUInt32)(a)) << 0) + \
+ (((CUInt32)(b)) << 8) + \
+ (((CUInt32)(c)) << 16) + \
+ (((CUInt32)(d)) << 24))
+
+ /* mix internal state */
+ #define CUtils_HashBest_Mix(x, y, z) \
+ do { \
+ (a) -= (b); (a) -= (c); (a) ^= ((c) >> 13); \
+ (b) -= (c); (b) -= (a); (b) ^= ((a) << 8); \
+ (c) -= (a); (c) -= (b); (c) ^= ((b) >> 13); \
+ (a) -= (b); (a) -= (c); (a) ^= ((c) >> 12); \
+ (b) -= (c); (b) -= (a); (b) ^= ((a) << 16); \
+ (c) -= (a); (c) -= (b); (c) ^= ((b) >> 5); \
+ (a) -= (b); (a) -= (c); (a) ^= ((c) >> 3); \
+ (b) -= (c); (b) -= (a); (b) ^= ((a) << 10); \
+ (c) -= (a); (c) -= (b); (c) ^= ((b) >> 15); \
+ } while(0)
+
+ /* get the length */
+ len = length;
+
+ /* initialize the internal state */
+ a = CUtils_HashBest_Init;
+ b = CUtils_HashBest_Init;
+ c = init;
+
+ /* hash most of the data */
+ while(len >= 12)
+ {
+ /* combine input data with internal state */
+ a += CUtils_HashBest_Combine(data[0], data[1], data[2],
data[3]);
+ b += CUtils_HashBest_Combine(data[4], data[5], data[6],
data[7]);
+ c += CUtils_HashBest_Combine(data[8], data[9], data[10],
data[11]);
+
+ /* mix internal state */
+ CUtils_HashBest_Mix(a, b, c);
+
+ /* update data pointer and length */
+ data += 12;
+ len -= 12;
+ }
+
+ /* hash the length */
+ c += length;
+
+ /* hash the last eleven bytes */
+ switch(len)
+ {
+ case 11: { c += (((CUInt32)data[10]) << 24); }
+ case 10: { c += (((CUInt32)data[9]) << 16); }
+ case 9: { c += (((CUInt32)data[8]) << 8); }
+ case 8: { b += (((CUInt32)data[7]) << 24); }
+ case 7: { b += (((CUInt32)data[6]) << 16); }
+ case 6: { b += (((CUInt32)data[5]) << 8); }
+ case 5: { b += (((CUInt32)data[4]) << 0); }
+ case 4: { a += (((CUInt32)data[3]) << 24); }
+ case 3: { a += (((CUInt32)data[2]) << 16); }
+ case 2: { a += (((CUInt32)data[1]) << 8); }
+ case 1: { a += (((CUInt32)data[0]) << 0); }
+ }
+
+ /* mix internal state */
+ CUtils_HashBest_Mix(a, b, c);
+
+ /* return the hash */
+ return c;
+}
+#endif
+/******************************************************************************/
+
+
+
+/******************************************************************************/
+#define CUTILS_IMAGING
+#ifdef CUTILS_IMAGING
+static const CByte CUtils_ReverseBytes_Bits[256] =
+{
+ 0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0,
+ 0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0,
+ 0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8,
+ 0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8,
+ 0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4,
+ 0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4,
+ 0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC,
+ 0x1C, 0x9C, 0x5C, 0xDC, 0x3C, 0xBC, 0x7C, 0xFC,
+ 0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2,
+ 0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2,
+ 0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA,
+ 0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA,
+ 0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6,
+ 0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6,
+ 0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE,
+ 0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE,
+ 0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1,
+ 0x11, 0x91, 0x51, 0xD1, 0x31, 0xB1, 0x71, 0xF1,
+ 0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9,
+ 0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9,
+ 0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5,
+ 0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5,
+ 0x0D, 0x8D, 0x4D, 0xCD, 0x2D, 0xAD, 0x6D, 0xED,
+ 0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD,
+ 0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3,
+ 0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3,
+ 0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB,
+ 0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB,
+ 0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7,
+ 0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7,
+ 0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF,
+ 0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF
+};
static CStatus
-CUtils_ToPixmanImage64bppPArgb(CByte *scan0,
- pixman_image_t *image,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride)
+CUtils_ToPixmanImage64bppPArgb(CByte *scan0,
+ pixman_image_t *image,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride)
{
/* TODO */
return CStatus_NotImplemented;
}
static CStatus
-CUtils_ToPixmanImage64bppArgb(CByte *scan0,
- pixman_image_t *image,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride)
+CUtils_ToPixmanImage64bppArgb(CByte *scan0,
+ pixman_image_t *image,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride)
{
/* TODO */
return CStatus_NotImplemented;
}
static CStatus
-CUtils_ToPixmanImage48bppRgb(CByte *scan0,
- pixman_image_t *image,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride)
+CUtils_ToPixmanImage48bppRgb(CByte *scan0,
+ pixman_image_t *image,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride)
{
/* TODO */
return CStatus_NotImplemented;
}
static CStatus
-CUtils_ToPixmanImage32bppPArgb(CByte *scan0,
- pixman_image_t *image,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride)
+CUtils_ToPixmanImage32bppPArgb(CByte *scan0,
+ pixman_image_t *image,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride)
{
/* declarations */
CByte *data;
@@ -352,13 +1153,13 @@
}
static CStatus
-CUtils_ToPixmanImage32bppArgb(CByte *scan0,
- pixman_image_t *image,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride)
+CUtils_ToPixmanImage32bppArgb(CByte *scan0,
+ pixman_image_t *image,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride)
{
/* declarations */
CByte *data;
@@ -419,13 +1220,13 @@
}
static CStatus
-CUtils_ToPixmanImage32bppRgb(CByte *scan0,
- pixman_image_t *image,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride)
+CUtils_ToPixmanImage32bppRgb(CByte *scan0,
+ pixman_image_t *image,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride)
{
/* declarations */
CByte *data;
@@ -479,13 +1280,13 @@
}
static CStatus
-CUtils_ToPixmanImage24bppRgb(CByte *scan0,
- pixman_image_t *image,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride)
+CUtils_ToPixmanImage24bppRgb(CByte *scan0,
+ pixman_image_t *image,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride)
{
/* declarations */
CByte *data;
@@ -536,13 +1337,13 @@
}
static CStatus
-CUtils_ToPixmanImage16bppArgb1555(CByte *scan0,
- pixman_image_t *image,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride)
+CUtils_ToPixmanImage16bppArgb1555(CByte *scan0,
+ pixman_image_t *image,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride)
{
/* declarations */
CByte *data;
@@ -613,13 +1414,13 @@
}
static CStatus
-CUtils_ToPixmanImage16bppRgb565(CByte *scan0,
- pixman_image_t *image,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride)
+CUtils_ToPixmanImage16bppRgb565(CByte *scan0,
+ pixman_image_t *image,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride)
{
/* declarations */
CByte *data;
@@ -682,13 +1483,13 @@
}
static CStatus
-CUtils_ToPixmanImage16bppRgb555(CByte *scan0,
- pixman_image_t *image,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride)
+CUtils_ToPixmanImage16bppRgb555(CByte *scan0,
+ pixman_image_t *image,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride)
{
/* declarations */
CByte *data;
@@ -751,13 +1552,13 @@
}
static CStatus
-CUtils_ToPixmanImage16bppGrayScale(CByte *scan0,
- pixman_image_t *image,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride)
+CUtils_ToPixmanImage16bppGrayScale(CByte *scan0,
+ pixman_image_t *image,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride)
{
/* declarations */
CByte *data;
@@ -806,42 +1607,42 @@
}
static CStatus
-CUtils_ToPixmanImage8bppIndexed(CByte *scan0,
- pixman_image_t *image,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride,
- CColorPalette *palette)
+CUtils_ToPixmanImage8bppIndexed(CByte *scan0,
+ pixman_image_t *image,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride,
+ CColorPalette *palette)
{
/* TODO */
return CStatus_NotImplemented;
}
static CStatus
-CUtils_ToPixmanImage4bppIndexed(CByte *scan0,
- pixman_image_t *image,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride,
- CColorPalette *palette)
+CUtils_ToPixmanImage4bppIndexed(CByte *scan0,
+ pixman_image_t *image,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride,
+ CColorPalette *palette)
{
/* TODO */
return CStatus_NotImplemented;
}
static CStatus
-CUtils_ToPixmanImage1bppIndexed(CByte *scan0,
- pixman_image_t *image,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride,
- CColorPalette *palette)
+CUtils_ToPixmanImage1bppIndexed(CByte *scan0,
+ pixman_image_t *image,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride,
+ CColorPalette *palette)
{
/* TODO */
return CStatus_NotImplemented;
@@ -849,12 +1650,12 @@
static CStatus
CUtils_FromPixmanImage64bppPArgb(pixman_image_t *image,
- CByte *scan0,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride)
+ CByte *scan0,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride)
{
/* TODO */
return CStatus_NotImplemented;
@@ -862,12 +1663,12 @@
static CStatus
CUtils_FromPixmanImage64bppArgb(pixman_image_t *image,
- CByte *scan0,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride)
+ CByte *scan0,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride)
{
/* TODO */
return CStatus_NotImplemented;
@@ -875,12 +1676,12 @@
static CStatus
CUtils_FromPixmanImage48bppRgb(pixman_image_t *image,
- CByte *scan0,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride)
+ CByte *scan0,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride)
{
/* TODO */
return CStatus_NotImplemented;
@@ -888,12 +1689,12 @@
static CStatus
CUtils_FromPixmanImage32bppPArgb(pixman_image_t *image,
- CByte *scan0,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride)
+ CByte *scan0,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride)
{
/* declarations */
CByte *data;
@@ -952,12 +1753,12 @@
static CStatus
CUtils_FromPixmanImage32bppArgb(pixman_image_t *image,
- CByte *scan0,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride)
+ CByte *scan0,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride)
{
/* declarations */
CByte *data;
@@ -1026,12 +1827,12 @@
static CStatus
CUtils_FromPixmanImage32bppRgb(pixman_image_t *image,
- CByte *scan0,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride)
+ CByte *scan0,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride)
{
/* declarations */
CByte *data;
@@ -1090,12 +1891,12 @@
static CStatus
CUtils_FromPixmanImage24bppRgb(pixman_image_t *image,
- CByte *scan0,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride)
+ CByte *scan0,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride)
{
/* declarations */
CByte *data;
@@ -1153,12 +1954,12 @@
static CStatus
CUtils_FromPixmanImage16bppArgb1555(pixman_image_t *image,
- CByte *scan0,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride)
+ CByte *scan0,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride)
{
/* declarations */
CByte *data;
@@ -1225,12 +2026,12 @@
static CStatus
CUtils_FromPixmanImage16bppRgb565(pixman_image_t *image,
- CByte *scan0,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride)
+ CByte *scan0,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride)
{
/* declarations */
CByte *data;
@@ -1296,12 +2097,12 @@
static CStatus
CUtils_FromPixmanImage16bppRgb555(pixman_image_t *image,
- CByte *scan0,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride)
+ CByte *scan0,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride)
{
/* declarations */
CByte *data;
@@ -1367,12 +2168,12 @@
static CStatus
CUtils_FromPixmanImage16bppGrayScale(pixman_image_t *image,
- CByte *scan0,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride)
+ CByte *scan0,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride)
{
/* declarations */
CByte *data;
@@ -1444,13 +2245,13 @@
static CStatus
CUtils_FromPixmanImage8bppIndexed(pixman_image_t *image,
- CByte *scan0,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride,
- CColorPalette *palette)
+ CByte *scan0,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride,
+ CColorPalette *palette)
{
/* TODO */
return CStatus_NotImplemented;
@@ -1458,13 +2259,13 @@
static CStatus
CUtils_FromPixmanImage4bppIndexed(pixman_image_t *image,
- CByte *scan0,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride,
- CColorPalette *palette)
+ CByte *scan0,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride,
+ CColorPalette *palette)
{
/* TODO */
return CStatus_NotImplemented;
@@ -1472,13 +2273,13 @@
static CStatus
CUtils_FromPixmanImage1bppIndexed(pixman_image_t *image,
- CByte *scan0,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride,
- CColorPalette *palette)
+ CByte *scan0,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride,
+ CColorPalette *palette)
{
/* TODO */
return CStatus_NotImplemented;
@@ -1486,15 +2287,15 @@
/* Convert pixel data into pixman image data. */
CINTERNAL CStatus
-CUtils_ToPixmanImage(CPixelFormat format,
- CByte *scan0,
- pixman_image_t *image,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride,
- CColorPalette *palette)
+CUtils_ToPixmanImage(CPixelFormat format,
+ CByte *scan0,
+ pixman_image_t *image,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride,
+ CColorPalette *palette)
{
/* convert the image according to the format */
switch(format)
@@ -1590,15 +2391,15 @@
/* Convert pixman image data into pixel data. */
CINTERNAL CStatus
-CUtils_FromPixmanImage(CPixelFormat format,
- pixman_image_t *image,
- CByte *scan0,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- CUInt32 stride,
- CColorPalette *palette)
+CUtils_FromPixmanImage(CPixelFormat format,
+ pixman_image_t *image,
+ CByte *scan0,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ CUInt32 stride,
+ CColorPalette *palette)
{
/* convert the image according to the format */
switch(format)
@@ -1694,9 +2495,9 @@
CINTERNAL CStatus
CUtils_GetPixmanPixelPointer(pixman_image_t *image,
- CUInt32 x,
- CUInt32 y,
- CColor **pixel)
+ CUInt32 x,
+ CUInt32 y,
+ CColor **pixel)
{
/* declarations */
CByte *data;
@@ -1726,14 +2527,14 @@
CINTERNAL CUInt32
CUtils_FormatToStride(CPixelFormat pixelFormat,
- CUInt32 width)
+ CUInt32 width)
{
return ((CUtils_BytesPerLine(pixelFormat, width) + 3) & ~3);
}
CINTERNAL CUInt32
CUtils_BytesPerLine(CPixelFormat pixelFormat,
- CUInt32 width)
+ CUInt32 width)
{
switch(pixelFormat)
{
@@ -1777,12 +2578,12 @@
{
/* declarations */
pixman_transform_t pt;
- CFloat xx;
- CFloat xy;
- CFloat yx;
- CFloat yy;
- CFloat dx;
- CFloat dy;
+ CFloat xx;
+ CFloat xy;
+ CFloat yx;
+ CFloat yy;
+ CFloat dx;
+ CFloat dy;
/* assertions */
CASSERT((transform != 0));
@@ -1816,7 +2617,7 @@
CINTERNAL CStatus
CUtils_CreateSolidPattern(pixman_image_t **pattern,
- CColor color)
+ CColor color)
{
/* assertions */
CASSERT((pattern != 0));
@@ -1876,6 +2677,157 @@
return CStatus_OK;
}
+CINTERNAL CStatus
+CUtils_CreateHatchPattern(pixman_image_t **pattern,
+ const CByte *bits,
+ CUInt16 width,
+ CUInt16 height,
+ CColor fg,
+ CColor bg,
+ CBool repeat)
+{
+ /* assertions */
+ CASSERT((pattern != 0));
+ CASSERT((bits != 0));
+ CASSERT((width != 0));
+ CASSERT((height != 0));
+
+ /* create the pattern */
+ {
+ /* declarations */
+ pixman_format_t *format;
+
+ /* create the pixman format */
+ format = pixman_format_create(PIXMAN_FORMAT_NAME_ARGB32);
+
+ /* ensure we have a format */
+ CStatus_Require((format != 0), CStatus_OutOfMemory);
+
+ /* create the pixman image */
+ *pattern = pixman_image_create(format, width, height);
+
+ /* dispose of the format */
+ pixman_format_destroy(format);
+
+ /* ensure we have an image */
+ CStatus_Require((*pattern != 0), CStatus_OutOfMemory);
+
+ /* calculate the pre-multiplied foreground */
+ {
+ /* declarations */
+ CByte a, r, g, b;
+
+ /* get the components and pre-multiply */
+ a = ((CColor_A(fg)));
+ r = ((CColor_R(fg) * a) / 255);
+ g = ((CColor_G(fg) * a) / 255);
+ b = ((CColor_B(fg) * a) / 255);
+
+ /* set the foreground */
+ fg = CPixmanPixel_FromARGB(a, r, g, b);
+ }
+
+ /* calculate the pre-multiplied background */
+ {
+ /* declarations */
+ CByte a, r, g, b;
+
+ /* get the components and pre-multiply */
+ a = ((CColor_A(bg)));
+ r = ((CColor_R(bg) * a) / 255);
+ g = ((CColor_G(bg) * a) / 255);
+ b = ((CColor_B(bg) * a) / 255);
+
+ /* set the background */
+ bg = CPixmanPixel_FromARGB(a, r, g, b);
+ }
+
+ /* generate the pattern */
+ {
+ /* declarations */
+ CColor *pd, *currP;
+ const CByte *bd, *currB;
+ CUInt32 bs, ps;
+ CUInt32 y, i;
+ CUInt32 extra;
+
+ /* calculate the bits stride */
+ bs = (width + 7) >> 3;
+
+ /* get the bits data */
+ bd = bits;
+
+ /* get the pattern stride */
+ ps = pixman_image_get_stride(*pattern);
+
+ /* get the pattern data */
+ pd = (CColor *)pixman_image_get_data(*pattern);
+
+ /* clear the data */
+ CMemSet(pd, 0x00, ps * height);
+
+ /* calculate the extra width */
+ extra = (width & 0x07);
+
+ /* generate the pattern, line by line */
+ for(y = 0; y < height; ++y)
+ {
+ /* get the current data pointers */
+ currP = pd;
+ currB = bd;
+
+ /* handle eight pixels at a time */
+ for(i = 0; i < (width >> 3); ++i)
+ {
+ /* get the current mask byte */
+ CByte b = *currB++;
+
+ /* set the pattern pixels */
+ *currP++ = ((b & 0x01) ? fg : bg);
+ *currP++ = ((b & 0x02) ? fg : bg);
+ *currP++ = ((b & 0x04) ? fg : bg);
+ *currP++ = ((b & 0x08) ? fg : bg);
+ *currP++ = ((b & 0x10) ? fg : bg);
+ *currP++ = ((b & 0x20) ? fg : bg);
+ *currP++ = ((b & 0x40) ? fg : bg);
+ *currP++ = ((b & 0x80) ? fg : bg);
+ }
+
+ /* handle any additional pixels for this line */
+ if(extra)
+ {
+ /* get the current mask byte */
+ CByte b = *currB;
+
+ /* advance to the last pixel for this
line */
+ currP += (extra - 1);
+
+ /* set the pattern pixels */
+ switch(extra)
+ {
+ case 7: { *currP-- = ((b &
0x40) ? fg : bg); }
+ case 6: { *currP-- = ((b &
0x20) ? fg : bg); }
+ case 5: { *currP-- = ((b &
0x10) ? fg : bg); }
+ case 4: { *currP-- = ((b &
0x08) ? fg : bg); }
+ case 3: { *currP-- = ((b &
0x04) ? fg : bg); }
+ case 2: { *currP-- = ((b &
0x02) ? fg : bg); }
+ case 1: { *currP = ((b &
0x01) ? fg : bg); }
+ }
+ }
+
+ /* advance to the next line */
+ pd += ps; bd += bs;
+ }
+
+ /* set the repeat flag */
+ pixman_image_set_repeat(*pattern, repeat);
+ }
+ }
+
+ /* return successfully */
+ return CStatus_OK;
+}
+
CINTERNAL pixman_color_t
CUtils_ToPixmanColor(CColor color)
{
@@ -1898,11 +2850,11 @@
CINTERNAL CStatus
CUtils_PixmanImageRectangle(pixman_image_t *src,
- pixman_image_t *dst,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height)
+ pixman_image_t *dst,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height)
{
/* declarations */
CByte *dataS;
@@ -1944,9 +2896,1263 @@
return CStatus_OK;
}
+
+CINTERNAL void
+CUtils_ReverseBytes(CByte *bits,
+ CUInt32 length)
+{
+ /* assertions */
+ CASSERT((bits != 0));
+
+ /* flip the bits around */
+ while(length--) { *bits = CUtils_ReverseBytes_Bits[*bits]; ++bits; }
+}
+
+#endif
+/******************************************************************************/
+
+
+
+/******************************************************************************/
+#define CUTILS_PRIMES
+#ifdef CUTILS_PRIMES
+
+/* small twin primes */
+static const CUInt32 SmallTwinPrimes[] =
+{
+ 3, 5, 11, 17, 29
+};
+#define SmallTwinPrimes_Length (sizeof(SmallTwinPrimes) / sizeof(CUInt32))
+
+/* large twin primes */
+static const CUInt32 LargeTwinPrimes[] =
+{
+ 1000037, 1100039, 1200359, 1300127, 1400141, 1500041,
+ 1600097, 1700141, 1800119, 1900487, 2000081, 2200139,
+ 2400107, 2600327, 2800001, 3000131, 3250127, 3500381,
+ 3750167, 4000037, 4250021, 4500047, 4750001, 5000111,
+ 5500277, 6000101, 6500159, 7000127, 7500221, 8000051,
+ 8500067, 9000377, 9500189, 10000139, 11000081, 12000257,
+ 13000217, 14000087, 15000521, 16000079, 17000441, 18000137,
+ 19000409, 20000159, 22000001, 24000239, 26000081, 28000121,
+ 30000167, 32500019, 35000267, 37500821, 40000487, 42500201,
+ 45000017, 47500001, 50000231, 55000469, 60000011, 65000567,
+ 70000451, 75000179, 80000537, 85000007, 90000107, 95000159,
+ 100000037, 110000549, 120000299, 130000007, 140000351, 150000449,
+ 160000457, 170000189, 180000719, 190000241, 200000081, 220000199,
+ 240000149, 260000171, 280000067, 300000317, 325000199, 350000069,
+ 375000317, 400000649, 425000159, 450000119, 475000037, 500000069,
+ 550000697, 600000017, 650000009, 700000529, 750000257, 800000027,
+ 850000157, 900000221, 950000351
+};
+#define LargeTwinPrimes_Length (sizeof(LargeTwinPrimes) / sizeof(CUInt32))
+
+/*\
+|*| This is a compressed twin prime list. The list takes advantage
+|*| of the fact that:
+|*|
+|*| if:
+|*| z = 30x + n
+|*| and:
+|*| x >= 1
+|*| then (because 2, 3, and 5 are factors of 30):
+|*| z can only be prime if n is in the set: { 1 7 11 13 17 19 23 29 }
+|*| therefore:
+|*| if:
+|*| w = z + 2
+|*| and:
+|*| z is prime
+|*| then:
+|*| w can only be prime if n is in the set: { 11 17 29 }
+|*|
+|*| Because of this, we can store twin prime information for every
+|*| span of 240 integers, starting with 30 through 270, in only 3
+|*| bytes. This is a rather simple approach, and could be improved
+|*| by increasing the base (e.g. 2310 instead of 30), though the
+|*| implementation would become far more complicated. Due to the
+|*| increasing distance between twin primes, this compression
+|*| scheme becomes less efficient as the list grows, and becomes
+|*| worse than an explicit list of twin primes once the average
+|*| distance between twin primes exceeds 320 (240/3 ints/byte ==
+|*| 240/24 ints/bit == 10 ints/bit). This list stores the first
+|*| number of all twin prime pairs from 41 to 1000037, which
+|*| gives an average compression of about 260%.
+\*/
+static const CByte MediumTwinPrimes[] =
+{
+ 0xCD, 0xCC, 0x99, 0x89, 0xC0, 0x04, 0x21, 0x55, 0x00, 0xE0, 0x14, 0x00,
+ 0x6C, 0x82, 0x80, 0x70, 0x01, 0x28, 0x03, 0x60, 0x48, 0x81, 0x80, 0xA1,
+ 0x90, 0xB0, 0x06, 0x90, 0x48, 0x04, 0x00, 0x88, 0x40, 0x2A, 0x18, 0x00,
+ 0x20, 0x01, 0x10, 0x02, 0x46, 0xB2, 0xC0, 0x60, 0x05, 0x08, 0x20, 0x24,
+ 0x30, 0x50, 0x22, 0x12, 0xDC, 0x40, 0x40, 0x10, 0x09, 0x30, 0x10, 0x18,
+ 0x00, 0x22, 0x06, 0x04, 0x80, 0x10, 0x00, 0x14, 0x15, 0x00, 0x07, 0x04,
+ 0xA0, 0x01, 0x00, 0x20, 0x02, 0x81, 0x04, 0x01, 0x02, 0x28, 0x40, 0x06,
+ 0x8D, 0x08, 0x18, 0x00, 0x20, 0x20, 0x80, 0x0A, 0x40, 0x82, 0x09, 0x00,
+ 0x10, 0x00, 0x81, 0x20, 0x20, 0x00, 0x0C, 0x02, 0x88, 0x00, 0x04, 0x09,
+ 0x00, 0x40, 0x05, 0x20, 0x13, 0x00, 0x00, 0x11, 0x04, 0x5C, 0x00, 0x80,
+ 0x10, 0x21, 0x40, 0x20, 0x20, 0x29, 0x04, 0x80, 0x24, 0x80, 0x44, 0x02,
+ 0x00, 0x08, 0x00, 0x24, 0x04, 0xC0, 0x10, 0x03, 0x00, 0x08, 0x00, 0x82,
+ 0x00, 0x40, 0x41, 0x08, 0x40, 0x02, 0x89, 0x10, 0x30, 0x00, 0x04, 0x00,
+ 0x04, 0x02, 0x00, 0x40, 0x00, 0x01, 0x03, 0x00, 0x40, 0x00, 0x04, 0x01,
+ 0x00, 0x00, 0xB0, 0x11, 0x08, 0x25, 0x30, 0x10, 0x00, 0x20, 0x10, 0x08,
+ 0x02, 0x98, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x40, 0x00, 0x28, 0x12,
+ 0x00, 0x00, 0x04, 0x03, 0x06, 0x00, 0x02, 0x02, 0x0C, 0x84, 0x08, 0x00,
+ 0x01, 0x02, 0x00, 0x28, 0x02, 0x80, 0x40, 0x40, 0x08, 0x00, 0x28, 0x20,
+ 0x80, 0x04, 0x02, 0x14, 0x14, 0x88, 0x10, 0x18, 0x09, 0x07, 0x03, 0x20,
+ 0x0A, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x41, 0x24,
+ 0x00, 0x40, 0x8C, 0x40, 0x00, 0x40, 0x08, 0x10, 0x02, 0x49, 0x00, 0x08,
+ 0x08, 0x00, 0x01, 0x91, 0x08, 0x10, 0x90, 0x22, 0x40, 0x40, 0x46, 0x00,
+ 0x08, 0x00, 0x41, 0x00, 0x12, 0x39, 0x02, 0x04, 0x10, 0x00, 0x00, 0xA1,
+ 0x10, 0x80, 0x01, 0x02, 0x10, 0x24, 0x14, 0x44, 0x00, 0x04, 0x10, 0x58,
+ 0x00, 0x10, 0x20, 0x20, 0x00, 0x40, 0x81, 0x28, 0x04, 0x08, 0x08, 0x00,
+ 0x80, 0x40, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41,
+ 0x08, 0x00, 0x02, 0xC0, 0x00, 0x82, 0x00, 0x14, 0x00, 0x00, 0x21, 0x20,
+ 0x10, 0x80, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2D, 0x00, 0x34,
+ 0x08, 0x40, 0x08, 0x00, 0x11, 0x00, 0x02, 0x61, 0x04, 0x20, 0x8C, 0x00,
+ 0x50, 0x00, 0xC0, 0x40, 0x00, 0x89, 0x20, 0x00, 0x28, 0x44, 0x80, 0x00,
+ 0x00, 0x00, 0x04, 0x20, 0x20, 0x00, 0x80, 0x01, 0x00, 0x02, 0x08, 0x10,
+ 0x00, 0x01, 0x20, 0x20, 0x04, 0x80, 0x00, 0x08, 0x28, 0x10, 0x00, 0x00,
+ 0x00, 0x0B, 0x00, 0x00, 0x91, 0x04, 0x02, 0x81, 0x00, 0x48, 0x00, 0x00,
+ 0x23, 0x20, 0x00, 0x80, 0x04, 0x85, 0x00, 0x14, 0x22, 0x01, 0x12, 0x02,
+ 0x10, 0x90, 0x80, 0x24, 0x80, 0x80, 0x04, 0x20, 0x0A, 0x00, 0x00, 0x58,
+ 0x00, 0x28, 0x0A, 0x00, 0x80, 0x00, 0x12, 0x42, 0x04, 0x02, 0xC8, 0x80,
+ 0x20, 0x00, 0x01, 0x03, 0x10, 0x20, 0x01, 0x00, 0x10, 0x00, 0x20, 0x28,
+ 0x08, 0x00, 0x02, 0x11, 0x04, 0x20, 0x80, 0x00, 0x00, 0x40, 0x00, 0x08,
+ 0x02, 0x00, 0x00, 0x0C, 0x40, 0x02, 0x04, 0x00, 0x10, 0x80, 0x14, 0x00,
+ 0x80, 0x0A, 0x20, 0x40, 0x02, 0x00, 0x08, 0x00, 0x00, 0x10, 0x20, 0x00,
+ 0x06, 0x20, 0xA2, 0x88, 0x00, 0x00, 0x01, 0x10, 0x00, 0x81, 0x01, 0x24,
+ 0x00, 0x08, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x01, 0x0A, 0x00, 0x00,
+ 0x80, 0x00, 0x02, 0x10, 0x04, 0x00, 0x02, 0x00, 0x00, 0x40, 0x94, 0x00,
+ 0x80, 0x02, 0x10, 0x20, 0x00, 0x10, 0x20, 0x00, 0x45, 0x08, 0x40, 0x04,
+ 0x01, 0x20, 0x04, 0x20, 0x10, 0x04, 0x00, 0x41, 0x00, 0x20, 0x00, 0x00,
+ 0x00, 0x01, 0x01, 0x40, 0x24, 0x02, 0xC0, 0x00, 0x02, 0x81, 0x20, 0x02,
+ 0x81, 0x01, 0x04, 0x00, 0x02, 0x04, 0x04, 0x02, 0x00, 0x00, 0x00, 0x50,
+ 0x04, 0x00, 0x05, 0x00, 0x00, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x22,
+ 0x40, 0x80, 0x88, 0x00, 0x01, 0x80, 0x00, 0x01, 0xC2, 0x00, 0x00, 0x40,
+ 0x80, 0x00, 0x00, 0x88, 0x04, 0x00, 0x00, 0xC4, 0x44, 0x02, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x08, 0x20, 0x10, 0x04, 0x20, 0x21, 0x44, 0x0C, 0x80,
+ 0x08, 0x10, 0x12, 0x10, 0xA2, 0x02, 0xA0, 0x00, 0x08, 0x84, 0x00, 0x50,
+ 0x48, 0x02, 0x02, 0x40, 0x00, 0x00, 0x04, 0x88, 0x00, 0x00, 0x00, 0x20,
+ 0x20, 0x40, 0x20, 0x10, 0x01, 0x0C, 0x14, 0x01, 0x00, 0x00, 0x21, 0x88,
+ 0x00, 0x02, 0x08, 0x40, 0x00, 0x02, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00,
+ 0x44, 0x00, 0x00, 0x82, 0x82, 0x18, 0x00, 0x00, 0x80, 0x28, 0x00, 0x01,
+ 0x00, 0x04, 0x20, 0x00, 0x00, 0x00, 0x00, 0x50, 0x40, 0x44, 0x08, 0x00,
+ 0x00, 0x00, 0x01, 0x20, 0x00, 0x40, 0x00, 0x06, 0x10, 0x00, 0xC0, 0x04,
+ 0x00, 0x04, 0x24, 0x00, 0x41, 0x00, 0x92, 0x00, 0x00, 0x50, 0x02, 0x01,
+ 0x08, 0x20, 0xA0, 0x01, 0x00, 0x00, 0x48, 0x08, 0x0A, 0x00, 0x20, 0x01,
+ 0x00, 0x80, 0x00, 0x04, 0x00, 0x80, 0x28, 0x08, 0x00, 0x0A, 0x03, 0x00,
+ 0x01, 0x00, 0x08, 0x80, 0x00, 0x26, 0x00, 0x60, 0x00, 0x10, 0x94, 0x00,
+ 0x80, 0x08, 0x00, 0x00, 0x00, 0x00, 0x60, 0x20, 0x40, 0x00, 0x00, 0x00,
+ 0x00, 0x60, 0x00, 0x01, 0x60, 0x01, 0x00, 0x80, 0x00, 0x00, 0x42, 0x80,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x86, 0x00, 0x04, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE2, 0x08, 0x00, 0x10, 0x80, 0x80,
+ 0x04, 0x00, 0x18, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x88, 0x00, 0x04,
+ 0x00, 0x02, 0x40, 0x40, 0x00, 0x04, 0x10, 0x01, 0x08, 0x04, 0x02, 0x08,
+ 0x00, 0x20, 0x50, 0x04, 0x40, 0x03, 0x10, 0x20, 0x04, 0x80, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x20, 0x00, 0x80, 0x00, 0x02, 0x08, 0x00, 0x40, 0x68,
+ 0x08, 0x00, 0x0A, 0x00, 0x04, 0x00, 0x10, 0x00, 0x20, 0x00, 0x80, 0x00,
+ 0x02, 0x01, 0x00, 0x22, 0x00, 0x00, 0x08, 0x40, 0x50, 0x00, 0x08, 0x80,
+ 0x08, 0x04, 0x00, 0x01, 0x06, 0x00, 0x00, 0x14, 0x48, 0x20, 0x10, 0x00,
+ 0x45, 0x01, 0x00, 0x04, 0x24, 0x20, 0x04, 0x00, 0x00, 0x11, 0x49, 0x01,
+ 0x00, 0x00, 0x04, 0x86, 0x82, 0x80, 0x00, 0x80, 0x00, 0x02, 0x01, 0x00,
+ 0x60, 0x20, 0xAC, 0x00, 0x00, 0x08, 0x00, 0xA0, 0x00, 0x00, 0x08, 0x00,
+ 0x50, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x20, 0x10, 0x00, 0x20, 0x00,
+ 0x00, 0x40, 0x10, 0x01, 0x00, 0x24, 0x80, 0x00, 0x02, 0x30, 0x01, 0x00,
+ 0x00, 0x02, 0x00, 0x22, 0x00, 0x80, 0x01, 0x40, 0x40, 0x80, 0x00, 0x00,
+ 0x00, 0x18, 0x10, 0x10, 0x40, 0x00, 0x42, 0x00, 0x04, 0x20, 0x00, 0x80,
+ 0x08, 0x10, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x04, 0x83, 0x00, 0xA0, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x81, 0x24, 0x00, 0x00,
+ 0x04, 0x20, 0x40, 0x00, 0x80, 0x80, 0x00, 0x00, 0x01, 0x00, 0x81, 0x60,
+ 0x00, 0x12, 0x04, 0x10, 0x00, 0x08, 0x0A, 0x00, 0x00, 0x2A, 0x00, 0x88,
+ 0x81, 0x84, 0x80, 0x00, 0x34, 0x00, 0x10, 0x10, 0x20, 0x00, 0x80, 0x00,
+ 0x42, 0x00, 0x00, 0x24, 0x22, 0x01, 0x04, 0x04, 0x80, 0x00, 0x08, 0x12,
+ 0x00, 0x30, 0x21, 0x20, 0x00, 0x00, 0x00, 0xC0, 0x08, 0x04, 0x01, 0x00,
+ 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x04, 0x40, 0x04, 0x90, 0x08, 0x00,
+ 0x01, 0x08, 0x00, 0x20, 0x0C, 0x40, 0x00, 0x02, 0x10, 0x00, 0x12, 0x28,
+ 0x00, 0x40, 0x08, 0x00, 0x0C, 0x20, 0x80, 0x80, 0x00, 0x00, 0x82, 0x02,
+ 0x00, 0x02, 0x08, 0x00, 0x00, 0x00, 0x02, 0x02, 0x90, 0x44, 0x02, 0x00,
+ 0x00, 0x48, 0x89, 0x01, 0x01, 0x00, 0x00, 0x11, 0x00, 0x00, 0x40, 0x40,
+ 0x00, 0x08, 0x80, 0x42, 0x00, 0x70, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x10, 0x11, 0x0C, 0x00, 0x04, 0x04, 0x40, 0x08, 0x00, 0x01,
+ 0x00, 0x12, 0x01, 0x02, 0x04, 0x01, 0x40, 0x00, 0x00, 0x00, 0xE5, 0x00,
+ 0x00, 0x20, 0x40, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x40,
+ 0x04, 0x00, 0x14, 0x04, 0x20, 0x90, 0x01, 0x08, 0x04, 0x10, 0x00, 0x20,
+ 0x00, 0x13, 0x00, 0x00, 0x03, 0x01, 0x40, 0x10, 0x02, 0x0A, 0x20, 0x80,
+ 0x08, 0x00, 0x88, 0x10, 0x01, 0x16, 0x20, 0x00, 0x00, 0x02, 0x08, 0x00,
+ 0x02, 0x88, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x09,
+ 0x00, 0x40, 0x04, 0x20, 0x00, 0x00, 0x80, 0x00, 0x40, 0x50, 0x00, 0x00,
+ 0x01, 0x00, 0x03, 0x40, 0x60, 0x00, 0x84, 0x24, 0x02, 0x80, 0x70, 0x00,
+ 0x20, 0x00, 0x00, 0x00, 0x14, 0x08, 0x00, 0x10, 0x10, 0x28, 0x20, 0xC8,
+ 0x02, 0x00, 0x60, 0x00, 0x04, 0x08, 0x00, 0x20, 0x00, 0x80, 0x01, 0x00,
+ 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x09, 0x00, 0x09, 0x00, 0x00, 0x10,
+ 0x00, 0x00, 0x00, 0x18, 0x21, 0x10, 0x00, 0x00, 0x24, 0x00, 0x00, 0x08,
+ 0x10, 0x00, 0x10, 0x54, 0x00, 0x21, 0x04, 0x20, 0x40, 0x00, 0x00, 0x01,
+ 0x01, 0x80, 0x02, 0x80, 0x02, 0x00, 0x20, 0x80, 0x04, 0x00, 0x00, 0x00,
+ 0x00, 0x12, 0x00, 0x0E, 0x20, 0x08, 0x08, 0x08, 0x04, 0x08, 0x08, 0x00,
+ 0x01, 0x11, 0x02, 0x00, 0x00, 0x00, 0x80, 0x02, 0x10, 0x00, 0x20, 0x00,
+ 0x00, 0x20, 0x00, 0x00, 0x80, 0x00, 0x81, 0x04, 0x11, 0x00, 0x02, 0x04,
+ 0x44, 0x80, 0x04, 0x04, 0x10, 0x80, 0x04, 0x00, 0x00, 0x00, 0x00, 0x08,
+ 0x00, 0x00, 0x01, 0x10, 0x00, 0x20, 0x80, 0x80, 0x00, 0x02, 0x04, 0x44,
+ 0x00, 0x00, 0x08, 0x08, 0x10, 0x18, 0x00, 0x40, 0x12, 0x00, 0x00, 0xA0,
+ 0x10, 0x40, 0x04, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
+ 0x50, 0x20, 0x00, 0x20, 0x40, 0x10, 0x01, 0x08, 0x10, 0x80, 0x08, 0x00,
+ 0x00, 0x02, 0x00, 0x00, 0x42, 0x88, 0x00, 0x00, 0x08, 0x00, 0x20, 0x42,
+ 0x01, 0x00, 0x20, 0x01, 0x00, 0x01, 0x00, 0x01, 0x14, 0x81, 0x03, 0x00,
+ 0x52, 0x00, 0x40, 0x40, 0x00, 0x51, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x51, 0x02, 0x10, 0x00, 0x00, 0x04, 0x80, 0x00,
+ 0x40, 0x11, 0x80, 0x00, 0x10, 0x00, 0x60, 0x40, 0x25, 0x04, 0x40, 0x80,
+ 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x02, 0x08, 0x00, 0x02, 0x10, 0x00,
+ 0x08, 0x01, 0x22, 0x00, 0x44, 0x40, 0x48, 0x00, 0x12, 0x01, 0x0C, 0x00,
+ 0x20, 0x22, 0x00, 0x20, 0x00, 0x00, 0x04, 0x00, 0x10, 0x40, 0x00, 0x00,
+ 0x26, 0x00, 0x60, 0x00, 0x04, 0x80, 0x00, 0x64, 0x20, 0x20, 0x10, 0x04,
+ 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x05,
+ 0x44, 0x00, 0x02, 0x00, 0x28, 0x10, 0x00, 0xA4, 0x00, 0x80, 0x00, 0x80,
+ 0x80, 0x03, 0x08, 0x03, 0x10, 0x18, 0x40, 0x00, 0x23, 0x40, 0x00, 0x08,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x82, 0x04, 0x00, 0x02, 0x00,
+ 0x00, 0x00, 0x00, 0x41, 0x20, 0xC4, 0x80, 0x00, 0x04, 0x00, 0x00, 0x06,
+ 0x80, 0x40, 0x00, 0x10, 0x40, 0x00, 0x00, 0x00, 0x08, 0x00, 0x01, 0x80,
+ 0x00, 0x24, 0x20, 0x00, 0x00, 0x08, 0x00, 0x00, 0x20, 0x00, 0x02, 0x00,
+ 0x00, 0x04, 0x00, 0x08, 0x01, 0x40, 0x22, 0x00, 0x00, 0x00, 0x20, 0x90,
+ 0x00, 0x04, 0x00, 0x00, 0x80, 0x00, 0x11, 0x40, 0x20, 0x00, 0x09, 0x40,
+ 0x80, 0x80, 0x00, 0x64, 0x00, 0x10, 0x40, 0x20, 0x00, 0x01, 0x24, 0x88,
+ 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x41, 0x00, 0x22, 0x00, 0x00,
+ 0x2C, 0x00, 0x00, 0x01, 0x00, 0x02, 0x08, 0x00, 0x02, 0x00, 0x20, 0x01,
+ 0x00, 0x81, 0x40, 0x10, 0x42, 0x00, 0x02, 0x00, 0x00, 0x20, 0x00, 0x01,
+ 0x02, 0x00, 0x88, 0x01, 0x04, 0x08, 0x00, 0x00, 0x00, 0x10, 0x09, 0x00,
+ 0x40, 0x80, 0x80, 0x00, 0x02, 0x00, 0x04, 0x20, 0x00, 0x00, 0x42, 0x12,
+ 0x00, 0x80, 0x00, 0x01, 0x00, 0x01, 0x01, 0x04, 0x00, 0x20, 0x10, 0x88,
+ 0xC8, 0x00, 0x10, 0x02, 0x01, 0x00, 0x08, 0x04, 0x08, 0x00, 0x00, 0x00,
+ 0x10, 0x10, 0x00, 0x21, 0x8A, 0x20, 0x04, 0x88, 0x00, 0x12, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x08, 0x00, 0x10, 0x40, 0x10,
+ 0x00, 0x12, 0x02, 0x20, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x10,
+ 0x40, 0x20, 0x40, 0x00, 0x08, 0x04, 0x00, 0x00, 0x00, 0x02, 0x08, 0x00,
+ 0x00, 0x00, 0x40, 0x00, 0x08, 0x08, 0x21, 0x01, 0x29, 0x00, 0x00, 0x00,
+ 0x44, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x90, 0x20, 0x20, 0x00, 0x01, 0x40,
+ 0x10, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x04, 0x09, 0x08, 0x40, 0x00,
+ 0x08, 0x00, 0x04, 0x00, 0x00, 0x04, 0x02, 0x02, 0x00, 0x08, 0x01, 0x00,
+ 0x08, 0x30, 0x00, 0x00, 0x20, 0x10, 0x04, 0x00, 0x00, 0x00, 0x20, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x10, 0x10, 0x11, 0x00, 0x20,
+ 0x62, 0x04, 0x00, 0x00, 0x04, 0x04, 0x00, 0x01, 0x00, 0x01, 0x00, 0x20,
+ 0x80, 0x08, 0x40, 0xA0, 0x00, 0x00, 0x20, 0x00, 0x00, 0x08, 0x00, 0x00,
+ 0x00, 0x00, 0x04, 0x08, 0x01, 0x04, 0x00, 0x08, 0x00, 0x80, 0x12, 0x04,
+ 0x04, 0x02, 0x40, 0x0C, 0x01, 0x02, 0x00, 0x04, 0x32, 0x81, 0x80, 0x02,
+ 0x10, 0x08, 0x02, 0x20, 0x00, 0x06, 0x04, 0x04, 0x00, 0x80, 0x00, 0x00,
+ 0x02, 0x10, 0x90, 0x22, 0x00, 0x02, 0x01, 0x44, 0x00, 0x00, 0x20, 0x00,
+ 0x20, 0x20, 0x44, 0x82, 0x11, 0x00, 0x00, 0x00, 0x40, 0x05, 0x02, 0x11,
+ 0x00, 0x40, 0x41, 0x04, 0x80, 0x00, 0x00, 0x08, 0x00, 0x02, 0x18, 0x00,
+ 0x00, 0x00, 0x00, 0x8A, 0x00, 0x10, 0x50, 0x02, 0x01, 0x00, 0x00, 0xA0,
+ 0x84, 0x00, 0x08, 0x08, 0x00, 0x00, 0x01, 0x10, 0x00, 0x40, 0x00, 0x40,
+ 0x04, 0x00, 0x01, 0x60, 0x02, 0x00, 0x04, 0x00, 0x48, 0x00, 0x40, 0x20,
+ 0x00, 0x00, 0x01, 0x10, 0x40, 0x04, 0x20, 0x00, 0xC0, 0x18, 0x08, 0x08,
+ 0x00, 0x01, 0x09, 0x20, 0x00, 0x20, 0x00, 0x00, 0x04, 0x08, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x08,
+ 0x00, 0x40, 0x82, 0x08, 0x84, 0x80, 0x00, 0x84, 0x30, 0x00, 0x00, 0x00,
+ 0x00, 0x10, 0x00, 0x34, 0x88, 0x00, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00,
+ 0x04, 0x40, 0x00, 0x01, 0x01, 0x26, 0x00, 0x11, 0x02, 0x00, 0x00, 0x00,
+ 0x02, 0x08, 0x00, 0x02, 0x00, 0x80, 0x40, 0x00, 0x20, 0x44, 0x20, 0x02,
+ 0x80, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x40, 0x00, 0x0C, 0x00, 0x08,
+ 0x28, 0x00, 0x80, 0x02, 0x00, 0x04, 0x00, 0x00, 0x01, 0x00, 0x21, 0x00,
+ 0x00, 0x80, 0x00, 0x00, 0x80, 0x08, 0xC0, 0x01, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x81, 0x40, 0x04, 0x03, 0x00, 0x04,
+ 0x10, 0x00, 0x88, 0x04, 0x10, 0x00, 0x40, 0x00, 0x40, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x09, 0x00, 0x00, 0x40, 0x00,
+ 0x82, 0x00, 0x40, 0x01, 0x01, 0x00, 0x00, 0x00, 0x20, 0x08, 0x00, 0x02,
+ 0x00, 0x40, 0x00, 0x00, 0x80, 0x02, 0x00, 0x04, 0x00, 0x00, 0x01, 0x00,
+ 0x00, 0x20, 0x01, 0x03, 0x02, 0x00, 0x81, 0x40, 0x00, 0x08, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x20, 0x04, 0x00, 0x40, 0x01, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x04, 0x00, 0x28, 0x20, 0x10, 0x08, 0x00, 0x00, 0x08, 0x44,
+ 0x00, 0x00, 0x40, 0x12, 0x00, 0x40, 0x20, 0x00, 0x08, 0x20, 0x00, 0x00,
+ 0x01, 0x00, 0x82, 0x80, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00,
+ 0x50, 0x00, 0x40, 0x49, 0x22, 0x10, 0x00, 0x20, 0x40, 0x84, 0x08, 0x03,
+ 0x08, 0x2C, 0x00, 0x01, 0x02, 0x00, 0x20, 0x00, 0x00, 0x08, 0x00, 0x00,
+ 0x10, 0x10, 0x10, 0x02, 0x00, 0x29, 0x00, 0x60, 0x80, 0x00, 0x21, 0x10,
+ 0x01, 0x02, 0x40, 0x80, 0x02, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00,
+ 0x0C, 0x24, 0x01, 0x04, 0x84, 0x10, 0x08, 0x40, 0x10, 0x02, 0x00, 0x00,
+ 0x04, 0x00, 0x80, 0x10, 0x00, 0x00, 0x41, 0x00, 0x30, 0x40, 0x00, 0x41,
+ 0x04, 0x20, 0x08, 0x90, 0x80, 0x02, 0xA0, 0x44, 0x42, 0x00, 0x40, 0x08,
+ 0x08, 0x00, 0x50, 0x08, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x40, 0x01,
+ 0x10, 0x0C, 0x02, 0x80, 0x10, 0x00, 0x10, 0x02, 0x00, 0x80, 0x80, 0x00,
+ 0x00, 0x20, 0x00, 0x2A, 0x00, 0x80, 0x40, 0x20, 0x81, 0x00, 0x00, 0x00,
+ 0x20, 0x00, 0x20, 0x02, 0x10, 0x08, 0x0C, 0x00, 0x01, 0x00, 0x10, 0x08,
+ 0x04, 0x04, 0x10, 0x40, 0x20, 0x08, 0x01, 0x08, 0x00, 0x80, 0x60, 0x40,
+ 0x00, 0x04, 0x80, 0x00, 0x80, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x04, 0x14, 0x80,
+ 0x00, 0x02, 0x88, 0x10, 0x02, 0x40, 0x00, 0x00, 0x21, 0x80, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x02, 0x00, 0x40, 0x80, 0x08, 0x00, 0x20, 0x00, 0x00,
+ 0x40, 0x00, 0x42, 0x04, 0x60, 0x28, 0x01, 0x08, 0x08, 0x09, 0x00, 0x00,
+ 0x00, 0x80, 0x00, 0x50, 0x00, 0x44, 0x40, 0x0A, 0x00, 0x00, 0x20, 0x40,
+ 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x10, 0x00, 0x00, 0xC2, 0x40,
+ 0x00, 0x08, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0C,
+ 0x00, 0x20, 0x00, 0x01, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x06, 0x00,
+ 0x20, 0x02, 0x00, 0x20, 0x00, 0x01, 0x00, 0x40, 0x04, 0x40, 0x00, 0x02,
+ 0x08, 0x80, 0x00, 0x00, 0x01, 0x40, 0x64, 0x00, 0x00, 0x12, 0x80, 0x00,
+ 0x00, 0x02, 0x03, 0x00, 0x00, 0x44, 0x80, 0x00, 0x05, 0x00, 0x00, 0x00,
+ 0x80, 0x41, 0x04, 0x10, 0x80, 0x00, 0x00, 0x00, 0x00, 0x06, 0x10, 0x00,
+ 0x0C, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x08, 0x82, 0x00, 0x10, 0x20, 0x00, 0x00, 0x21, 0x06, 0x00,
+ 0x00, 0x20, 0x0C, 0x00, 0x00, 0x04, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x10, 0x80, 0x00, 0x10, 0x02, 0x00, 0x00, 0x20, 0x80, 0x4D, 0x4C, 0x00,
+ 0x00, 0x04, 0x20, 0x02, 0x08, 0x02, 0x00, 0x10, 0x00, 0x24, 0x01, 0x81,
+ 0x00, 0x01, 0x80, 0x08, 0x04, 0x00, 0x08, 0x00, 0x20, 0x00, 0x00, 0x05,
+ 0x00, 0x00, 0x04, 0x00, 0x00, 0x80, 0x08, 0x10, 0x40, 0x20, 0x01, 0x20,
+ 0x00, 0x00, 0x10, 0x00, 0x40, 0x80, 0x08, 0x00, 0x00, 0x10, 0x01, 0x06,
+ 0x00, 0x19, 0x00, 0x08, 0x01, 0x01, 0x00, 0x12, 0x00, 0x04, 0x00, 0x01,
+ 0x08, 0xC4, 0x80, 0x00, 0x04, 0x00, 0x20, 0x92, 0x00, 0x00, 0x10, 0x08,
+ 0x10, 0x00, 0x00, 0x46, 0x00, 0x01, 0x04, 0x20, 0x00, 0x00, 0x80, 0x00,
+ 0x10, 0x11, 0x00, 0x00, 0x01, 0x00, 0x20, 0x80, 0x00, 0x60, 0x80, 0xC0,
+ 0x00, 0x00, 0x00, 0x04, 0x02, 0x24, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x08, 0x00, 0x00, 0x20,
+ 0x00, 0x20, 0x10, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x80, 0xA0, 0x00,
+ 0x00, 0x02, 0x00, 0x00, 0x10, 0x11, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x40, 0x00, 0x00, 0x08, 0x40, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x04,
+ 0x00, 0x00, 0x00, 0x10, 0x02, 0x00, 0x28, 0x20, 0x00, 0x04, 0x40, 0x01,
+ 0x01, 0x00, 0x10, 0x80, 0x34, 0x02, 0x10, 0x05, 0x00, 0x00, 0x00, 0x08,
+ 0x04, 0x10, 0x00, 0x00, 0x00, 0x40, 0x04, 0x08, 0x08, 0x10, 0x00, 0x00,
+ 0xA0, 0x04, 0x00, 0x00, 0x80, 0x00, 0x02, 0x00, 0x00, 0x12, 0x10, 0x01,
+ 0x40, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x00,
+ 0x54, 0x02, 0x80, 0x00, 0x12, 0x00, 0x00, 0x03, 0x40, 0x40, 0x04, 0x01,
+ 0x00, 0x80, 0x08, 0x81, 0x18, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x01, 0x40, 0x62, 0x00, 0x40, 0x01, 0x04, 0x10, 0x80, 0x00, 0x10,
+ 0x10, 0x18, 0x10, 0x00, 0x08, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x41, 0x20, 0x2C, 0x00, 0x20, 0x24,
+ 0x00, 0x68, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x02, 0x08,
+ 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x08, 0x88, 0x00, 0x00, 0x80, 0x20,
+ 0xA2, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x40, 0x80,
+ 0x01, 0x04, 0x20, 0x10, 0x90, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
+ 0x80, 0x08, 0x01, 0x28, 0x20, 0x40, 0x05, 0x00, 0x00, 0x00, 0x48, 0x08,
+ 0x00, 0x10, 0x00, 0x00, 0x02, 0x04, 0x04, 0x05, 0x08, 0x00, 0x08, 0x08,
+ 0x48, 0x01, 0x20, 0x00, 0x00, 0x14, 0x00, 0x00, 0x12, 0x80, 0x00, 0x00,
+ 0x20, 0x04, 0x00, 0x00, 0x88, 0x00, 0x00, 0x10, 0x80, 0x40, 0x01, 0x00,
+ 0x02, 0x04, 0x80, 0x00, 0x20, 0x00, 0x00, 0x51, 0x00, 0x00, 0x80, 0x00,
+ 0x50, 0x00, 0x04, 0x86, 0x00, 0x00, 0x20, 0x00, 0x50, 0x02, 0x00, 0x00,
+ 0x81, 0x00, 0x10, 0x00, 0x00, 0x04, 0x80, 0x02, 0x02, 0x00, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x10, 0x00, 0x00, 0x04, 0x02, 0x38, 0x40, 0x80, 0x02,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x40, 0x00, 0x02, 0x11,
+ 0x10, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x20, 0x00, 0x10, 0x01, 0x00,
+ 0x00, 0x80, 0x00, 0x80, 0x08, 0x00, 0x00, 0x80, 0x00, 0x20, 0x00, 0x00,
+ 0x03, 0x00, 0x40, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x10, 0x00,
+ 0xA0, 0x00, 0x00, 0x04, 0x90, 0x00, 0x08, 0x11, 0x00, 0x40, 0x00, 0x10,
+ 0x04, 0x04, 0x20, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x20, 0x00, 0x00,
+ 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x09, 0x00, 0x08, 0xC8, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x10, 0x04, 0x04, 0x04, 0x00, 0x00, 0x90, 0x00, 0x00,
+ 0x05, 0x00, 0x00, 0x20, 0x02, 0x00, 0x00, 0x84, 0x10, 0x89, 0x10, 0x00,
+ 0x20, 0x0C, 0x04, 0x00, 0x03, 0x00, 0x10, 0x00, 0x80, 0x00, 0x12, 0x08,
+ 0x20, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x84, 0x00, 0x20, 0x30, 0x22,
+ 0x20, 0x02, 0x00, 0x18, 0x00, 0x41, 0x01, 0x02, 0x00, 0x00, 0x00, 0x10,
+ 0x00, 0x00, 0x28, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x14, 0x44, 0x00,
+ 0x00, 0x00, 0x40, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00,
+ 0x00, 0xC0, 0x00, 0x00, 0x28, 0x40, 0x00, 0xD4, 0x04, 0x00, 0x08, 0x00,
+ 0x60, 0x00, 0x80, 0x08, 0x40, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x01, 0x00, 0x20, 0x00,
+ 0x00, 0x20, 0x11, 0x80, 0x00, 0x88, 0x00, 0x01, 0x00, 0x02, 0x01, 0x00,
+ 0x20, 0x00, 0x00, 0x20, 0x80, 0x00, 0x02, 0x00, 0x00, 0x0C, 0x02, 0x00,
+ 0x80, 0x00, 0x08, 0x00, 0x00, 0x10, 0x10, 0xC2, 0x00, 0x80, 0x00, 0x00,
+ 0x08, 0x08, 0x40, 0x00, 0x10, 0x10, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00,
+ 0x08, 0x01, 0x04, 0x00, 0xA0, 0x00, 0xC0, 0x00, 0x08, 0x80, 0x00, 0x00,
+ 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x21,
+ 0x00, 0x40, 0x20, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x28, 0x00, 0x80,
+ 0x02, 0x00, 0x60, 0x00, 0x08, 0x00, 0x00, 0x20, 0x04, 0x00, 0x42, 0x00,
+ 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x82,
+ 0x08, 0x00, 0x80, 0x00, 0x80, 0x04, 0x20, 0x40, 0x04, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x08, 0x00, 0x01, 0x12, 0x20, 0x00, 0x10, 0x84, 0x88, 0x80,
+ 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x88, 0x00, 0x10,
+ 0x00, 0x02, 0x00, 0x0A, 0x04, 0x00, 0x48, 0x40, 0x80, 0x00, 0x80, 0x00,
+ 0x80, 0x12, 0x00, 0x00, 0x82, 0x00, 0x32, 0x00, 0x00, 0x03, 0x00, 0x41,
+ 0x00, 0x00, 0x20, 0x80, 0x40, 0x80, 0x09, 0x11, 0x20, 0x12, 0x05, 0x00,
+ 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x65,
+ 0x01, 0x00, 0x11, 0x00, 0x44, 0x00, 0x80, 0x08, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x80, 0x08, 0x02, 0x90, 0x00, 0x00, 0x04, 0x08, 0x00, 0x00,
+ 0x11, 0x00, 0x00, 0x00, 0x20, 0x00, 0x10, 0x00, 0x00, 0x04, 0x02, 0x01,
+ 0x20, 0x00, 0x00, 0x22, 0x00, 0x80, 0x81, 0x80, 0x04, 0x00, 0x04, 0x00,
+ 0x10, 0x21, 0x00, 0x40, 0x41, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x44, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x02, 0x00,
+ 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x01, 0x60, 0x02,
+ 0x0C, 0x00, 0x00, 0x00, 0x50, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00,
+ 0x80, 0x80, 0x00, 0x44, 0x00, 0x01, 0x00, 0x04, 0x00, 0x04, 0x00, 0x08,
+ 0x80, 0x14, 0x01, 0x80, 0x00, 0x02, 0x00, 0x00, 0x08, 0x02, 0x00, 0x00,
+ 0x60, 0x10, 0x02, 0x42, 0x20, 0x90, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x00, 0x81, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40,
+ 0x20, 0x00, 0x88, 0x00, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x08, 0x02,
+ 0x00, 0x08, 0x80, 0x44, 0x02, 0x01, 0x10, 0x10, 0x00, 0x60, 0x00, 0x10,
+ 0x08, 0x28, 0x00, 0x00, 0x00, 0x01, 0x02, 0x80, 0x00, 0x02, 0x04, 0x04,
+ 0x00, 0x00, 0x00, 0x02, 0x22, 0x01, 0x20, 0x40, 0x00, 0x00, 0x04, 0x12,
+ 0x88, 0x00, 0x00, 0x80, 0x80, 0x40, 0xE0, 0x80, 0x40, 0x00, 0x00, 0x10,
+ 0x00, 0x30, 0x00, 0x00, 0x00, 0xA1, 0x81, 0x00, 0x10, 0x00, 0x04, 0x04,
+ 0x00, 0x00, 0x00, 0x02, 0x04, 0x84, 0x00, 0x80, 0x00, 0x00, 0x00, 0x40,
+ 0x00, 0x00, 0x11, 0x00, 0x00, 0x04, 0x00, 0x08, 0x00, 0x20, 0x00, 0x00,
+ 0x00, 0x40, 0x00, 0x00, 0x01, 0x00, 0x02, 0x20, 0x20, 0x00, 0x02, 0x82,
+ 0x0C, 0x68, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
+ 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x09, 0x02, 0xC4, 0x00, 0x00, 0x01,
+ 0x00, 0x10, 0x04, 0x02, 0x00, 0x20, 0x10, 0x00, 0x00, 0x22, 0x00, 0x00,
+ 0x04, 0x00, 0x30, 0x40, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00,
+ 0x00, 0x00, 0x00, 0x80, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x40, 0x00, 0x10, 0x00, 0x60, 0x00, 0x18, 0x00, 0x00, 0x00, 0x20, 0x00,
+ 0x00, 0x00, 0x88, 0x10, 0x01, 0x10, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x00, 0x80, 0x85, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x90, 0x50, 0x00,
+ 0x20, 0x82, 0x80, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
+ 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x30, 0x02, 0x00, 0x20, 0x00, 0x00,
+ 0x00, 0x03, 0x51, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0x84, 0x01,
+ 0x02, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x14, 0x00, 0x60,
+ 0x40, 0x20, 0x10, 0x40, 0x00, 0x02, 0x00, 0x00, 0x04, 0x01, 0x12, 0x00,
+ 0x02, 0x04, 0x00, 0x08, 0x10, 0x00, 0x18, 0x00, 0xA0, 0x00, 0x04, 0x00,
+ 0x00, 0x40, 0x00, 0x00, 0x80, 0x00, 0x20, 0x02, 0x02, 0x00, 0x00, 0x40,
+ 0x00, 0x82, 0x40, 0x22, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x04,
+ 0x08, 0x04, 0x10, 0x00, 0x00, 0x00, 0x42, 0x40, 0x04, 0x08, 0x00, 0x00,
+ 0x08, 0x02, 0x01, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x00,
+ 0xA0, 0x40, 0x00, 0x80, 0x00, 0x04, 0x80, 0x00, 0x08, 0x08, 0x02, 0x0A,
+ 0x04, 0x04, 0x01, 0x00, 0x80, 0x20, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x0A, 0x00, 0xA0, 0x01, 0x10, 0x00, 0x00, 0x02, 0x02, 0x02, 0x08,
+ 0x00, 0x88, 0x00, 0x00, 0x51, 0x00, 0x00, 0x40, 0x20, 0x20, 0x40, 0x00,
+ 0x02, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x80, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x02, 0x90, 0x08, 0x80, 0x00, 0x80,
+ 0x08, 0x00, 0x23, 0x09, 0x00, 0x00, 0x48, 0x04, 0x05, 0x00, 0x01, 0x06,
+ 0x00, 0xA0, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x20,
+ 0x0C, 0x00, 0x10, 0x40, 0x00, 0x11, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00,
+ 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x22, 0x20, 0x00, 0x40, 0x00, 0x00,
+ 0x01, 0x80, 0x00, 0x00, 0x10, 0x00, 0x00, 0x48, 0x00, 0x40, 0x04, 0x40,
+ 0x04, 0x00, 0x00, 0x02, 0x00, 0x08, 0x09, 0x00, 0x02, 0x08, 0x00, 0x26,
+ 0x00, 0x10, 0x03, 0x00, 0x40, 0x02, 0x86, 0x00, 0x00, 0x10, 0x00, 0x81,
+ 0x20, 0x10, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x10, 0x00, 0x08, 0x10,
+ 0x02, 0x0C, 0x00, 0x20, 0x11, 0x04, 0x90, 0x02, 0x08, 0x00, 0x10, 0x42,
+ 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x80, 0x02, 0x80, 0x00, 0x42,
+ 0x80, 0x00, 0x04, 0x80, 0x00, 0x81, 0x20, 0x20, 0x80, 0x00, 0x00, 0xA0,
+ 0x08, 0x00, 0x06, 0x00, 0x01, 0x01, 0x00, 0x00, 0x02, 0x64, 0x90, 0x08,
+ 0x14, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x03,
+ 0x80, 0x04, 0x00, 0x20, 0x08, 0x40, 0x04, 0x01, 0xC8, 0x80, 0x00, 0x00,
+ 0x40, 0x00, 0x20, 0x48, 0x00, 0x02, 0x00, 0x40, 0x0C, 0x00, 0x80, 0x00,
+ 0x00, 0x14, 0x42, 0x00, 0x00, 0x08, 0x04, 0x01, 0x00, 0x20, 0x00, 0x01,
+ 0x06, 0x02, 0x05, 0x00, 0x04, 0xA9, 0x00, 0x00, 0x04, 0x02, 0x00, 0x20,
+ 0x04, 0x80, 0x80, 0x14, 0x00, 0x08, 0x02, 0x01, 0x00, 0x01, 0x20, 0x48,
+ 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00, 0x02, 0x08,
+ 0x2A, 0x80, 0x00, 0x00, 0x10, 0x10, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x24, 0x00, 0x80, 0x04, 0x20, 0x00, 0x10, 0x08, 0x30, 0x00, 0x10,
+ 0x05, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x00, 0x00, 0x80, 0x08, 0x04,
+ 0x00, 0x08, 0x00, 0x20, 0x02, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x20, 0xC0, 0x80, 0x08, 0x00, 0x80, 0x00, 0x20, 0x80, 0x00,
+ 0x00, 0x02, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80,
+ 0x40, 0x00, 0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x82, 0x40, 0x00,
+ 0x00, 0x00, 0x40, 0x10, 0x20, 0x00, 0x42, 0x20, 0x00, 0x00, 0xC0, 0x04,
+ 0x00, 0x00, 0x10, 0x80, 0x50, 0x20, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x10,
+ 0x00, 0x00, 0x04, 0x02, 0x00, 0x40, 0x00, 0x02, 0x40, 0x00, 0x00, 0x08,
+ 0x00, 0x06, 0x40, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x20,
+ 0x00, 0x80, 0x00, 0x0E, 0x00, 0x10, 0x41, 0x02, 0x0A, 0x00, 0x00, 0x00,
+ 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0x00, 0x20, 0x09, 0x00,
+ 0x20, 0x09, 0x00, 0x00, 0x00, 0x20, 0x22, 0x02, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x40, 0x00, 0x10, 0x04, 0x00, 0x80, 0x00, 0x00, 0x40, 0x00, 0x10,
+ 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x04, 0x40, 0x00, 0x18, 0x01, 0x10,
+ 0xA0, 0x00, 0x00, 0x00, 0x10, 0xC0, 0x60, 0x00, 0x40, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x22, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x10, 0x00, 0xC0, 0x04,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x01, 0x00, 0x00, 0x40, 0x03,
+ 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0x00, 0x20, 0x00, 0x00, 0x00, 0x80,
+ 0x00, 0x10, 0x00, 0x20, 0x00, 0x00, 0x40, 0x40, 0x01, 0x00, 0x24, 0x14,
+ 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x20, 0x00, 0x80, 0x00, 0x80, 0x00,
+ 0x62, 0x10, 0x00, 0x00, 0x40, 0x40, 0x80, 0x08, 0x00, 0x80, 0x10, 0x00,
+ 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x60,
+ 0x00, 0x02, 0x04, 0x08, 0x00, 0x04, 0x00, 0x10, 0x20, 0x12, 0x08, 0x00,
+ 0x00, 0x10, 0x00, 0x14, 0x02, 0x00, 0x01, 0x00, 0x40, 0x02, 0x00, 0x24,
+ 0x40, 0x00, 0x00, 0x01, 0x10, 0x00, 0x00, 0x40, 0x00, 0x02, 0x00, 0x08,
+ 0x10, 0x11, 0x08, 0x00, 0x00, 0x22, 0x04, 0x44, 0x00, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x03, 0x80, 0x00, 0x20, 0x80, 0x00, 0x00, 0xD4, 0x00, 0x00,
+ 0x00, 0x20, 0x40, 0x00, 0x04, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x20, 0x20, 0x00, 0x02, 0x00, 0x80, 0x00, 0x00, 0x00, 0x44, 0x02, 0x48,
+ 0x01, 0x02, 0x60, 0x00, 0x08, 0x02, 0x00, 0x00, 0x02, 0x80, 0x80, 0x04,
+ 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00,
+ 0x08, 0x44, 0x80, 0x00, 0x08, 0x30, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x82, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x04, 0x00, 0x80, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x22, 0x00, 0x82, 0x08, 0x02, 0x01, 0x08,
+ 0x10, 0x00, 0x80, 0x00, 0x20, 0x00, 0x40, 0x00, 0x05, 0x00, 0x00, 0x04,
+ 0x00, 0x02, 0x00, 0x04, 0x10, 0x80, 0x84, 0x00, 0x00, 0x00, 0x01, 0x02,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x20,
+ 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
+ 0x04, 0x80, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00,
+ 0x40, 0x00, 0x00, 0x08, 0x00, 0x88, 0x40, 0x04, 0x02, 0x84, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x04, 0x00, 0x80, 0x08, 0x00, 0x00,
+ 0x00, 0x02, 0x08, 0x00, 0x00, 0x24, 0x00, 0x00, 0xA4, 0x00, 0x10, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x00,
+ 0x01, 0x00, 0x10, 0x01, 0x00, 0x01, 0x80, 0x04, 0x14, 0x00, 0x16, 0x20,
+ 0x20, 0x08, 0x00, 0x80, 0x00, 0x00, 0x04, 0x10, 0x40, 0x00, 0x00, 0x00,
+ 0x00, 0x08, 0x02, 0x08, 0x00, 0x01, 0x20, 0x02, 0x00, 0x00, 0x02, 0x00,
+ 0x22, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10,
+ 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x02, 0x00, 0x08,
+ 0x00, 0x00, 0x11, 0x04, 0x02, 0x10, 0x01, 0x00, 0x00, 0x10, 0x00, 0x02,
+ 0x81, 0x28, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00,
+ 0x42, 0x20, 0x20, 0x00, 0x20, 0x80, 0x00, 0x84, 0x00, 0x00, 0x18, 0x00,
+ 0x00, 0x08, 0x00, 0x80, 0x00, 0x00, 0x40, 0x20, 0x00, 0x08, 0x00, 0x00,
+ 0x05, 0x40, 0x00, 0x00, 0x04, 0x10, 0x20, 0x14, 0x00, 0x10, 0x00, 0x00,
+ 0x00, 0x00, 0x40, 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x61, 0x00, 0x20, 0x80, 0x00, 0x00, 0x0A, 0x04, 0x04, 0x00, 0x00,
+ 0x00, 0x01, 0x13, 0x00, 0x04, 0xA6, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
+ 0x08, 0x02, 0x80, 0x40, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x06, 0x00,
+ 0x40, 0x12, 0x08, 0x00, 0x02, 0x40, 0x00, 0x01, 0x20, 0x03, 0x00, 0x00,
+ 0x00, 0x00, 0x10, 0x80, 0x80, 0x02, 0x00, 0x48, 0x20, 0x00, 0x80, 0x40,
+ 0x00, 0x00, 0x90, 0x04, 0x00, 0x40, 0x02, 0x00, 0x21, 0x00, 0x00, 0x20,
+ 0x08, 0x00, 0x02, 0x00, 0xC0, 0x00, 0xC0, 0x05, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x21, 0x02, 0x42, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x40, 0x04,
+ 0x00, 0x00, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x40,
+ 0x08, 0x20, 0x60, 0x00, 0x20, 0x00, 0x08, 0x08, 0x00, 0x01, 0x08, 0x00,
+ 0x00, 0x00, 0x00, 0x20, 0x00, 0x80, 0x01, 0x00, 0x01, 0x04, 0x04, 0x00,
+ 0x00, 0x08, 0x00, 0x00, 0x10, 0x00, 0x00, 0x80, 0x04, 0x40, 0x00, 0x08,
+ 0xD0, 0x08, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00,
+ 0x08, 0x00, 0x02, 0x21, 0x40, 0x00, 0x00, 0x00, 0x80, 0x00, 0x11, 0x80,
+ 0x01, 0x02, 0x00, 0x20, 0x00, 0x20, 0x08, 0x80, 0x08, 0x00, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
+ 0x00, 0x00, 0x40, 0x80, 0x08, 0x20, 0x00, 0x00, 0x01, 0x20, 0x06, 0x04,
+ 0x60, 0x01, 0x00, 0x42, 0x00, 0x00, 0x03, 0x00, 0x08, 0x41, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x08, 0x00, 0x24, 0x00, 0x80,
+ 0xA0, 0x10, 0x88, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x40, 0xA0, 0x02,
+ 0x00, 0x01, 0x04, 0x10, 0x24, 0x00, 0x50, 0x00, 0x88, 0x80, 0x08, 0x00,
+ 0x20, 0x00, 0x00, 0x00, 0x40, 0x50, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x44, 0x00, 0x10, 0x00, 0x04, 0x00, 0x00, 0x80, 0x00, 0x00, 0x02,
+ 0x00, 0x00, 0x02, 0x00, 0x80, 0x00, 0x00, 0x00, 0x06, 0x00, 0x80, 0x00,
+ 0x00, 0x00, 0x00, 0x24, 0x08, 0x00, 0x00, 0x00, 0xA0, 0x00, 0x00, 0x02,
+ 0x00, 0x00, 0x25, 0x08, 0x41, 0x20, 0x20, 0x00, 0x04, 0x80, 0x00, 0x00,
+ 0x00, 0x03, 0x00, 0x00, 0x02, 0x00, 0x00, 0x20, 0x20, 0x80, 0x04, 0x04,
+ 0x00, 0x80, 0x01, 0x80, 0x02, 0x00, 0x00, 0x00, 0x80, 0x10, 0x00, 0x00,
+ 0x40, 0x00, 0x80, 0x4A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x00,
+ 0x80, 0x00, 0x40, 0x80, 0x00, 0x00, 0x28, 0x80, 0x00, 0x00, 0x10, 0x09,
+ 0x02, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x40, 0x00, 0x00, 0x20, 0x00,
+ 0x00, 0x01, 0x80, 0x00, 0x00, 0x08, 0x00, 0x00, 0x58, 0x41, 0x00, 0x04,
+ 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x0A, 0x04,
+ 0x00, 0x03, 0x00, 0x01, 0x21, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00,
+ 0x09, 0x00, 0x20, 0x00, 0x00, 0x60, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+ 0x11, 0x00, 0x80, 0x01, 0x20, 0x10, 0x00, 0x80, 0x80, 0x10, 0x40, 0x10,
+ 0x20, 0x00, 0x00, 0x24, 0x06, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x80,
+ 0x00, 0x20, 0xC0, 0x04, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x08, 0x00,
+ 0x00, 0x08, 0x00, 0x00, 0x01, 0x58, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00,
+ 0x40, 0x00, 0x01, 0x00, 0x48, 0x00, 0x00, 0x18, 0x20, 0x00, 0x80, 0x00,
+ 0x00, 0x00, 0x08, 0x00, 0x20, 0x42, 0x21, 0x00, 0x40, 0x80, 0x00, 0x10,
+ 0x00, 0x94, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x08, 0x20, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x08, 0x00, 0x48, 0x01, 0x00, 0x21, 0x80, 0x01, 0x00,
+ 0x83, 0x40, 0x04, 0x00, 0x40, 0x00, 0x80, 0x00, 0x81, 0x0A, 0x01, 0x08,
+ 0x20, 0x04, 0x00, 0x08, 0x20, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x40,
+ 0x00, 0x10, 0x08, 0x80, 0x08, 0x08, 0x14, 0x02, 0x20, 0x26, 0x22, 0x20,
+ 0x00, 0x00, 0x01, 0x00, 0x80, 0x00, 0x01, 0xC4, 0x00, 0x80, 0x40, 0x00,
+ 0x00, 0x00, 0x08, 0x00, 0x20, 0x00, 0x00, 0x04, 0x02, 0x89, 0x00, 0x00,
+ 0x00, 0x14, 0x00, 0x00, 0x08, 0x00, 0x90, 0x40, 0x00, 0x10, 0x00, 0x10,
+ 0x20, 0x00, 0x00, 0x04, 0x00, 0x80, 0x00, 0x00, 0x14, 0x00, 0x40, 0x00,
+ 0x20, 0x80, 0x00, 0x00, 0x00, 0x08, 0x04, 0x10, 0x00, 0x10, 0x00, 0x00,
+ 0x01, 0x00, 0x08, 0x44, 0x00, 0x00, 0x11, 0x00, 0x02, 0x02, 0x02, 0x40,
+ 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x10, 0x0A, 0x20, 0x60, 0x00,
+ 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x02, 0x00,
+ 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x81, 0x68, 0x20,
+ 0x01, 0x20, 0x00, 0x84, 0x10, 0x08, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x19, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x10, 0x60, 0x60,
+ 0x00, 0x00, 0x80, 0x00, 0x10, 0x50, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00,
+ 0x01, 0x20, 0x10, 0x80, 0x41, 0x10, 0x00, 0x40, 0x00, 0xC2, 0x10, 0x04,
+ 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x80, 0x00, 0x20, 0x00, 0x00, 0x02, 0x00, 0x80, 0x40, 0x00, 0x18,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
+ 0x20, 0x00, 0x02, 0x40, 0x80, 0x08, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x01, 0x20, 0x12, 0x04,
+ 0x00, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x08, 0x40, 0x00, 0x40,
+ 0x04, 0x00, 0x10, 0x00, 0x11, 0x00, 0x30, 0x11, 0x00, 0x00, 0x00, 0x04,
+ 0x50, 0x00, 0x10, 0x00, 0x00, 0x18, 0x00, 0x00, 0x44, 0x00, 0x00, 0x10,
+ 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x40, 0x00, 0x00, 0x12, 0x81, 0x00, 0x01, 0x00, 0x80, 0x04,
+ 0x00, 0x0A, 0x00, 0x00, 0x02, 0x44, 0x00, 0x18, 0x00, 0x22, 0x21, 0x00,
+ 0x00, 0x00, 0x04, 0x04, 0x80, 0x02, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00,
+ 0x80, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, 0x22, 0x00, 0x22, 0x40, 0x00,
+ 0x01, 0x84, 0x00, 0x10, 0x00, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
+ 0x04, 0x00, 0x80, 0x00, 0x00, 0x10, 0x00, 0x22, 0x00, 0x00, 0x08, 0x00,
+ 0x10, 0x08, 0x02, 0x02, 0x00, 0x04, 0x80, 0x10, 0x00, 0x02, 0x00, 0x00,
+ 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
+ 0x01, 0x48, 0x22, 0x00, 0x00, 0x40, 0x00, 0x12, 0x00, 0x00, 0x20, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x20, 0x20, 0x10, 0x00,
+ 0x00, 0x40, 0x00, 0x08, 0x00, 0x00, 0x02, 0x01, 0x60, 0x08, 0x00, 0x00,
+ 0x00, 0x08, 0x12, 0x00, 0x00, 0x26, 0x00, 0x09, 0x04, 0x00, 0x04, 0x00,
+ 0x80, 0x12, 0x00, 0x0C, 0x02, 0x01, 0x23, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x01, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x80, 0x01,
+ 0x80, 0x08, 0x00, 0x80, 0x05, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0x20,
+ 0x00, 0x00, 0x40, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00,
+ 0x40, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x30, 0x00, 0x02, 0x04, 0x20,
+ 0x08, 0x00, 0x21, 0x00, 0x00, 0x00, 0x10, 0x00, 0x42, 0x00, 0x50, 0x80,
+ 0x00, 0x00, 0x40, 0x08, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x20,
+ 0x08, 0x00, 0x14, 0x00, 0x08, 0x00, 0x80, 0x04, 0x00, 0x00, 0x10, 0x00,
+ 0x48, 0x10, 0x21, 0x00, 0x00, 0x04, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x08, 0x40, 0x60, 0x00, 0x08, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00,
+ 0x08, 0x62, 0x08, 0x00, 0x40, 0x31, 0x08, 0x00, 0x01, 0x80, 0x21, 0x00,
+ 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x06, 0x00,
+ 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x20, 0x06, 0x00, 0x00, 0x08,
+ 0x20, 0x90, 0x00, 0x00, 0x12, 0x20, 0x00, 0x60, 0x20, 0x00, 0x00, 0x08,
+ 0x00, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x40,
+ 0x06, 0x20, 0x00, 0x40, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x40, 0x08, 0x20, 0x00,
+ 0x00, 0x40, 0x00, 0x08, 0x00, 0x10, 0x80, 0x00, 0x00, 0x12, 0x00, 0x44,
+ 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x0A,
+ 0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x24, 0x00, 0x02, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
+ 0x08, 0x00, 0x00, 0x01, 0x40, 0x04, 0x20, 0x0C, 0x80, 0x00, 0x10, 0x01,
+ 0x02, 0x00, 0x08, 0x20, 0x00, 0x20, 0x00, 0x00, 0x88, 0x00, 0x10, 0x02,
+ 0x00, 0x08, 0x02, 0x20, 0x00, 0x00, 0x4A, 0x08, 0x50, 0x00, 0x00, 0x10,
+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x80, 0x00,
+ 0x30, 0x80, 0x80, 0x48, 0x91, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x64,
+ 0x40, 0x00, 0x02, 0x00, 0xA8, 0x10, 0x01, 0x00, 0x40, 0x06, 0x00, 0x44,
+ 0x08, 0x02, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x20, 0x00, 0x00, 0x00,
+ 0x00, 0x8C, 0x10, 0x01, 0x00, 0x00, 0x00, 0x18, 0x40, 0x10, 0x00, 0x01,
+ 0x00, 0x00, 0x80, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x80, 0x00, 0x04,
+ 0x01, 0x11, 0x00, 0x00, 0x01, 0x00, 0x00, 0x10, 0x80, 0x00, 0x00, 0x10,
+ 0x00, 0x00, 0x6B, 0x00, 0x08, 0x09, 0x00, 0x00, 0x00, 0x00, 0x08, 0x02,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x01, 0x08, 0x00, 0x10,
+ 0x00, 0x00, 0x08, 0x00, 0x00, 0x20, 0x80, 0x00, 0x00, 0x40, 0x00, 0x40,
+ 0x00, 0x10, 0x08, 0x01, 0x02, 0x02, 0x04, 0x04, 0x00, 0x00, 0x60, 0x05,
+ 0x00, 0x10, 0x00, 0x01, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40,
+ 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x80, 0x01, 0x08, 0x20,
+ 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00, 0x10,
+ 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x08, 0x00, 0x02, 0x00, 0x01, 0x00,
+ 0x00, 0x80, 0x00, 0x40, 0x00, 0x80, 0x60, 0x00, 0x40, 0x04, 0x20, 0x00,
+ 0x00, 0x08, 0x00, 0x00, 0x04, 0x00, 0x01, 0x04, 0x00, 0x10, 0x02, 0x80,
+ 0x28, 0x00, 0x01, 0x10, 0x21, 0x02, 0x08, 0x00, 0xA0, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x20, 0x00, 0x20, 0x00, 0x04, 0x82, 0x00, 0x22, 0x00, 0x00,
+ 0x00, 0x00, 0xC1, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00,
+ 0x10, 0x40, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00,
+ 0x40, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00,
+ 0x00, 0x08, 0x00, 0x12, 0x00, 0x00, 0x00, 0x10, 0x02, 0x48, 0x06, 0x08,
+ 0x00, 0x00, 0x04, 0x00, 0x88, 0x22, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
+ 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0xC0, 0x00,
+ 0x08, 0x40, 0x00, 0x02, 0x01, 0x04, 0x02, 0x80, 0x00, 0x00, 0x09, 0x00,
+ 0x00, 0x20, 0x10, 0x00, 0x00, 0x12, 0x00, 0x20, 0x00, 0x00, 0x00, 0x02,
+ 0x30, 0x40, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x20, 0x00, 0x00,
+ 0x00, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x10, 0x20, 0x00, 0x81, 0x00,
+ 0x84, 0x04, 0x00, 0x00, 0x00, 0x48, 0x00, 0x01, 0x00, 0x01, 0x00, 0xC0,
+ 0x8C, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x44, 0x02, 0x12, 0x00, 0x88,
+ 0x08, 0x00, 0x00, 0x40, 0x31, 0x00, 0x40, 0x00, 0x12, 0x80, 0x00, 0x20,
+ 0x00, 0x90, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x00, 0x08,
+ 0x25, 0x00, 0x08, 0x0A, 0x00, 0x00, 0x00, 0x20, 0x14, 0x00, 0x04, 0x00,
+ 0x10, 0x01, 0x40, 0x00, 0x0C, 0x80, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08,
+ 0x01, 0x02, 0x00, 0x01, 0x40, 0x01, 0x81, 0x10, 0x10, 0x00, 0x00, 0x00,
+ 0x00, 0x08, 0x00, 0x42, 0x02, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x05, 0x80, 0x28, 0x80, 0x81, 0x00, 0x01, 0x10, 0x00, 0x74, 0x01, 0x00,
+ 0x08, 0x00, 0x50, 0x08, 0x02, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x0A,
+ 0x10, 0x00, 0x02, 0x00, 0x40, 0x20, 0x20, 0x41, 0x80, 0x00, 0x00, 0x80,
+ 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x04,
+ 0x01, 0x00, 0x00, 0x00, 0x10, 0x80, 0x00, 0x08, 0x08, 0x40, 0x10, 0x20,
+ 0x20, 0x20, 0x04, 0x08, 0x00, 0x04, 0x10, 0x04, 0x20, 0x00, 0x02, 0x00,
+ 0x04, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x02, 0x01, 0x48, 0x00, 0x00,
+ 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x04,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x02, 0x02, 0x05, 0x00, 0x04,
+ 0x00, 0x08, 0x22, 0x00, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
+ 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x02, 0x22, 0x00,
+ 0x00, 0x40, 0x40, 0x00, 0x44, 0x88, 0x00, 0x01, 0x00, 0x03, 0x12, 0x00,
+ 0x10, 0x16, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x11, 0x21, 0x24, 0x10, 0x80, 0x00,
+ 0x20, 0x18, 0x10, 0x00, 0x00, 0x00, 0x08, 0x00, 0x88, 0x01, 0x20, 0x0C,
+ 0x00, 0x81, 0x00, 0x10, 0x04, 0x00, 0x00, 0x41, 0x80, 0x80, 0x08, 0x80,
+ 0x14, 0x02, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
+ 0xA0, 0x04, 0x00, 0x00, 0x00, 0x00, 0x48, 0x10, 0x01, 0x40, 0x00, 0x00,
+ 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x01, 0xA0, 0x00,
+ 0x00, 0x80, 0x00, 0x04, 0x80, 0x40, 0x02, 0x20, 0x40, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x01, 0x10, 0x10, 0x00, 0x42, 0x00, 0x00,
+ 0x00, 0x00, 0x80, 0x00, 0x00, 0x88, 0x00, 0x00, 0x40, 0x40, 0x08, 0x10,
+ 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x10, 0x01, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x44, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x02, 0x02,
+ 0x03, 0x04, 0x00, 0x00, 0x88, 0x08, 0x01, 0x0C, 0x00, 0x00, 0x24, 0x04,
+ 0x02, 0x02, 0x00, 0x00, 0x09, 0x00, 0x42, 0x00, 0x20, 0x05, 0x04, 0x00,
+ 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x08, 0x80,
+ 0x20, 0x00, 0x10, 0x00, 0x10, 0x20, 0x40, 0x00, 0x88, 0x08, 0x00, 0x00,
+ 0x00, 0x44, 0x00, 0x10, 0x00, 0x00, 0x00, 0x08, 0x00, 0x10, 0x00, 0x10,
+ 0x01, 0x20, 0x00, 0x02, 0x00, 0x40, 0x00, 0x00, 0x10, 0x00, 0x08, 0x21,
+ 0x00, 0x10, 0x00, 0x00, 0x02, 0x00, 0x04, 0x10, 0x00, 0x00, 0x00, 0x08,
+ 0x00, 0x00, 0x08, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x40,
+ 0x04, 0x00, 0x40, 0x00, 0x00, 0x00, 0x20, 0x00, 0x10, 0x00, 0x00, 0x16,
+ 0x41, 0x00, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x40, 0x04, 0x00, 0x00,
+ 0x88, 0x00, 0x00, 0x20, 0x00, 0x60, 0x00, 0x20, 0x00, 0x88, 0x80, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x20, 0x10, 0x04, 0x00, 0x70, 0x00, 0x10,
+ 0x00, 0x00, 0x20, 0x04, 0x40, 0x04, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0xC1,
+ 0x08, 0x02, 0x00, 0x00, 0x00, 0x12, 0x10, 0x00, 0x00, 0x10, 0x26, 0x04,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x88, 0x04, 0x22, 0x00,
+ 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x04, 0xC0, 0x08,
+ 0x10, 0x00, 0x00, 0x20, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x08, 0x00, 0x80,
+ 0x01, 0x0C, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00,
+ 0x20, 0x20, 0x00, 0x04, 0x00, 0x00, 0x81, 0x00, 0x00, 0x88, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0A,
+ 0x01, 0x04, 0x00, 0x04, 0x80, 0x22, 0x00, 0x00, 0x00, 0x93, 0x00, 0x00,
+ 0x00, 0x48, 0xC4, 0x02, 0x00, 0x00, 0x00, 0x03, 0x10, 0x00, 0x00, 0x90,
+ 0x00, 0x00, 0x01, 0x00, 0x10, 0x00, 0x00, 0x81, 0x00, 0x00, 0x02, 0x40,
+ 0x00, 0x10, 0x40, 0x00, 0x01, 0x61, 0x00, 0x00, 0x10, 0x04, 0x00, 0x08,
+ 0x01, 0x00, 0x04, 0x00, 0x09, 0x02, 0x00, 0x14, 0x00, 0x04, 0x80, 0x00,
+ 0x50, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x10, 0x00, 0x20, 0x00,
+ 0x20, 0x00, 0x02, 0x20, 0x08, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x10, 0x81,
+ 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x08, 0x20, 0x04, 0x00, 0x10, 0x00,
+ 0x82, 0x80, 0x00, 0x00, 0x0A, 0x01, 0x20, 0x00, 0x01, 0x00, 0x00, 0x40,
+ 0x04, 0x00, 0x00, 0x00, 0x0C, 0x10, 0x00, 0x00, 0x00, 0x02, 0x44, 0x00,
+ 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x02, 0x44, 0x22, 0x01, 0x00, 0x00,
+ 0x81, 0x80, 0x10, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x08, 0x02, 0x01,
+ 0x20, 0x00, 0x80, 0x04, 0x02, 0x05, 0x08, 0x00, 0x80, 0x10, 0x40, 0x02,
+ 0x00, 0x00, 0x24, 0x00, 0x04, 0x04, 0x10, 0x00, 0x80, 0x00, 0x00, 0x12,
+ 0x01, 0x02, 0x20, 0x04, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x40, 0x00,
+ 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x08, 0x00, 0x00,
+ 0x00, 0x08, 0x00, 0x00, 0x90, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x10, 0x19, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x44, 0x04,
+ 0x09, 0x00, 0x20, 0x00, 0x41, 0x20, 0x00, 0x00, 0x08, 0x00, 0x00, 0x80,
+ 0x40, 0x00, 0x28, 0x00, 0x00, 0x0A, 0x00, 0x20, 0x10, 0x00, 0x01, 0x00,
+ 0x20, 0x20, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08, 0x08, 0x21, 0x00, 0x20,
+ 0x20, 0x20, 0x00, 0x08, 0x40, 0x00, 0x00, 0x00, 0x02, 0x80, 0x10, 0x00,
+ 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x01, 0x00, 0x02, 0x01, 0x20, 0x01,
+ 0x00, 0x00, 0x10, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x08,
+ 0x0A, 0x02, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0xA0, 0x20,
+ 0x01, 0x21, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
+ 0x09, 0x10, 0x08, 0x21, 0x00, 0x80, 0xC0, 0x00, 0x12, 0x10, 0x40, 0x05,
+ 0x00, 0x40, 0x20, 0x80, 0x04, 0x80, 0x00, 0x00, 0x80, 0x01, 0x10, 0x01,
+ 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x04, 0x02, 0x00, 0x20,
+ 0x00, 0x08, 0x00, 0x02, 0x10, 0x00, 0x18, 0x20, 0x00, 0x04, 0x00, 0x02,
+ 0x80, 0x00, 0x00, 0x00, 0x20, 0x00, 0x20, 0x20, 0x00, 0x00, 0x02, 0x04,
+ 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00,
+ 0x08, 0x20, 0x10, 0x10, 0x11, 0x02, 0x00, 0x00, 0x04, 0x00, 0x10, 0x18,
+ 0x10, 0x00, 0x08, 0x00, 0x00, 0x00, 0x40, 0x08, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x10, 0x04, 0x80, 0x08, 0x00, 0x10, 0x00, 0x00, 0x0A, 0x00, 0x00,
+ 0x00, 0x02, 0x24, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0x80, 0x20,
+ 0x94, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x24, 0x00,
+ 0x04, 0x00, 0x84, 0x00, 0x00, 0x01, 0x00, 0x02, 0x20, 0x10, 0x01, 0x00,
+ 0x00, 0x00, 0x80, 0x10, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x80, 0x00, 0x20,
+ 0x00, 0x00, 0x10, 0x01, 0xA2, 0x00, 0xC0, 0x04, 0x04, 0x00, 0x00, 0x08,
+ 0x01, 0x00, 0x20, 0x08, 0x20, 0x02, 0x00, 0x04, 0x83, 0x00, 0x81, 0x02,
+ 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x50,
+ 0x00, 0x40, 0x00, 0x08, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04,
+ 0x00, 0x40, 0x04, 0x12, 0x01, 0x80, 0x08, 0x00, 0x00, 0x00, 0x00, 0x80,
+ 0x00, 0x00, 0x00, 0x11, 0x80, 0x00, 0x81, 0x00, 0x00, 0x10, 0x02, 0x00,
+ 0x00, 0x02, 0x00, 0x20, 0x00, 0x00, 0x02, 0x04, 0x80, 0x00, 0x00, 0x90,
+ 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x40, 0x00, 0x02, 0x00,
+ 0x00, 0x10, 0x42, 0x40, 0x00, 0x02, 0x40, 0x00, 0x04, 0x00, 0x00, 0x04,
+ 0x01, 0x02, 0x00, 0x10, 0x08, 0x08, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00,
+ 0x28, 0x00, 0x00, 0x00, 0x00, 0x08, 0x01, 0x00, 0x21, 0x20, 0x88, 0x00,
+ 0x04, 0x80, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x80, 0x00, 0x00, 0x88,
+ 0x80, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x04, 0x00, 0x02, 0x00, 0x08,
+ 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x04, 0x00, 0x10,
+ 0x10, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x02, 0x80, 0x00, 0x08, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0xC0, 0x40, 0x00, 0x80, 0x00, 0x00, 0x02,
+ 0x90, 0x30, 0x20, 0x10, 0x10, 0x08, 0x14, 0x00, 0x00, 0x00, 0x00, 0x40,
+ 0x00, 0x00, 0x14, 0x08, 0x00, 0x00, 0x00, 0x18, 0x01, 0x80, 0x01, 0x00,
+ 0x02, 0x00, 0x00, 0x28, 0x00, 0x08, 0x04, 0x01, 0x08, 0x00, 0x00, 0x00,
+ 0x00, 0x08, 0x02, 0x00, 0x20, 0x00, 0x00, 0x08, 0x44, 0x00, 0x00, 0x00,
+ 0x20, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x08, 0x00, 0x00,
+ 0x00, 0x80, 0x02, 0x00, 0x08, 0x40, 0x00, 0x01, 0x40, 0x04, 0x00, 0x01,
+ 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x15,
+ 0x00, 0x04, 0x02, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x2A, 0x20, 0x00,
+ 0x00, 0x24, 0x08, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00,
+ 0x00, 0x40, 0x00, 0x00, 0x80, 0x00, 0x0A, 0x00, 0xC0, 0x20, 0x00, 0x10,
+ 0x08, 0x44, 0x04, 0x08, 0x30, 0x00, 0x00, 0xB4, 0x00, 0x40, 0x00, 0x08,
+ 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x40, 0xC0, 0x00, 0x02,
+ 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x20, 0x01, 0x01, 0x44, 0x04, 0x00, 0x80, 0x00, 0x22, 0x88, 0x00, 0x00,
+ 0x00, 0x00, 0x02, 0x00, 0x02, 0x04, 0x8C, 0x00, 0x00, 0x00, 0x20, 0x00,
+ 0x04, 0x00, 0x10, 0x01, 0x00, 0x01, 0x01, 0x00, 0x10, 0x00, 0x05, 0x04,
+ 0x20, 0x10, 0x80, 0x42, 0x08, 0x40, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x00,
+ 0x00, 0x02, 0x10, 0x50, 0x00, 0x20, 0x00, 0x20, 0x00, 0x08, 0x68, 0x00,
+ 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
+ 0x00, 0x02, 0x90, 0x04, 0x00, 0x88, 0x04, 0x00, 0x20, 0x10, 0x08, 0x01,
+ 0x00, 0x01, 0x00, 0x02, 0x00, 0x40, 0x10, 0x08, 0x00, 0x00, 0x00, 0x00,
+ 0x40, 0x00, 0x00, 0x00, 0x00, 0x22, 0x00, 0x20, 0x00, 0x00, 0x02, 0x06,
+ 0x00, 0x00, 0x04, 0x20, 0x00, 0x81, 0x20, 0x00, 0x88, 0x00, 0x02, 0x00,
+ 0x00, 0x00, 0x00, 0x08, 0x24, 0x04, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00,
+ 0x50, 0x80, 0x08, 0x40, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00,
+ 0x08, 0x00, 0x04, 0x10, 0x01, 0x00, 0x00, 0x00, 0x04, 0x10, 0x82, 0x00,
+ 0x04, 0x00, 0x40, 0x40, 0x04, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x20, 0x00,
+ 0x00, 0x01, 0x00, 0x10, 0x40, 0x84, 0x04, 0x80, 0x00, 0x20, 0x01, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x04,
+ 0x00, 0x04, 0x00, 0x4C, 0x00, 0x00, 0x10, 0x00, 0x00, 0x02, 0x22, 0x12,
+ 0x00, 0x00, 0x10, 0x00, 0x10, 0x10, 0x00, 0x02, 0x04, 0x02, 0x40, 0x00,
+ 0x00, 0x02, 0x01, 0x08, 0x20, 0x00, 0x00, 0x00, 0x44, 0x41, 0x80, 0x00,
+ 0x00, 0x21, 0x00, 0x00, 0x30, 0x04, 0x00, 0x00, 0x00, 0x06, 0x02, 0x00,
+ 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x02,
+ 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01,
+ 0x01, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x80, 0x00, 0x00, 0x06, 0x04,
+ 0x04, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x88,
+ 0x00, 0x80, 0x00, 0x08, 0x10, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
+ 0x20, 0x08, 0x10, 0x00, 0x00, 0x10, 0x08, 0x00, 0x01, 0x80, 0x04, 0x00,
+ 0x10, 0x45, 0x20, 0x20, 0x42, 0x00, 0x00, 0x06, 0x08, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x04, 0x00, 0x80, 0x00,
+ 0x00, 0x04, 0x00, 0x00, 0x02, 0x40, 0x0C, 0x01, 0x00, 0x01, 0x11, 0x00,
+ 0x02, 0x40, 0x1E, 0x04, 0x00, 0x04, 0x00, 0x05, 0x00, 0x01, 0x80, 0x00,
+ 0x04, 0x00, 0x00, 0xC4, 0x02, 0x00, 0x02, 0x00, 0x20, 0x08, 0x04, 0x00,
+ 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x10, 0x04, 0x20, 0x00, 0x00,
+ 0x00, 0x80, 0x01, 0x12, 0x20, 0x80, 0x40, 0x00, 0x00, 0x04, 0x20, 0x00,
+ 0x01, 0x10, 0x04, 0x80, 0x01, 0x40, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x42, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x02,
+ 0x00, 0x20, 0x40, 0x00, 0x01, 0x00, 0x14, 0x00, 0x40, 0x00, 0x00, 0x43,
+ 0x00, 0x00, 0x00, 0x00, 0x20, 0x04, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x02,
+ 0x01, 0x20, 0x08, 0x00, 0x04, 0x00, 0x00, 0x10, 0x00, 0x04, 0x08, 0x00,
+ 0x00, 0x0A, 0x10, 0x08, 0x00, 0x49, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
+ 0x00, 0x04, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x81, 0x00,
+ 0x00, 0x00, 0x20, 0x01, 0x02, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x10,
+ 0x20, 0x24, 0x00, 0x00, 0x04, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x04, 0x40, 0x00, 0x08, 0x80, 0x80, 0x01, 0xC0, 0x20, 0x01, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x40, 0x20, 0x10, 0x00, 0x20, 0x10,
+ 0x01, 0x00, 0x04, 0x10, 0x00, 0x02, 0x10, 0x10, 0x00, 0x10, 0x00, 0x00,
+ 0x08, 0x00, 0x08, 0x00, 0x10, 0x10, 0x00, 0x06, 0x10, 0x81, 0x20, 0x00,
+ 0x00, 0x00, 0x10, 0x80, 0x20, 0x02, 0x00, 0x06, 0x00, 0x22, 0x10, 0x00,
+ 0x00, 0x00, 0x10, 0x00, 0x04, 0x00, 0x08, 0x00, 0x02, 0x00, 0x00, 0x00,
+ 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x00, 0x42, 0x00, 0x4C, 0x08, 0x00, 0x00, 0x01, 0x00, 0x82, 0x00, 0x00,
+ 0x10, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x24, 0x08,
+ 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x21, 0x04, 0x80, 0x00, 0x00,
+ 0x00, 0x00, 0x80, 0x20, 0x00, 0x20, 0x20, 0x04, 0x08, 0x01, 0x00, 0x04,
+ 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x40, 0x00, 0x10, 0x00, 0x00, 0x80, 0x02, 0x01, 0x00, 0x00, 0x80,
+ 0x00, 0x00, 0xA0, 0x00, 0x00, 0x10, 0x00, 0x29, 0x00, 0x00, 0x88, 0x04,
+ 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x03, 0x10, 0x10, 0x00, 0x00, 0x08,
+ 0x00, 0x04, 0x18, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x01, 0x20, 0x02, 0x24, 0x02, 0x08, 0x00, 0x00, 0x10,
+ 0x00, 0xC0, 0x00, 0x00, 0x90, 0x00, 0x20, 0x00, 0x84, 0x08, 0x00, 0x01,
+ 0x02, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x01, 0x00,
+ 0x90, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x20, 0x22, 0x80,
+ 0x00, 0x00, 0x00, 0x04, 0x40, 0x01, 0x08, 0x10, 0x20, 0x12, 0x00, 0x00,
+ 0x00, 0x02, 0x00, 0x60, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x00,
+ 0x00, 0x00, 0x10, 0x02, 0x01, 0x01, 0x09, 0x00, 0x20, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x02, 0x00, 0x44, 0x00, 0x10, 0x05, 0x08, 0xA4, 0x08, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x89, 0x80, 0x00, 0x80, 0x00, 0x20,
+ 0x00, 0x02, 0x00, 0x00, 0x50, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80,
+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x68, 0x00,
+ 0x00, 0x04, 0x04, 0x00, 0x02, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00,
+ 0x00, 0x40, 0x08, 0x00, 0x10, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x80, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
+ 0x01, 0x08, 0x00, 0x00, 0x80, 0x04, 0x02, 0x14, 0x04, 0x00, 0x01, 0x10,
+ 0x00, 0x01, 0x00, 0x00, 0x04, 0x80, 0x00, 0xC0, 0x00, 0x08, 0x08, 0x20,
+ 0x00, 0x20, 0x22, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x10, 0x00,
+ 0x01, 0x00, 0x04, 0x00, 0x04, 0x83, 0x80, 0x04, 0x20, 0x00, 0x00, 0x00,
+ 0x00, 0x04, 0x00, 0x80, 0x08, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x14,
+ 0x80, 0x00, 0x20, 0x01, 0x00, 0x00, 0x21, 0x00, 0x00, 0x80, 0x08, 0x80,
+ 0x08, 0x00, 0x00, 0x10, 0x00, 0x00, 0x48, 0x40, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x03, 0x08, 0x00, 0x80, 0x01,
+ 0x40, 0x00, 0x10, 0x00, 0x04, 0x10, 0x00, 0x00, 0x01, 0x01, 0x00, 0x20,
+ 0x00, 0x00, 0x20, 0x12, 0x00, 0x00, 0x40, 0x00, 0x40, 0x08, 0x00, 0x82,
+ 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x02,
+ 0x20, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
+ 0x00, 0x04, 0x01, 0x08, 0x00, 0x00, 0x12, 0x10, 0x00, 0x00, 0x00, 0x00,
+ 0x20, 0x00, 0x00, 0x05, 0x01, 0x00, 0x20, 0x04, 0x00, 0x08, 0x40, 0x00,
+ 0x00, 0x48, 0x00, 0x00, 0x41, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x08, 0x04, 0x02, 0x0C, 0x00, 0x02, 0x82, 0x08, 0x00, 0x00, 0x41,
+ 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x04,
+ 0x40, 0x80, 0x00, 0x88, 0x01, 0x00, 0x11, 0x20, 0x00, 0x00, 0x00, 0x00,
+ 0x40, 0x00, 0x04, 0x80, 0x04, 0x00, 0x02, 0x04, 0x00, 0x00, 0x01, 0x00,
+ 0x20, 0x01, 0x80, 0x44, 0x10, 0x01, 0x0A, 0x00, 0x00, 0x04, 0x00, 0x00,
+ 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x82, 0x00, 0x04, 0x00, 0x00, 0x00,
+ 0x24, 0x00, 0x09, 0x22, 0x00, 0x00, 0x00, 0x08, 0x22, 0x00, 0x00, 0x03,
+ 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0xA0,
+ 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x08, 0x02, 0x00, 0x00, 0x04,
+ 0x00, 0x90, 0x00, 0x00, 0x18, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x20,
+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x82, 0x00,
+ 0x10, 0x01, 0x00, 0x08, 0x20, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
+ 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x80, 0x08, 0x20, 0x00, 0x80,
+ 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x25, 0x00, 0x20, 0x01,
+ 0x03, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x20, 0x00, 0x30,
+ 0x08, 0x02, 0x28, 0x08, 0x00, 0x01, 0x00, 0x20, 0x00, 0x80, 0x00, 0x00,
+ 0x10, 0x10, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x10,
+ 0x40, 0x80, 0x01, 0x08, 0x90, 0x00, 0x00, 0x40, 0x00, 0x42, 0x00, 0x84,
+ 0x00, 0x10, 0x00, 0x00, 0x00, 0x20, 0x08, 0x00, 0x20, 0x00, 0x00, 0x11,
+ 0x80, 0x00, 0x04, 0x80, 0x02, 0x00, 0x10, 0x00, 0x40, 0x00, 0x00, 0x00,
+ 0x08, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x80, 0x00,
+ 0x20, 0x05, 0x00, 0x00, 0x00, 0x80, 0x00, 0x08, 0x40, 0x20, 0x10, 0x08,
+ 0x00, 0x00, 0x20, 0x00, 0x28, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x08, 0x02, 0x00, 0x00, 0x20, 0x00, 0xC0, 0x08, 0x00, 0x20,
+ 0x00, 0x40, 0x00, 0x08, 0x00, 0x20, 0x90, 0x12, 0x00, 0x80, 0x00, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x04, 0x00, 0x00, 0x00, 0x98,
+ 0x10, 0x44, 0x20, 0x00, 0x84, 0x40, 0x00, 0x00, 0x00, 0x10, 0x00, 0xC0,
+ 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+ 0x02, 0x42, 0x00, 0x00, 0x13, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10,
+ 0x00, 0x00, 0x00, 0x00, 0x40, 0x04, 0x00, 0x01, 0x00, 0x00, 0x80, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x02, 0x00, 0x00,
+ 0x05, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x04, 0x48,
+ 0x30, 0x01, 0x00, 0x00, 0x00, 0x80, 0x41, 0x00, 0x00, 0x04, 0x00, 0x00,
+ 0x00, 0x08, 0x00, 0x00, 0xE4, 0x00, 0x00, 0x02, 0x80, 0x00, 0x01, 0x00,
+ 0x02, 0x00, 0x81, 0x40, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x40, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x04, 0x80, 0x08, 0x00, 0x00, 0x00, 0x40, 0x00, 0x81, 0x40, 0x00,
+ 0x40, 0x01, 0x00, 0x68, 0x00, 0x00, 0x20, 0x00, 0x00, 0x04, 0x00, 0x00,
+ 0x08, 0x00, 0x03, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x08, 0x00,
+ 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x06,
+ 0x00, 0x10, 0x20, 0x00, 0x88, 0x40, 0x42, 0x00, 0x00, 0x00, 0x00, 0x10,
+ 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x01, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00,
+ 0x20, 0x40, 0x00, 0x00, 0x80, 0x08, 0x10, 0x00, 0x21, 0x20, 0x10, 0x40,
+ 0xA0, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80,
+ 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x10, 0x00, 0x20, 0x00, 0x04, 0x00,
+ 0x00, 0x00, 0x00, 0x11, 0x00, 0xC0, 0x00, 0x00, 0x18, 0x80, 0x00, 0x00,
+ 0x00, 0xA0, 0x01, 0x00, 0x02, 0x00, 0x00, 0x18, 0x00, 0x00, 0x02, 0x00,
+ 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x40, 0x0C, 0x04, 0x00, 0x00, 0x00,
+ 0x11, 0x85, 0x40, 0x00, 0x08, 0x00, 0x02, 0x00, 0x10, 0x00, 0x00, 0x01,
+ 0x02, 0x22, 0x00, 0x04, 0x40, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x02, 0x12, 0x00, 0x00, 0x08, 0x00, 0x0C, 0x01, 0x20, 0x40, 0x00, 0x00,
+ 0x80, 0x00, 0x0C, 0x01, 0x20, 0x02, 0x00, 0x00, 0x00, 0x22, 0x14, 0x40,
+ 0x80, 0x80, 0x18, 0x08, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x00,
+ 0x04, 0x00, 0x40, 0x00, 0x04, 0x41, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x80, 0x0C, 0x00, 0x40,
+ 0x01, 0x00, 0x40, 0x00, 0x04, 0x92, 0x01, 0x00, 0x00, 0x01, 0x80, 0x00,
+ 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00,
+ 0x09, 0x04, 0x08, 0x00, 0x00, 0x04, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x10, 0x00, 0x22, 0x20, 0x00, 0x20, 0x00, 0x80, 0x20, 0x01,
+ 0x09, 0x80, 0x00, 0x00, 0x05, 0x00, 0x32, 0x00, 0x88, 0x00, 0x00, 0x08,
+ 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x40, 0x00, 0x90, 0x08, 0x04, 0x10,
+ 0x00, 0x20, 0x02, 0x60, 0xC1, 0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x88,
+ 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00,
+ 0x00, 0x40, 0x04, 0x00, 0x00, 0x40, 0x01, 0x10, 0x00, 0x04, 0x00, 0x00,
+ 0x00, 0x80, 0x00, 0x88, 0x40, 0x04, 0x00, 0x20, 0x00, 0x80, 0x00, 0x00,
+ 0x00, 0x02, 0x08, 0x10, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00,
+ 0x00, 0x80, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x08, 0x00, 0x09, 0x00,
+ 0x00, 0x00, 0x80, 0x00, 0x02, 0x08, 0x08, 0x00, 0x00, 0x00, 0x05, 0x00,
+ 0x20, 0x01, 0x22, 0x00, 0x00, 0x00, 0x20, 0x00, 0x40, 0x00, 0x20, 0x00,
+ 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x21, 0x24, 0x02,
+ 0x80, 0x00, 0x08, 0x04, 0x00, 0x10, 0x08, 0x10, 0x02, 0x00, 0x00, 0x80,
+ 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x80, 0x10, 0x00,
+ 0x24, 0x81, 0x00, 0x01, 0x00, 0x00, 0x08, 0x00, 0x40, 0x40, 0x00, 0x10,
+ 0x01, 0x01, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x06, 0x90, 0x09,
+ 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, 0x08, 0x10,
+ 0x02, 0x22, 0x20, 0x00, 0x00, 0x80, 0x00, 0x00, 0x88, 0x0E, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x40, 0x02, 0x40, 0x40, 0x10, 0x00, 0x01, 0x40, 0x00,
+ 0x04, 0x00, 0x00, 0x08, 0x00, 0x11, 0x00, 0x00, 0x40, 0x00, 0x05, 0x04,
+ 0x60, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x02,
+ 0x80, 0x00, 0x02, 0x80, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x20, 0x00, 0x80, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00,
+ 0x20, 0x00, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+ 0x01, 0x02, 0x00, 0x00, 0x00, 0x04, 0x08, 0x0C, 0x00, 0x00, 0x02, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x06,
+ 0x00, 0x40, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x02, 0x0A, 0x00, 0x00, 0x02, 0x80, 0x40, 0x40, 0x00, 0x00, 0x00, 0x88,
+ 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x80, 0x00, 0x40, 0x10, 0x00,
+ 0x10, 0x01, 0x00, 0x04, 0x00, 0x08, 0x01, 0x00, 0x04, 0x00, 0x88, 0x00,
+ 0x00, 0x0C, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
+ 0x00, 0x84, 0x00, 0x40, 0x00, 0x11, 0x04, 0x01, 0x00, 0x00, 0x00, 0x02,
+ 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C,
+ 0x02, 0x12, 0x00, 0x04, 0x00, 0x40, 0x09, 0x00, 0x00, 0x40, 0x04, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x40, 0x08, 0x00, 0x04, 0x00, 0x00,
+ 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x02, 0x00, 0x05, 0x01,
+ 0x20, 0x80, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x02,
+ 0x00, 0x40, 0x20, 0x00, 0x40, 0x00, 0x00, 0x40, 0x00, 0x02, 0x40, 0x00,
+ 0x00, 0x09, 0x00, 0x00, 0x03, 0x81, 0x02, 0x02, 0x40, 0x00, 0x04, 0x08,
+ 0x08, 0x08, 0x00, 0x00, 0x90, 0x30, 0xA0, 0x00, 0x00, 0x00, 0x01, 0x00,
+ 0x80, 0x00, 0x00, 0x04, 0x20, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00,
+ 0x01, 0x40, 0x20, 0x00, 0x30, 0x04, 0x00, 0x88, 0x00, 0x8C, 0x80, 0x00,
+ 0x49, 0x10, 0x20, 0x01, 0x20, 0x00, 0x01, 0x08, 0x00, 0x01, 0x40, 0x00,
+ 0x83, 0x18, 0x00, 0x02, 0x00, 0x80, 0x08, 0x00, 0x10, 0x00, 0x00, 0x80,
+ 0x04, 0x04, 0x00, 0x40, 0x20, 0x08, 0x08, 0x10, 0x00, 0x00, 0x80, 0x20,
+ 0x00, 0x00, 0x08, 0x00, 0x01, 0x01, 0x28, 0x00, 0x80, 0x0C, 0x00, 0x10,
+ 0x80, 0x04, 0x00, 0x00, 0x00, 0x10, 0x20, 0x00, 0x00, 0x00, 0x00, 0x40,
+ 0x00, 0x00, 0x00, 0x00, 0x20, 0x28, 0x00, 0x02, 0x00, 0x00, 0x20, 0x00,
+ 0x00, 0x00, 0x04, 0x20, 0x40, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x01, 0x03, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x68, 0x20,
+ 0x02, 0x08, 0x00, 0x40, 0x00, 0x00, 0x00, 0x80, 0x00, 0x01, 0x00, 0x20,
+ 0x0A, 0x40, 0x40, 0x84, 0x00, 0x00, 0x08, 0x00, 0x10, 0x11, 0x00, 0x00,
+ 0x02, 0x00, 0x00, 0x08, 0x01, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00,
+ 0x00, 0x00, 0x01, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x40,
+ 0x00, 0x00, 0x00, 0x20, 0x10, 0x00, 0x20, 0x04, 0x18, 0x00, 0x44, 0x00,
+ 0x00, 0x01, 0x20, 0x00, 0x20, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00, 0x90,
+ 0x00, 0x00, 0x00, 0x00, 0x20, 0x02, 0x84, 0x00, 0x14, 0x00, 0x80, 0x01,
+ 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x20, 0x00, 0x21,
+ 0x24, 0x20, 0x80, 0x08, 0x00, 0x00, 0x08, 0x00, 0x02, 0x00, 0x88, 0x00,
+ 0x00, 0x00, 0x00, 0x08, 0x80, 0x00, 0x20, 0x02, 0x00, 0x00, 0x04, 0x01,
+ 0x00, 0x44, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x84,
+ 0x04, 0x01, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x00, 0x20,
+ 0x00, 0xA0, 0x10, 0x00, 0xD2, 0x40, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x24, 0x40, 0x40, 0x00, 0x00, 0x08, 0x10, 0x40, 0x00,
+ 0x01, 0x00, 0x00, 0x04, 0x01, 0x00, 0x80, 0x80, 0x00, 0x05, 0x00, 0x02,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00,
+ 0x00, 0x01, 0x0C, 0x04, 0x00, 0x00, 0x40, 0x11, 0x00, 0x00, 0x00, 0x80,
+ 0x00, 0x08, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x82, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x80, 0x00,
+ 0x00, 0x08, 0x02, 0x01, 0x20, 0x00, 0x40, 0x00, 0x08, 0x00, 0x00, 0x10,
+ 0x40, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x80, 0x84, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x00, 0x20, 0x00, 0x08, 0x01, 0x02, 0x00, 0x00,
+ 0x50, 0x80, 0x80, 0x80, 0x00, 0x00, 0x08, 0x00, 0x08, 0x20, 0x00, 0x08,
+ 0x00, 0x00, 0x08, 0x00, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x80, 0x40,
+ 0x04, 0x00, 0x00, 0x00, 0x00, 0x40, 0x03, 0x40, 0x00, 0x00, 0x08, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x00, 0x08, 0x00, 0x04, 0x28, 0x40, 0x00, 0x0A, 0x01, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x06, 0x88, 0x04, 0x00, 0x80, 0x01, 0x40, 0x00, 0x10,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x02, 0x00,
+ 0x10, 0x10, 0x00, 0x00, 0x11, 0x18, 0x00, 0x01, 0x00, 0x20, 0x20, 0x00,
+ 0x00, 0x08, 0x04, 0x00, 0x40, 0x00, 0x00, 0x08, 0x00, 0x26, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x10, 0x02, 0x00, 0x40, 0x00, 0x01, 0x04, 0x84, 0x00,
+ 0x10, 0x48, 0x00, 0x10, 0x10, 0x20, 0x20, 0x00, 0x00, 0x80, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x81, 0x04, 0x20,
+ 0x12, 0x21, 0x04, 0x04, 0x01, 0x80, 0x40, 0x08, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x20, 0x04, 0x00, 0x00, 0x01, 0x00, 0x01, 0x20, 0x04, 0x00,
+ 0x20, 0x12, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x02,
+ 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x08, 0x40, 0x10, 0x00, 0x08,
+ 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x04, 0x22, 0x12, 0x00, 0x40, 0x10,
+ 0x00, 0x04, 0x01, 0x00, 0x00, 0x22, 0x20, 0x00, 0x00, 0x10, 0x00, 0x40,
+ 0x02, 0x00, 0x00, 0x02, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x10, 0x00,
+ 0x20, 0x00, 0x02, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x80, 0x04, 0x10, 0x10, 0x46,
+ 0x80, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, 0x44, 0x60, 0x42,
+ 0x81, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00,
+ 0x10, 0x10, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x04, 0x04, 0x10,
+ 0x88, 0x10, 0x10, 0x00, 0x00, 0x64, 0x10, 0x80, 0x00, 0x20, 0x82, 0x10,
+ 0x00, 0x00, 0x90, 0x00, 0x02, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01,
+ 0x00, 0x40, 0x00, 0x00, 0x80, 0x48, 0x40, 0x01, 0x00, 0x00, 0x00, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x02, 0x08, 0x04,
+ 0x00, 0x00, 0x04, 0xA0, 0x00, 0x01, 0x10, 0x00, 0x08, 0x08, 0x20, 0x04,
+ 0x40, 0x00, 0x24, 0x00, 0x20, 0x10, 0x80, 0x08, 0x00, 0x40, 0x02, 0x00,
+ 0x00, 0x80, 0x41, 0x00, 0x00, 0x00, 0x00, 0x04, 0xC0, 0x00, 0x00, 0x30,
+ 0x00, 0x08, 0x02, 0x00, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x08, 0x80,
+ 0x02, 0x00, 0x02, 0x00, 0x04, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x02,
+ 0x80, 0x08, 0x02, 0x20, 0x80, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x04, 0x01, 0x41, 0x00,
+ 0x40, 0x10, 0x40, 0x80, 0x08, 0x09, 0x02, 0x00, 0x00, 0x00, 0x60, 0x40,
+ 0x40, 0x00, 0x08, 0x00, 0x01, 0x00, 0x02, 0x0C, 0x00, 0x10, 0x10, 0x08,
+ 0x04, 0x10, 0x00, 0x00, 0x01, 0x00, 0x00, 0x40, 0x02, 0x04, 0x08, 0x11,
+ 0x10, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x40, 0x00, 0x80, 0x09,
+ 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
+ 0x00, 0x21, 0x04, 0x00, 0x00, 0xC0, 0x00, 0x12, 0x01, 0x14, 0x00, 0x09,
+ 0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
+ 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x84, 0x02, 0x00, 0x20, 0x02, 0x00, 0x02, 0x00,
+ 0x08, 0x08, 0x00, 0x22, 0x00, 0x01, 0x01, 0x00, 0x84, 0x00, 0x00, 0x0A,
+ 0x80, 0x01, 0x04, 0x00, 0x80, 0x00, 0x00, 0x04, 0x00, 0x02, 0x00, 0x00,
+ 0x10, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x08, 0x01, 0x80, 0x04, 0x00,
+ 0x82, 0x40, 0x00, 0x00, 0x00, 0x08, 0x00, 0x12, 0x00, 0x40, 0x10, 0x00,
+ 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x20, 0x02, 0x00, 0x20, 0x00, 0x00, 0x20, 0x00, 0x00,
+ 0x88, 0x80, 0x00, 0x01, 0x00, 0x22, 0x02, 0x00, 0x22, 0x02, 0x00, 0x08,
+ 0x04, 0x00, 0x00, 0x04, 0x00, 0x08, 0x00, 0x20, 0x00, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
+ 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00,
+ 0x00, 0x80, 0x00, 0x40, 0x01, 0x00, 0x40, 0x02, 0x01, 0x00, 0x20, 0x40,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x20, 0x00, 0x01, 0x00,
+ 0x20, 0x00, 0x00, 0x04, 0x00, 0x80, 0x00, 0x00, 0x02, 0x04, 0x40, 0x20,
+ 0x00, 0xA0, 0x81, 0x00, 0x00, 0x20, 0x10, 0x02, 0x00, 0x12, 0x00, 0x00,
+ 0x00, 0x00, 0x40, 0x20, 0x00, 0x80, 0x00, 0x40, 0x96, 0x00, 0x00, 0x02,
+ 0x00, 0x61, 0x07, 0x00, 0x40, 0x20, 0x00, 0x00, 0x00, 0x04, 0x02, 0x40,
+ 0x04, 0x01, 0x01, 0x00, 0x02, 0x00, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00,
+ 0x02, 0x83, 0x20, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x01,
+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x01, 0x20, 0x00, 0x10, 0x0A, 0x20,
+ 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x80, 0x10, 0x00, 0x03, 0x00, 0x41, 0x02, 0x00, 0x08, 0x00,
+ 0x00, 0x00, 0x00, 0x50, 0x02, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
+ 0x90, 0x80, 0x00, 0x82, 0x44, 0x40, 0x00, 0x08, 0x00, 0x20, 0x00, 0x00,
+ 0x00, 0x02, 0x30, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00, 0x08, 0x20, 0x20,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x80, 0x00, 0x40, 0x00, 0x01,
+ 0x00, 0x00, 0x08, 0x0C, 0x08, 0x80, 0x00, 0x08, 0x04, 0x00, 0x00, 0x20,
+ 0x10, 0x00, 0xC4, 0x00, 0x00, 0x08, 0x01, 0x01, 0x00, 0x01, 0x00, 0x20,
+ 0x40, 0x08, 0x00, 0x00, 0x09, 0x00, 0x10, 0x04, 0x00, 0x02, 0x04, 0x00,
+ 0x00, 0x08, 0x10, 0x0A, 0x00, 0x19, 0x00, 0x00, 0x22, 0x00, 0xA0, 0x00,
+ 0x10, 0x41, 0x00, 0x00, 0x00, 0x20, 0x00, 0x14, 0x80, 0x20, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x20, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x51, 0x00,
+ 0x02, 0x50, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00,
+ 0x04, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x02, 0x00, 0x80, 0x00,
+ 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x14, 0x80, 0x00,
+ 0x80, 0x08, 0x10, 0x24, 0x00, 0x42, 0x00, 0x00, 0x42, 0x00, 0x20, 0x00,
+ 0x00, 0x04, 0x00, 0x80, 0x01, 0x04, 0x02, 0x00, 0x00, 0x18, 0x00, 0x01,
+ 0x02, 0x00, 0x08, 0x20, 0x04, 0x00, 0x00, 0x00, 0x80, 0x00, 0x20, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x06, 0x00, 0x40, 0x08, 0x00, 0x00, 0x01, 0x10, 0x00, 0x00, 0x41, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x0A,
+ 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x10, 0x00, 0xA0, 0x40, 0x04,
+ 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x22, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x40, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x01,
+ 0x0A, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x08, 0x15, 0x00, 0x00, 0x04,
+ 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,
+ 0x40, 0x00, 0x12, 0x04, 0x00, 0x18, 0x00, 0x00, 0x20, 0x00, 0xA4, 0x00,
+ 0x00, 0x12, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x04,
+ 0x00, 0x00, 0x02, 0x10, 0x20, 0x02, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00,
+ 0x00, 0x00, 0x00, 0x01, 0x20, 0x00, 0x08, 0x00, 0x01, 0x00, 0x40, 0x00,
+ 0x00, 0x44, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00, 0x00, 0x40, 0x10, 0x00,
+ 0x40, 0x11, 0x00, 0x00, 0x00, 0x08, 0x40, 0x00, 0x88, 0x00, 0x11, 0x00,
+ 0x22, 0x00, 0x40, 0x00, 0x00, 0x00, 0x20, 0x00, 0x80, 0x00, 0x01, 0x88,
+ 0x08, 0x02, 0x02, 0x41, 0x00, 0xB0, 0x00, 0x00, 0x00, 0x02, 0xA0, 0x00,
+ 0xC0, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x00,
+ 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x10, 0x00, 0x20, 0x04, 0x00, 0x20, 0x01, 0x00, 0x30,
+ 0x00, 0xA0, 0x02, 0x00, 0x00, 0x42, 0x00, 0x01, 0x40, 0x08, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x40, 0x0A, 0x00, 0x10, 0x04,
+ 0x00, 0x00, 0x04, 0x02, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x04, 0x00, 0x00, 0x80, 0x40, 0x20, 0x00, 0x40, 0x10, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x04, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40,
+ 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0A, 0x60, 0x50, 0x02, 0x00,
+ 0x80, 0x00, 0x10, 0x01, 0x00, 0x80, 0x02, 0x00, 0x40, 0x08, 0x00, 0x00,
+ 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x08,
+ 0x00, 0x00, 0x00, 0x08, 0x00, 0x10, 0x41, 0x00, 0x04, 0x00, 0x00, 0x02,
+ 0x01, 0x40, 0x00, 0x02, 0x40, 0x0C, 0x80, 0x00, 0x00, 0x00, 0x02, 0x00,
+ 0x00, 0x20, 0x08, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x80, 0x00, 0x40,
+ 0x00, 0x05, 0x00, 0x20, 0x00, 0x40, 0x01, 0x20, 0x00, 0x00, 0x00, 0x80,
+ 0x80, 0x44, 0x09, 0x01, 0x00, 0x21, 0xA0, 0x00, 0x04, 0x00, 0x02, 0x00,
+ 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x80, 0x01, 0x08, 0x89,
+ 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x04, 0x00, 0xA0, 0x10, 0x10,
+ 0x04, 0x00, 0x00, 0x08, 0x44, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x20, 0x00, 0x02, 0x0C, 0x00, 0x00, 0x01, 0x00, 0x40, 0x00, 0x40,
+ 0x00, 0x00, 0x20, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x44, 0x00,
+ 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x04, 0x11, 0x08, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0x40, 0x01, 0x00,
+ 0x20, 0x00, 0x80, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x08, 0x00, 0x00,
+ 0x10, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x44, 0x00, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x08, 0x04, 0x20, 0x29, 0x40, 0x00, 0x10, 0x80, 0x00, 0x00,
+ 0x01, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x13, 0x09, 0x00, 0x20, 0x00,
+ 0x00, 0x02, 0x00, 0x00, 0x40, 0x04, 0x89, 0x00, 0x00, 0x10, 0x02, 0x02,
+ 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x40,
+ 0x00, 0x04, 0x20, 0x88, 0x40, 0x04, 0x30, 0x00, 0x00, 0x00, 0x04, 0x00,
+ 0x00, 0x90, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x20, 0x00, 0x00, 0x0C,
+ 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00,
+ 0x10, 0x02, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x48, 0x00,
+ 0x80, 0x00, 0x00, 0x00, 0x04, 0x00, 0x10, 0x02, 0x00, 0x40, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x08, 0x00,
+ 0x00, 0x00, 0x00, 0x20, 0x80, 0x00, 0x32, 0x10, 0xC0, 0x00, 0x00, 0x40,
+ 0x00, 0x20, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x02, 0x82, 0x00, 0x44,
+ 0x00, 0x82, 0x40, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x02, 0x38, 0x20, 0x04, 0x40, 0x80, 0x40, 0x00, 0x00,
+ 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x80, 0x00,
+ 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00,
+ 0x0C, 0x00, 0x88, 0x00, 0x00, 0x00, 0x80, 0x20, 0x01, 0x10, 0x00, 0x02,
+ 0x42, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x08, 0x00, 0x88, 0x00, 0x04, 0x10, 0x00, 0x00, 0x40, 0x20, 0x00, 0x00,
+ 0x04, 0x00, 0x00, 0x00, 0x02, 0x02, 0x01, 0x00, 0x01, 0x04, 0x00, 0x00,
+ 0x10, 0x00, 0x10, 0x00, 0x40, 0x00, 0x22, 0x01, 0x00, 0x00, 0x00, 0x00,
+ 0x10, 0x20, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00,
+ 0x00, 0x80, 0x00, 0x44, 0x80, 0x00, 0x80, 0x00, 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00,
+ 0x00, 0x40, 0x04, 0x00, 0x00, 0x08, 0x40, 0x20, 0x58, 0x08, 0x00, 0x10,
+ 0x00, 0x08, 0x20, 0x00, 0x00, 0x20, 0x10, 0x00, 0x00, 0x06, 0x00, 0x80,
+ 0x08, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x20, 0x02, 0x00, 0x20, 0x00,
+ 0x00, 0x29, 0x00, 0x00, 0x14, 0x00, 0x04, 0x9C, 0x00, 0x80, 0x00, 0x00,
+ 0x00, 0x00, 0x02, 0x04, 0x02, 0x03, 0x81, 0x08, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x04, 0x20, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
+ 0x08, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01
+};
+#define MediumTwinPrimes_Length (sizeof(MediumTwinPrimes) / sizeof(CByte))
+
+/* n values for medium twin prime block sets */
+static const CUInt32 MediumTwinPrimes_N[3][8] =
+{
+ { 41, 47, 59, 71, 77, 89, 101, 107 },
+ { 119, 131, 137, 149, 161, 167, 179, 191 },
+ { 197, 209, 221, 227, 239, 251, 257, 269 }
+};
+
+/* mask values for medium twin prime blocks */
+static const CByte MediumTwinPrimes_Masks[] =
+{
+ 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80
+};
+
+static CUInt32
+CUtils_BinarySearchNextPrime(const CUInt32 *primes,
+ CUInt32 length,
+ CUInt32 num)
+{
+ /* set the left to the default */
+ CUInt32 left = 0;
+
+ /* set the right to the default */
+ CUInt32 right = (length - 1);
+
+ /* binary search for prime */
+ while(left <= right)
+ {
+ /* calculate the middle */
+ CUInt32 middle = ((left + right) >> 1);
+
+ /* get the current prime */
+ CUInt32 curr = primes[middle];
+
+ /* handle trivial case */
+ if(num == curr) { return curr; }
+
+ /* halve search space */
+ if(num > primes[middle])
+ {
+ left = (middle + 1);
+ }
+ else
+ {
+ right = (middle - 1);
+ }
+ }
+
+ /* return the prime */
+ return primes[right];
+}
+
+CINTERNAL CUInt32
+CUtils_NextTwinPrime(CUInt32 num)
+{
+ /* get small twin prime, as needed */
+ if(num <= SmallTwinPrimes[SmallTwinPrimes_Length - 1])
+ {
+ return
+ CUtils_BinarySearchNextPrime
+ (SmallTwinPrimes, SmallTwinPrimes_Length, num);
+ }
+
+ /* bail out now if the number is too large */
+ if(num > LargeTwinPrimes[LargeTwinPrimes_Length - 1]) { return 0; }
+
+ /* try to get medium twin prime, as needed */
+ if(num < LargeTwinPrimes[0])
+ {
+ /* declarations */
+ const CByte *set;
+ CUInt32 i, j, k, x;
+ CByte block;
+
+ /* initialize the block set position */
+ i = ((num - 30) / 240) * 3;
+
+ /* initialize the offset */
+ x = (i * 80);
+
+ /* try to find a suitable medium twin prime */
+ while(i < MediumTwinPrimes_Length)
+ {
+ /* get the current block set pointer */
+ set = (MediumTwinPrimes + i);
+
+ /* search for the prime in the current block set */
+ for(k = 0; k < 3; ++k)
+ {
+ /* get the current block */
+ block = set[k];
+
+ /* search for a suitable prime in the current
block */
+ for(j = 0; j < 8; ++j)
+ {
+ /* test the current prime */
+ if(block & MediumTwinPrimes_Masks[j])
+ {
+ if(num < (x +
MediumTwinPrimes_N[k][j]))
+ {
+ return (x +
MediumTwinPrimes_N[k][j]);
+ }
+ }
+ }
+ }
+
+ /* update the block set position and offset */
+ i += 3;
+ x += 240;
+ }
+ }
+
+ /* get large twin prime */
+ return
+ CUtils_BinarySearchNextPrime
+ (LargeTwinPrimes, LargeTwinPrimes_Length, num);
+}
+#endif
+/******************************************************************************/
+
+
+
+/******************************************************************************/
+#define CUTILS_MISC
+#ifdef CUTILS_MISC
CINTERNAL CBool
CUtils_UseGray(CSmoothingMode smoothing,
- CPixelOffsetMode pixelOffset)
+ CPixelOffsetMode pixelOffset)
{
switch(smoothing)
{
@@ -1975,6 +4181,15 @@
}
}
+CINTERNAL CBool
+CUtils_IsLittleEndian(void)
+{
+ CUInt32 x = 1;
+ return ((*((CByte *)&x)) == 1);
+}
+#endif
+/******************************************************************************/
+
#ifdef __cplusplus
};
Index: libCrayons/src/CX11Surface.c
diff -u libCrayons/src/CX11Surface.c:1.3 libCrayons/src/CX11Surface.c:1.4
--- libCrayons/src/CX11Surface.c:1.3 Mon Nov 14 13:26:17 2005
+++ libCrayons/src/CX11Surface.c Mon Mar 6 20:05:14 2006
@@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifdef HAVE_X11_XLIB_H
-
#include "CX11Surface.h"
#include "CUtils.h"
#include <X11/Xutil.h>
@@ -31,13 +29,13 @@
/* TODO: use XRender when available */
static CStatus
-CX11Surface_GetImages(CX11Surface *_this,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- XImage **imageX,
- pixman_image_t **imageP)
+CX11Surface_GetImages(CX11Surface *_this,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ XImage **imageX,
+ pixman_image_t **imageP)
{
/* declarations */
Pixmap pixmap;
@@ -119,14 +117,14 @@
}
static CStatus
-CX11Surface_Composite(CSurface *_this,
- CUInt32 x,
- CUInt32 y,
- CUInt32 width,
- CUInt32 height,
- pixman_image_t *src,
- pixman_image_t *mask,
- pixman_operator_t op)
+CX11Surface_Composite(CSurface *_this,
+ CUInt32 x,
+ CUInt32 y,
+ CUInt32 width,
+ CUInt32 height,
+ pixman_image_t *src,
+ pixman_image_t *mask,
+ pixman_operator_t op)
{
/* declarations */
CX11Surface *surface;
@@ -141,8 +139,8 @@
/* perform the composite */
{
/* declarations */
- XImage *imageX;
- pixman_image_t *imageP;
+ XImage *imageX;
+ pixman_image_t *imageP;
/* create the images */
CStatus_Check
@@ -171,7 +169,7 @@
static CStatus
CX11Surface_Clear(CSurface *_this,
- CColor color)
+ CColor color)
{
/* declarations */
CX11Surface *surface;
@@ -220,7 +218,7 @@
static CStatus
CX11Surface_Flush(CSurface *_this,
- CFlushIntention intention)
+ CFlushIntention intention)
{
/* declarations */
CX11Surface *surface;
@@ -247,6 +245,48 @@
return CStatus_OK;
}
+static CStatus
+CX11Surface_GetDpiX(CSurface *_this,
+ CFloat *dpiX)
+{
+ /* declarations */
+ CX11Surface *surface;
+
+ /* assertions */
+ CASSERT((_this != 0));
+ CASSERT((dpiX != 0));
+
+ /* get this as an x surface */
+ surface = (CX11Surface *)_this;
+
+ /* get the horizontal resolution */
+ *dpiX = surface->dpiX;
+
+ /* return successfully */
+ return CStatus_OK;
+}
+
+static CStatus
+CX11Surface_GetDpiY(CSurface *_this,
+ CFloat *dpiY)
+{
+ /* declarations */
+ CX11Surface *surface;
+
+ /* assertions */
+ CASSERT((_this != 0));
+ CASSERT((dpiY != 0));
+
+ /* get this as an x surface */
+ surface = (CX11Surface *)_this;
+
+ /* get the vertical resolution */
+ *dpiY = surface->dpiY;
+
+ /* return successfully */
+ return CStatus_OK;
+}
+
static void
CX11Surface_Finalize(CSurface *_this)
{
@@ -268,12 +308,12 @@
CStatus
CX11Surface_Create(CX11Surface **_this,
- Display *dpy,
- Drawable drawable,
- Screen *screen,
- Visual *visual,
- CUInt32 width,
- CUInt32 height)
+ Display *dpy,
+ Drawable drawable,
+ Screen *screen,
+ Visual *visual,
+ CUInt32 width,
+ CUInt32 height)
{
/* declarations */
CX11Surface *surface;
@@ -328,7 +368,27 @@
surface->visual = visual;
surface->gc = 0;
surface->drawable = drawable;
- /* surface->dpi = ; */
+
+ /* get the resolution */
+ {
+ /* declarations */
+ CDouble px;
+ CDouble mm;
+
+ /* get the pixel width and millimeter width of the screen */
+ px = XWidthOfScreen(screen);
+ mm = XWidthMMOfScreen(screen);
+
+ /* set the horizontal resolution */
+ surface->dpiX = (CFloat)((px * 25.4) / mm);
+
+ /* get the pixel height and millimeter height of the screen */
+ px = XHeightOfScreen(screen);
+ mm = XHeightMMOfScreen(screen);
+
+ /* set the vertical resolution */
+ surface->dpiY = (CFloat)((px * 25.4) / mm);
+ }
/* get the depth */
{
@@ -386,5 +446,3 @@
#ifdef __cplusplus
};
#endif
-
-#endif /* HAVE_X11_XLIB_H */
Index: libCrayons/src/Makefile.am
diff -u libCrayons/src/Makefile.am:1.2 libCrayons/src/Makefile.am:1.3
--- libCrayons/src/Makefile.am:1.2 Mon Oct 17 21:01:36 2005
+++ libCrayons/src/Makefile.am Mon Mar 6 20:05:14 2006
@@ -1,57 +1,74 @@
## Process this file with automake to produce Makefile.in
lib_LTLIBRARIES = libCrayons.la
-#libcrayonsdir = $(libdir)
-#libcrayons_LTLIBRARIES = libCrayons.la
+libCrayons_la_LDFLAGS = -version-info $(CRAYONS_LIBRARY_VERSION) -no-undefined
$(CRAYONS_LDFLAGS)
+libCrayons_la_LIBADD = $(CRAYONS_LIBS)
+libCrayons_la_CFLAGS = $(CRAYONS_CFLAGS)
-libCrayons_la_SOURCES = CMemory.c Crayons.h CrayonsInternal.h CrayonsConfig.h \
- CAffineTransform.c
CAffineTransform.h \
- CBezier.c CBezier.h \
- CBitmap.c CBitmap.h \
- CBitmapSurface.c
CBitmapSurface.h \
- CBlend.c CBlend.h \
- CBrush.c CBrush.h \
- CColorPalette.c
CColorPalette.h \
- CFiller.c CFiller.h \
- CFlattener.c
CFlattener.h \
- CFTFont.c CFTFont.h \
- CGraphics.c
CGraphics.h \
- CGraphicsPipeline.c
CGraphicsPipeline.h \
- CHatchBrush.c
CHatchBrush.h \
- CImage.c CImage.h \
- CLineBrush.c
CLineBrush.h \
- CMath.c CMath.h \
- CMatrix.c CMatrix.h \
- CMutex.c CMutex.h \
- CPathBrush.c
CPathBrush.h \
- CPath.c CPath.h \
- CPathInterpreter.c
CPathInterpreter.h \
- CPen.c CPen.h \
- CPointArray.c
CPointArray.h \
- CPolygon.c CPolygon.h
\
- CRegion.c CRegion.h \
- CRegionCloner.c
CRegionCloner.h \
- CRegionDisposer.c
CRegionDisposer.h \
- CRegionInterpreter.c
CRegionInterpreter.h \
- CRegionRasterizer.c
CRegionRasterizer.h \
- CRegionStack.c
CRegionStack.h \
- CRegionTransformer.c
CRegionTransformer.h \
- CRegionTranslator.c
CRegionTranslator.h \
- CSolidBrush.c
CSolidBrush.h \
- CStringFormat.c
CStringFormat.h \
- CStroker.c CStroker.h
\
- CSurface.c CSurface.h
\
- CTextureBrush.c
CTextureBrush.h \
- CTrapezoids.c
CTrapezoids.h \
- CUtils.c CUtils.h \
- CX11Surface.c
CX11Surface.h
+libCrayons_la_SOURCES = \
+ $(top_srcdir)/include/Crayons.h \
+ $(top_srcdir)/include/CrayonsFeatures.h \
+ $(top_srcdir)/include/CrayonsInternal.h \
+ $(top_srcdir)/include/CrayonsConfig.h \
+ $(top_srcdir)/include/CMutex.h \
+ CMemory.c \
+ CAffineTransform.c $(top_srcdir)/include/CAffineTransform.h \
+ CBezier.c $(top_srcdir)/include/CBezier.h \
+ CBitmap.c $(top_srcdir)/include/CBitmap.h \
+ CBitmapSurface.c $(top_srcdir)/include/CBitmapSurface.h \
+ CBlend.c $(top_srcdir)/include/CBlend.h \
+ CBrush.c $(top_srcdir)/include/CBrush.h \
+ CCache.c $(top_srcdir)/include/CCache.h \
+ CColorPalette.c $(top_srcdir)/include/CColorPalette.h \
+ CFiller.c $(top_srcdir)/include/CFiller.h \
+ CFlattener.c $(top_srcdir)/include/CFlattener.h \
+ CFont.c $(top_srcdir)/include/CFont.h \
+ CFontCollection.c $(top_srcdir)/include/CFontCollection.h \
+ CFontFace.c $(top_srcdir)/include/CFontFace.h \
+ CFontFamily.c $(top_srcdir)/include/CFontFamily.h \
+ CFontFamilyTable.c $(top_srcdir)/include/CFontFamilyTable.h \
+ CGlyphCache.c $(top_srcdir)/include/CGlyphCache.h \
+ CGraphics.c $(top_srcdir)/include/CGraphics.h \
+ CGraphicsPipeline.c $(top_srcdir)/include/CGraphicsPipeline.h \
+ CHashTable.c $(top_srcdir)/include/CHashTable.h \
+ CHatchBrush.c $(top_srcdir)/include/CHatchBrush.h \
+ CImage.c $(top_srcdir)/include/CImage.h \
+ CLineBrush.c $(top_srcdir)/include/CLineBrush.h \
+ CMath.c $(top_srcdir)/include/CMath.h \
+ CMatrix.c $(top_srcdir)/include/CMatrix.h \
+ CPathBrush.c $(top_srcdir)/include/CPathBrush.h \
+ CPath.c $(top_srcdir)/include/CPath.h \
+ CPathInterpreter.c $(top_srcdir)/include/CPathInterpreter.h \
+ CPen.c $(top_srcdir)/include/CPen.h \
+ CPointArray.c $(top_srcdir)/include/CPointArray.h \
+ CPolygon.c $(top_srcdir)/include/CPolygon.h \
+ CRegion.c $(top_srcdir)/include/CRegion.h \
+ CRegionCloner.c $(top_srcdir)/include/CRegionCloner.h \
+ CRegionDisposer.c $(top_srcdir)/include/CRegionDisposer.h \
+ CRegionInterpreter.c $(top_srcdir)/include/CRegionInterpreter.h \
+ CRegionRasterizer.c $(top_srcdir)/include/CRegionRasterizer.h \
+ CRegionStack.c $(top_srcdir)/include/CRegionStack.h \
+ CRegionTransformer.c $(top_srcdir)/include/CRegionTransformer.h \
+ CRegionTranslator.c $(top_srcdir)/include/CRegionTranslator.h \
+ CSolidBrush.c $(top_srcdir)/include/CSolidBrush.h \
+ CStringFormat.c $(top_srcdir)/include/CStringFormat.h \
+ CStroker.c $(top_srcdir)/include/CStroker.h \
+ CSurface.c $(top_srcdir)/include/CSurface.h \
+ CTempFileList.c $(top_srcdir)/include/CTempFileList.h \
+ CTextureBrush.c $(top_srcdir)/include/CTextureBrush.h \
+ CTrapezoids.c $(top_srcdir)/include/CTrapezoids.h \
+ CUnicodeHashTable.c $(top_srcdir)/include/CUnicodeHashTable.h \
+ CUtils.c $(top_srcdir)/include/CUtils.h
-EXTRA_libCrayons_la_SOURCES = CPThreadMutex.c CPThreadMutex.h \
- CNoThreadMutex.h
+if CRAYONS_PTHREADS_ENABLED
+libCrayons_la_SOURCES += CPThreadMutex.c $(top_srcdir)/include/CPThreadMutex.h
+else
+libCrayons_la_SOURCES += $(top_srcdir)/include/CNoThreadMutex.h
+endif
-#libSystemDrawing_la_LDFLAGS = -version-info 0:0:0 -no-undefined \
-# $(X_LIBS)
$(X_PRE_LIBS) $(X11_LIB) $(X_EXTRA_LIBS)
-
-#libSystemDrawing_la_LDADD = $(X_PRE_LIBS) $(X_LIBS) $(X_EXTRA_LIBS)
-
-AM_CFLAGS = $(X_CFLAGS)
+if CRAYONS_X11_ENABLED
+libCrayons_la_SOURCES += \
+ CX11Surface.c \
+ $(top_srcdir)/include/CX11Surface.h \
+ $(top_srcdir)/include/CrayonsSurfaceX11.h
+endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [dotgnu-pnet-commits] libCrayons ./AUTHORS ./ChangeLog ./Makefile.am ...,
Richard Baumann <=