[cairo-commit] 6 commits - CODING_STYLE doc/tutorial pixman/src
src/cairo-analysis-surface.c src/cairo-arc.c
src/cairo-array.c src/cairo-atsui-font.c
src/cairo-base85-stream.c src/cairo-beos.h src/cairo.c
src/cairo-cache.c src/cairo-clip.c src/cairo-clip-private.h
src/cairo-debug.c src/cairo-directfb.h
src/cairo-directfb-surface.c src/cairo-font.c
src/cairo-font-options.c src/cairo-font-subset.c
src/cairo-font-subset-private.h src/cairo-ft-font.c
src/cairo-glitz-surface.c src/cairo-gstate.c
src/cairo-gstate-private.h src/cairo.h src/cairo-hash.c
src/cairo-hull.c src/cairo-image-surface.c src/cairoint.h
src/cairo-lzw.c src/cairo-matrix.c src/cairo-meta-surface.c
src/cairo-operator.c src/cairo-output-stream.c
src/cairo-paginated-surface.c src/cairo-path-bounds.c
src/cairo-path.c src/cairo-path-data.c src/cairo-path-fill.c
src/cairo-path-stroke.c src/cairo-pattern.c
src/cairo-pdf-surface.c src/cairo-pdf-test.h src/cairo-pen.c
src/cairo-png.c src/cairo-polygon.c src/cairo-ps-surface.c
src/cairo-quartz.h src/cairo-quartz-surface.c
src/cairo-rectangle.c src/cairo-region.c
src/cairo-scaled-font.c src/cairo-scaled-font-subsets.c
src/cairo-scaled-font-subsets-private.h src/cairo-slope.c
src/cairo-spline.c src/cairo-stroke-style.c
src/cairo-surface.c src/cairo-surface-fallback.c
src/cairo-svg.h src/cairo-svg-surface.c src/cairo-traps.c
src/cairo-unicode.c src/cairo-wideint.c src/cairo-wideint.h
src/cairo-win32-font.c src/cairo-win32-private.h
src/cairo-win32-surface.c src/cairo-xcb-surface.c
src/cairo-xlib.h src/cairo-xlib-private.h
src/cairo-xlib-screen.c src/cairo-xlib-surface.c
src/cairo-xlib-test.h src/cairo-xlib-xrender.h
src/test-fallback-surface.c src/test-meta-surface.c
test/buffer-diff.c test/buffer-diff.h test/cairo-test.c
test/cairo-test-directfb.c test/cairo-test.h
test/caps-joins.c test/clip-all.c test/clip-nesting.c
test/clip-operator.c test/dash-offset-negative.c
test/fill-and-stroke.c test/filter-nearest-offset.c
test/font-face-get-type.c test/get-and-set.c
test/gradient-alpha.c test/imagediff.c test/linear-gradient.c
test/mask.c test/operator-clear.c test/operator-source.c
test/ps-features.c test/push-group.c test/read-png.c
test/rectangle-rounding-error.c test/rel-path.c
test/self-copy.c test/source-clip.c
test/surface-finish-twice.c test/surface-pattern.c
test/svg-clip.c test/text-cache-crash.c test/text-pattern.c
test/text-rotate.c test/transforms.c test/trap-clip.c
test/unbounded-operator.c test/user-data.c test/write-png.c
test/xlib-surface.c test/xmalloc.c
Carl Worth
cworth at kemper.freedesktop.org
Tue Jun 6 16:32:59 PDT 2006
CODING_STYLE | 20
doc/tutorial/src/include/cairo-tutorial-gtk.h | 8
doc/tutorial/src/include/cairo-tutorial-pdf.h | 4
doc/tutorial/src/include/cairo-tutorial-png.h | 4
doc/tutorial/src/include/cairo-tutorial-xlib.h | 2
doc/tutorial/src/include/cairo-tutorial.h | 1
doc/tutorial/src/lca.c | 6
pixman/src/fbcompose.c | 23 -
pixman/src/fbedge.c | 5
pixman/src/fbedgeimp.h | 8
pixman/src/fbmmx.c | 559 ++++++++++++-------------
pixman/src/fbmmx.h | 2
pixman/src/fbpict.c | 22
pixman/src/fbpict.h | 3
pixman/src/fbtrap.c | 24 -
pixman/src/icblt.c | 96 ++--
pixman/src/icbltone.c | 57 +-
pixman/src/iccolor.c | 2
pixman/src/icformat.c | 30 -
pixman/src/icimage.c | 33 -
pixman/src/icimage.h | 9
pixman/src/icint.h | 53 --
pixman/src/icpixels.c | 1
pixman/src/icrect.c | 30 -
pixman/src/icrop.h | 6
pixman/src/icstipple.c | 6
pixman/src/ictransform.c | 5
pixman/src/ictrap.c | 12
pixman/src/ictri.c | 31 -
pixman/src/icutil.c | 3
pixman/src/pixman-xserver-compat.h | 3
pixman/src/pixman.h | 18
pixman/src/pixregion.c | 74 +--
pixman/src/pixregionint.h | 9
pixman/src/renderedge.c | 13
pixman/src/slim_internal.h | 4
src/cairo-analysis-surface.c | 4
src/cairo-arc.c | 6
src/cairo-array.c | 33 -
src/cairo-atsui-font.c | 48 --
src/cairo-base85-stream.c | 5
src/cairo-beos.h | 1
src/cairo-cache.c | 32 -
src/cairo-clip-private.h | 2
src/cairo-clip.c | 34 -
src/cairo-debug.c | 3
src/cairo-directfb-surface.c | 79 +--
src/cairo-directfb.h | 13
src/cairo-font-options.c | 60 +-
src/cairo-font-subset-private.h | 1
src/cairo-font-subset.c | 14
src/cairo-font.c | 42 -
src/cairo-ft-font.c | 253 +++++------
src/cairo-glitz-surface.c | 1
src/cairo-gstate-private.h | 2
src/cairo-gstate.c | 126 ++---
src/cairo-hash.c | 54 +-
src/cairo-hull.c | 2
src/cairo-image-surface.c | 60 +-
src/cairo-lzw.c | 2
src/cairo-matrix.c | 139 +++---
src/cairo-meta-surface.c | 20
src/cairo-operator.c | 8
src/cairo-output-stream.c | 18
src/cairo-paginated-surface.c | 8
src/cairo-path-bounds.c | 8
src/cairo-path-data.c | 14
src/cairo-path-fill.c | 3
src/cairo-path-stroke.c | 22
src/cairo-path.c | 3
src/cairo-pattern.c | 110 ++--
src/cairo-pdf-surface.c | 4
src/cairo-pdf-test.h | 1
src/cairo-pen.c | 18
src/cairo-png.c | 35 -
src/cairo-polygon.c | 2
src/cairo-ps-surface.c | 61 +-
src/cairo-quartz-surface.c | 23 -
src/cairo-quartz.h | 1
src/cairo-rectangle.c | 2
src/cairo-region.c | 9
src/cairo-scaled-font-subsets-private.h | 12
src/cairo-scaled-font-subsets.c | 5
src/cairo-scaled-font.c | 163 +++----
src/cairo-slope.c | 6
src/cairo-spline.c | 3
src/cairo-stroke-style.c | 1
src/cairo-surface-fallback.c | 100 ++--
src/cairo-surface.c | 122 ++---
src/cairo-svg-surface.c | 249 +++++------
src/cairo-svg.h | 2
src/cairo-traps.c | 47 +-
src/cairo-unicode.c | 39 -
src/cairo-wideint.c | 18
src/cairo-wideint.h | 2
src/cairo-win32-font.c | 153 +++---
src/cairo-win32-private.h | 6
src/cairo-win32-surface.c | 130 ++---
src/cairo-xcb-surface.c | 61 +-
src/cairo-xlib-private.h | 4
src/cairo-xlib-screen.c | 32 -
src/cairo-xlib-surface.c | 211 ++++-----
src/cairo-xlib-test.h | 1
src/cairo-xlib-xrender.h | 1
src/cairo-xlib.h | 1
src/cairo.c | 205 ++++-----
src/cairo.h | 31 -
src/cairoint.h | 100 ++--
src/test-fallback-surface.c | 4
src/test-meta-surface.c | 2
test/buffer-diff.c | 3
test/buffer-diff.h | 4
test/cairo-test-directfb.c | 20
test/cairo-test.c | 58 +-
test/cairo-test.h | 4
test/caps-joins.c | 2
test/clip-all.c | 2
test/clip-nesting.c | 4
test/clip-operator.c | 14
test/dash-offset-negative.c | 8
test/fill-and-stroke.c | 2
test/filter-nearest-offset.c | 2
test/font-face-get-type.c | 4
test/get-and-set.c | 2
test/gradient-alpha.c | 2
test/imagediff.c | 4
test/linear-gradient.c | 8
test/mask.c | 8
test/operator-clear.c | 16
test/operator-source.c | 18
test/ps-features.c | 2
test/push-group.c | 2
test/read-png.c | 1
test/rectangle-rounding-error.c | 10
test/rel-path.c | 4
test/self-copy.c | 6
test/source-clip.c | 2
test/surface-finish-twice.c | 1
test/surface-pattern.c | 2
test/svg-clip.c | 2
test/text-cache-crash.c | 1
test/text-pattern.c | 10
test/text-rotate.c | 2
test/transforms.c | 2
test/trap-clip.c | 4
test/unbounded-operator.c | 16
test/user-data.c | 2
test/write-png.c | 4
test/xlib-surface.c | 18
test/xmalloc.c | 1
150 files changed, 2195 insertions(+), 2365 deletions(-)
New commits:
diff-tree a21a2e935d3a75b045ce5f7e917524052f018758 (from ef10a0403a8a466199615e34a34df9ea860ef9c0)
Author: Carl Worth <cworth at cworth.org>
Date: Tue Jun 6 16:28:15 2006 -0700
CODING_STYLE: Add notes on avoiding trailing whitespace.
diff --git a/CODING_STYLE b/CODING_STYLE
index ab6e067..4fb6924 100644
--- a/CODING_STYLE
+++ b/CODING_STYLE
@@ -132,7 +132,7 @@ structure definition:
struct _cairo_gstate {
cairo_operator_t op;
-
+
double tolerance;
/* stroke style */
@@ -146,19 +146,33 @@ structure definition:
double *dash;
int num_dashes;
double dash_offset;
-
+
...
}
Use a single space before a left parenthesis, except where the
standard will not allow it, (eg. when defining a parameterized macro).
-Don't eliminate whitespace just because things would still fit on one
+Don't eliminate newlines just because things would still fit on one
line. This breaks the expected visual structure of the code making it
much harder to read and understand:
if (condition) foo (); else bar (); /* Yuck! */
+Do eliminate trailing whitespace (space or tab characters) on any
+line. Also, avoid putting intial or final blank lines into any file,
+and never use multiple blank lines instead of a single blank line.
+
+Do enable the default git pre-commit hook that detect trailing
+whitespace for you and help you to avoid corrupting cairo's tree with
+it. Do that as follows:
+
+ chmod a+x .git/hooks/pre-commit
+
+You might also find the git-stripspace utility helpful which acts as a
+filter to remove trailing whitespace as well as initial, final, and
+duplicate blank lines.
+
As a special case of the bracing and whitespace guidelines, function
definitions should always take the following form:
diff-tree ef10a0403a8a466199615e34a34df9ea860ef9c0 (from 5278de09973c3e41028dc80a8862db01fc70cf11)
Author: Carl Worth <cworth at cworth.org>
Date: Tue Jun 6 15:50:33 2006 -0700
Remove initial, final, and duplicate blank lines.
This patch was produced by running git-stripspace on all *.[ch] files
within cairo. Note that this script would have also created all the changes
from the previous commits to remove trailing whitespace.
diff --git a/doc/tutorial/src/include/cairo-tutorial.h b/doc/tutorial/src/include/cairo-tutorial.h
index 65a431a..91167ee 100644
--- a/doc/tutorial/src/include/cairo-tutorial.h
+++ b/doc/tutorial/src/include/cairo-tutorial.h
@@ -38,4 +38,3 @@
#elif CAIRO_TUTORIAL_PNG
#include "cairo-tutorial-png.h"
#endif
-
diff --git a/pixman/src/fbcompose.c b/pixman/src/fbcompose.c
index 8d20039..9515edd 100644
--- a/pixman/src/fbcompose.c
+++ b/pixman/src/fbcompose.c
@@ -568,7 +568,6 @@ fbFetch_c4 (const FbBits *bits, int x, i
}
}
-
static FASTCALL void
fbFetch_a1 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed)
{
@@ -1002,7 +1001,6 @@ fbFetchPixel_c4 (const FbBits *bits, int
return indexed->rgba[pixel];
}
-
static FASTCALL CARD32
fbFetchPixel_a1 (const FbBits *bits, int offset, miIndexedPtr indexed)
{
@@ -1085,8 +1083,6 @@ static fetchPixelProc fetchPixelProcForP
}
}
-
-
/*
* All the store functions
*/
@@ -1470,7 +1466,6 @@ fbStore_g1 (FbBits *bits, const CARD32 *
}
}
-
static storeProc storeProcForPicture (PicturePtr pict)
{
switch(pict->format_code) {
@@ -1521,7 +1516,6 @@ static storeProc storeProcForPicture (Pi
}
}
-
/*
* Combine src and mask
*/
@@ -1553,7 +1547,6 @@ fbCombineSrcU (CARD32 *dest, const CARD3
memcpy(dest, src, width*sizeof(CARD32));
}
-
static FASTCALL void
fbCombineOverU (CARD32 *dest, const CARD32 *src, int width)
{
@@ -1967,21 +1960,18 @@ fbCombineConjointOverU (CARD32 *dest, co
fbCombineConjointGeneralU (dest, src, width, CombineAOver);
}
-
static FASTCALL void
fbCombineConjointOverReverseU (CARD32 *dest, const CARD32 *src, int width)
{
fbCombineConjointGeneralU (dest, src, width, CombineBOver);
}
-
static FASTCALL void
fbCombineConjointInU (CARD32 *dest, const CARD32 *src, int width)
{
fbCombineConjointGeneralU (dest, src, width, CombineAIn);
}
-
static FASTCALL void
fbCombineConjointInReverseU (CARD32 *dest, const CARD32 *src, int width)
{
@@ -2122,7 +2112,6 @@ fbCombineMaskValueC (CARD32 *src, const
}
}
-
static FASTCALL void
fbCombineMaskAlphaC (const CARD32 *src, CARD32 *mask, int width)
{
@@ -2686,14 +2675,12 @@ static CombineFuncC fbCombineFuncC[] = {
fbCombineConjointXorC,
};
-
FbComposeFunctions composeFunctions = {
fbCombineFuncU,
fbCombineFuncC,
fbCombineMaskU
};
-
static void fbFetchSolid(PicturePtr pict, int x, int y, int width, CARD32 *buffer, CARD32 *mask, CARD32 maskBits)
{
FbBits *bits;
@@ -3537,7 +3524,6 @@ static void fbFetchTransformed(PicturePt
}
}
-
static void fbFetchExternalAlpha(PicturePtr pict, int x, int y, int width, CARD32 *buffer, CARD32 *mask, CARD32 maskBits)
{
int i;
@@ -3634,7 +3620,6 @@ static void fbStoreExternalAlpha(Picture
bits += y*stride;
alpha_bits += (ay - pict->alphaOrigin.y)*astride;
-
store(bits, buffer, x, width, indexed);
astore(alpha_bits, buffer, ax - pict->alphaOrigin.x, width, aindexed);
}
diff --git a/pixman/src/fbedge.c b/pixman/src/fbedge.c
index 5846158..e06ed20 100644
--- a/pixman/src/fbedge.c
+++ b/pixman/src/fbedge.c
@@ -61,7 +61,6 @@
#undef rasterizeEdges
#undef N_BITS
-
/*
* 1 bit alpha
*/
diff --git a/pixman/src/fbmmx.c b/pixman/src/fbmmx.c
index 4b5e5dd..00856ef 100644
--- a/pixman/src/fbmmx.c
+++ b/pixman/src/fbmmx.c
@@ -29,7 +29,6 @@
* Based on work by Owen Taylor
*/
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -393,7 +392,6 @@ mmxCombineMaskU (CARD32 *src, const CARD
_mm_empty();
}
-
static FASTCALL void
mmxCombineOverU (CARD32 *dest, const CARD32 *src, int width)
{
@@ -610,7 +608,6 @@ mmxCombineSaturateU (CARD32 *dest, const
_mm_empty();
}
-
static FASTCALL void
mmxCombineSrcC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
{
@@ -665,7 +662,6 @@ mmxCombineOverReverseC (CARD32 *dest, CA
_mm_empty();
}
-
static FASTCALL void
mmxCombineInC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width)
{
@@ -863,7 +859,6 @@ void fbComposeSetupMMX(void)
}
}
-
/* ------------------ MMX code paths called from fbpict.c ----------------------- */
void
@@ -1401,7 +1396,6 @@ fbCompositeSrc_8888x8888mmx (pixman_oper
_mm_empty();
}
-
void
fbCompositeSolidMask_nx8x8888mmx (pixman_operator_t op,
PicturePtr pSrc,
@@ -1647,7 +1641,6 @@ fbCompositeSolidMaskSrc_nx8x8888mmx (pix
_mm_empty();
}
-
void
fbCompositeSolidMask_nx8x0565mmx (pixman_operator_t op,
PicturePtr pSrc,
diff --git a/pixman/src/fbpict.c b/pixman/src/fbpict.c
index 3c032c1..6f454c6 100644
--- a/pixman/src/fbpict.c
+++ b/pixman/src/fbpict.c
@@ -736,8 +736,6 @@ fbCompositeSrc_8888x0565 (pixman_operato
}
}
-
-
static void
fbCompositeSrcAdd_8000x8000 (pixman_operator_t op,
PicturePtr pSrc,
@@ -1069,8 +1067,6 @@ fbCompositeTrans_0565xnx0565(pixman_oper
}
}
-
-
/* macros for "i can't believe it's not fast" packed pixel handling */
#define alphamaskCombine24(a,b) genericCombine24(a,b,maskAlpha,maskiAlpha)
static void
diff --git a/pixman/src/fbpict.h b/pixman/src/fbpict.h
index 99977b7..0ff0c11 100644
--- a/pixman/src/fbpict.h
+++ b/pixman/src/fbpict.h
@@ -59,7 +59,6 @@
#define FbAdd(x,y,i,t) ((t) = FbGet8(x,i) + FbGet8(y,i), \
(CARD32) ((CARD8) ((t) | (0 - ((t) >> 8)))) << (i))
-
#define Alpha(x) ((x) >> 24)
#define Red(x) (((x) >> 16) & 0xff)
#define Green(x) (((x) >> 8) & 0xff)
diff --git a/pixman/src/icbltone.c b/pixman/src/icbltone.c
index 210061a..d67e75d 100644
--- a/pixman/src/icbltone.c
+++ b/pixman/src/icbltone.c
@@ -739,4 +739,3 @@ fbBltOne24 (FbStip *srcLine,
}
}
#endif
-
diff --git a/pixman/src/icimage.c b/pixman/src/icimage.c
index a9e9289..9cf0549 100644
--- a/pixman/src/icimage.c
+++ b/pixman/src/icimage.c
@@ -355,7 +355,6 @@ pixman_image_init (pixman_image_t *image
image->filter_params = NULL;
image->filter_nparams = 0;
-
image->owns_pixels = 0;
image->pSourcePict = NULL;
diff --git a/pixman/src/icimage.h b/pixman/src/icimage.h
index 868ed66..eff1be2 100644
--- a/pixman/src/icimage.h
+++ b/pixman/src/icimage.h
@@ -219,7 +219,6 @@ FbValidatePicture (PicturePtr pPicture,
Mask mask);
*/
-
/* XXX: What should this be?
pixman_private int
FbClipPicture (pixman_region16_t *region,
diff --git a/pixman/src/icint.h b/pixman/src/icint.h
index e7f1de3..c9b0ab4 100644
--- a/pixman/src/icint.h
+++ b/pixman/src/icint.h
@@ -66,7 +66,6 @@ typedef struct _FbPoint {
typedef unsigned int Mask;
-
#define GXcopy 0x3
#define GXor 0x7
#define ClipByChildren 0
@@ -75,7 +74,6 @@ typedef unsigned int Mask;
#define CPClipMask (1 << 6)
#define CPLastBit 11
-
/* Define any names that the server code will be expecting in
* terms of libpixman names. */
@@ -116,7 +114,6 @@ typedef pixman_triangle_t xTriangle;
# define BITMAP_BIT_ORDER LSBFirst
#endif
-
#define MAXSHORT SHRT_MAX
#define MINSHORT SHRT_MIN
@@ -124,8 +121,6 @@ typedef pixman_triangle_t xTriangle;
#include "picture.h"
*/
-
-
#include "pixman.h"
/* XXX: Most of this file is straight from fb.h and I imagine we can
@@ -166,11 +161,9 @@ typedef pixman_triangle_t xTriangle;
#define FbFullMask(n) ((n) == FB_UNIT ? FB_ALLONES : ((((FbBits) 1) << n) - 1))
-
typedef uint32_t FbStip;
typedef int FbStride;
-
#ifdef FB_DEBUG
extern void fbValidateDrawable(DrawablePtr d);
extern void fbInitializeDrawable(DrawablePtr d);
@@ -223,7 +216,6 @@ extern void fbSetBits (FbStip *bits, int
#define FbStipMask(x,w) (FbStipRight(FB_STIP_ALLONES,(x) & FB_STIP_MASK) & \
FbStipLeft(FB_STIP_ALLONES,(FB_STIP_UNIT - ((x)+(w))) & FB_STIP_MASK))
-
#define FbMaskBits(x,w,l,n,r) { \
n = (w); \
r = FbRightMask((x)+n); \
@@ -441,7 +433,6 @@ extern void fbSetBits (FbStip *bits, int
} \
}
-
#define FbDoRightMaskByteRRop(dst,rb,r,and,xor) { \
switch (rb) { \
case 1: \
@@ -870,7 +861,6 @@ slim_hidden_proto(pixman_image_set_compo
slim_hidden_proto(pixman_image_set_repeat)
slim_hidden_proto(pixman_composite)
-
#include "icrop.h"
/* XXX: For now, I'm just wholesale pasting Xserver/render/picture.h here: */
@@ -1078,7 +1068,6 @@ typedef xFixed_16_16 xFixed;
#endif /* _PICTURE_H_ */
-
/* Macros needed by fbpict.c */
#define cvt8888to0565(s) ((((s) >> 3) & 0x001f) | \
diff --git a/pixman/src/icpixels.c b/pixman/src/icpixels.c
index c5efae9..605214e 100644
--- a/pixman/src/icpixels.c
+++ b/pixman/src/icpixels.c
@@ -112,4 +112,3 @@ FbPixelsDestroy (FbPixels *pixels)
free(pixels);
}
-
diff --git a/pixman/src/icrect.c b/pixman/src/icrect.c
index 7027d22..7253bfa 100644
--- a/pixman/src/icrect.c
+++ b/pixman/src/icrect.c
@@ -29,7 +29,6 @@ typedef void (*FillFunc) (pixman_image_t
uint16_t height,
pixman_bits_t *pixel);
-
static void
pixman_fill_rect_1bpp (pixman_image_t *dst,
int16_t xDst,
@@ -177,7 +176,6 @@ pixman_fill_rect_general (pixman_image_t
}
}
-
static void
pixman_color_rects (pixman_image_t *dst,
pixman_image_t *clipPict,
diff --git a/pixman/src/ictransform.c b/pixman/src/ictransform.c
index c7358bf..013c8ca 100644
--- a/pixman/src/ictransform.c
+++ b/pixman/src/ictransform.c
@@ -61,4 +61,3 @@ pixman_transform_point (pixman_transform
vector->vector[2] = xFixed1;
return 1;
}
-
diff --git a/pixman/src/ictri.c b/pixman/src/ictri.c
index d3d5faa..09902ab 100644
--- a/pixman/src/ictri.c
+++ b/pixman/src/ictri.c
@@ -361,4 +361,3 @@ pixman_composite_tri_fan (pixman_operato
pixman_format_destroy (format);
}
-
diff --git a/pixman/src/icutil.c b/pixman/src/icutil.c
index 0a4ba66..e1c7fd0 100644
--- a/pixman/src/icutil.c
+++ b/pixman/src/icutil.c
@@ -70,7 +70,6 @@ const FbMergeRopRec FbMergeRopBits[16] =
#define Mask(x,w) BitsMask((x)*(w),(w))
-
#define SelMask(b,n,w) ((((b) >> n) & 1) * Mask(n,w))
#define C1(b,w) \
diff --git a/pixman/src/pixman-xserver-compat.h b/pixman/src/pixman-xserver-compat.h
index ee2cca5..a09367d 100644
--- a/pixman/src/pixman-xserver-compat.h
+++ b/pixman/src/pixman-xserver-compat.h
@@ -122,5 +122,4 @@ fbRasterizeEdges (pixman_bits_t *buf,
pixman_fixed16_16_t t,
pixman_fixed16_16_t b);
-
#endif
diff --git a/pixman/src/pixman.h b/pixman/src/pixman.h
index 28dc30a..79b97a9 100644
--- a/pixman/src/pixman.h
+++ b/pixman/src/pixman.h
@@ -1,13 +1,10 @@
#ifndef _PIXMAN_H_
#define _PIXMAN_H_
-
/* pixman.h - a merge of pixregion.h and ic.h */
-
/* from pixregion.h */
-
/***********************************************************
Copyright 1987, 1998 The Open Group
@@ -32,7 +29,6 @@ Except as contained in this notice, the
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
-
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
@@ -78,7 +74,6 @@ SOFTWARE.
* PERFORMANCE OF THIS SOFTWARE.
*/
-
#if defined (__SVR4) && defined (__sun)
# include <sys/int_types.h>
#elif defined (__OpenBSD__) || defined (_AIX) || defined (__osf__)
@@ -201,10 +196,8 @@ pixman_region_reset (pixman_region16_t *
void
pixman_region_empty (pixman_region16_t *region);
-
/* ic.h */
-
/* icformat.c */
typedef enum pixman_operator {
PIXMAN_OPERATOR_CLEAR,
@@ -486,7 +479,6 @@ pixman_composite_tri_strip (pixman_opera
const pixman_point_fixed_t *points,
int npoints);
-
void
pixman_composite_tri_fan (pixman_operator_t op,
pixman_image_t *src,
@@ -512,8 +504,6 @@ pixman_composite (pixman_operator_t op,
int width,
int height);
-
-
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
diff --git a/pixman/src/pixregion.c b/pixman/src/pixregion.c
index a474161..38fb1da 100644
--- a/pixman/src/pixregion.c
+++ b/pixman/src/pixregion.c
@@ -22,7 +22,6 @@ Except as contained in this notice, the
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
-
Copyright 1987, 1988, 1989 by
Digital Equipment Corporation, Maynard, Massachusetts.
@@ -194,7 +193,6 @@ if (!(pReg)->data || (((pReg)->data->num
assert(pReg->data->numRects<=pReg->data->size); \
}
-
#define DOWNSIZE(reg,numRects) \
if (((numRects) < ((reg)->data->size >> 1)) && ((reg)->data->size > 50)) \
{ \
@@ -207,7 +205,6 @@ if (((numRects) < ((reg)->data->size >>
} \
}
-
#ifdef DEBUG_PIXREGION
int
pixman_region16_print(rgn)
@@ -230,7 +227,6 @@ pixman_region16_print(rgn)
return(num);
}
-
pixman_region_status_t
pixman_region16_tsEqual(reg1, reg2)
pixman_region16_t * reg1;
@@ -304,7 +300,6 @@ pixman_region16_valid(reg)
#endif /* DEBUG_PIXREGION */
-
/* Create a new empty region */
pixman_region16_t *
pixman_region_create (void)
@@ -457,7 +452,6 @@ pixman_region_copy(pixman_region16_t *ds
}
slim_hidden_def(pixman_region_copy);
-
/*======================================================================
* Generic Region Operator
*====================================================================*/
@@ -537,7 +531,6 @@ pixman_coalesce (
return prevStart;
}
-
/* Quicky macro to avoid trivial reject procedure calls to pixman_coalesce */
#define Coalesce(newReg, prevBand, curBand) \
@@ -992,7 +985,6 @@ pixman_region_intersectO (
return PIXMAN_REGION_STATUS_SUCCESS;
}
-
pixman_region_status_t
pixman_region_intersect(newReg, reg1, reg2)
pixman_region16_t * newReg; /* destination Region */
@@ -1241,7 +1233,6 @@ pixman_region_union(pixman_region16_t *n
}
slim_hidden_def(pixman_region_union);
-
/*======================================================================
* Batch Rectangle Union
*====================================================================*/
@@ -1349,7 +1340,6 @@ pixman_region_append(dstrgn, rgn)
return PIXMAN_REGION_STATUS_SUCCESS;
}
-
#define ExchangeRects(a, b) \
{ \
pixman_box16_t t; \
@@ -1727,7 +1717,6 @@ pixman_region_rectsToRegion(nrects, prec
* Region Subtraction
*====================================================================*/
-
/*-
*-----------------------------------------------------------------------
* pixman_region_subtractO --
@@ -1838,7 +1827,6 @@ pixman_region_subtractO (
}
} while ((r1 != r1End) && (r2 != r2End));
-
/*
* Add remaining minuend rectangles to region.
*/
diff --git a/pixman/src/pixregionint.h b/pixman/src/pixregionint.h
index 8a902ad..b5b53fd 100644
--- a/pixman/src/pixregionint.h
+++ b/pixman/src/pixregionint.h
@@ -22,7 +22,6 @@ Except as contained in this notice, the
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
-
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
diff --git a/pixman/src/renderedge.c b/pixman/src/renderedge.c
index 42fa65f..563a4e2 100644
--- a/pixman/src/renderedge.c
+++ b/pixman/src/renderedge.c
@@ -192,4 +192,3 @@ RenderLineFixedEdgeInit (RenderEdge *e,
bot->x + x_off_fixed,
bot->y + y_off_fixed);
}
-
diff --git a/src/cairo-analysis-surface.c b/src/cairo-analysis-surface.c
index d06e3fe..f8b3608 100644
--- a/src/cairo-analysis-surface.c
+++ b/src/cairo-analysis-surface.c
@@ -255,5 +255,3 @@ _cairo_analysis_surface_has_unsupported
return surface->fallback;
}
-
-
diff --git a/src/cairo-array.c b/src/cairo-array.c
index 49d764c..baf1765 100644
--- a/src/cairo-array.c
+++ b/src/cairo-array.c
@@ -460,4 +460,3 @@ _cairo_user_data_array_set_data (cairo_u
return CAIRO_STATUS_SUCCESS;
}
-
diff --git a/src/cairo-atsui-font.c b/src/cairo-atsui-font.c
index e4bf30f..1f6726e 100644
--- a/src/cairo-atsui-font.c
+++ b/src/cairo-atsui-font.c
@@ -76,7 +76,6 @@ struct _cairo_atsui_font {
ATSUFontID fontID;
};
-
struct _cairo_atsui_font_face {
cairo_font_face_t base;
ATSUFontID font_id;
@@ -134,8 +133,6 @@ cairo_atsui_font_face_create_for_atsu_fo
return &font_face->base;
}
-
-
static CGAffineTransform
CGAffineTransformMakeWithCairoFontScale(const cairo_matrix_t *scale)
{
@@ -327,7 +324,6 @@ _cairo_atsui_font_create_toy(cairo_toy_f
sizeof(styleTags) / sizeof(styleTags[0]),
styleTags, styleSizes, styleValues);
-
return _cairo_atsui_font_create_scaled (&toy_face->base, fontID, style,
font_matrix, ctm, options, font_out);
}
@@ -682,7 +678,6 @@ _cairo_atsui_font_old_show_glyphs (void
* that we don't really need...
*/
-
for (i = 0; i < num_glyphs; i++) {
CGGlyph theGlyph = glyphs[i].index;
@@ -717,4 +712,3 @@ const cairo_scaled_font_backend_t cairo_
NULL, /* ucs4_to_index */
_cairo_atsui_font_old_show_glyphs,
};
-
diff --git a/src/cairo-base85-stream.c b/src/cairo-base85-stream.c
index 42d732b..d42700d 100644
--- a/src/cairo-base85-stream.c
+++ b/src/cairo-base85-stream.c
@@ -127,4 +127,3 @@ _cairo_base85_stream_create (cairo_outpu
_cairo_base85_stream_close,
stream);
}
-
diff --git a/src/cairo-beos.h b/src/cairo-beos.h
index d253bcb..45a3d54 100644
--- a/src/cairo-beos.h
+++ b/src/cairo-beos.h
@@ -58,4 +58,3 @@ CAIRO_END_DECLS
#endif /* CAIRO_HAS_BEOS_SURFACE */
#endif /* CAIRO_BEOS_H */
-
diff --git a/src/cairo-cache.c b/src/cairo-cache.c
index 3a7d5be..feac8c7 100644
--- a/src/cairo-cache.c
+++ b/src/cairo-cache.c
@@ -57,7 +57,6 @@ static void
_cairo_cache_shrink_to_accomodate (cairo_cache_t *cache,
unsigned long additional);
-
static cairo_status_t
_cairo_cache_init (cairo_cache_t *cache,
cairo_cache_keys_equal_func_t keys_equal,
@@ -379,4 +378,3 @@ _cairo_hash_string (const char *c)
hash = ((hash << 5) + hash) + *c++;
return hash;
}
-
diff --git a/src/cairo-clip.c b/src/cairo-clip.c
index 0e3e6fa..fff9558 100644
--- a/src/cairo-clip.c
+++ b/src/cairo-clip.c
@@ -452,7 +452,6 @@ _cairo_clip_clip (cairo_clip_t *cl
if (status != CAIRO_INT_STATUS_UNSUPPORTED)
return status;
-
_cairo_traps_init (&traps);
status = _cairo_path_fixed_fill_to_traps (path,
fill_rule,
@@ -540,4 +539,3 @@ _cairo_clip_init_deep_copy (cairo_clip_t
}
}
}
-
diff --git a/src/cairo-debug.c b/src/cairo-debug.c
index cd0de78..7c29932 100644
--- a/src/cairo-debug.c
+++ b/src/cairo-debug.c
@@ -69,4 +69,3 @@ cairo_debug_reset_static_data (void)
_cairo_ft_font_reset_static_data ();
#endif
}
-
diff --git a/src/cairo-directfb-surface.c b/src/cairo-directfb-surface.c
index 46e8cc8..80f0ff6 100644
--- a/src/cairo-directfb-surface.c
+++ b/src/cairo-directfb-surface.c
@@ -50,7 +50,6 @@ Composite support not working
*/
#define DFB_COMPOSITE 0
-
#if DFB_SHOW_GLYPHS
static cairo_int_status_t
_cairo_directfb_surface_show_glyphs (cairo_scaled_font_t *scaled_font,
@@ -80,7 +79,6 @@ typedef struct _cairo_directfb_surface {
int height;
} cairo_directfb_surface_t;
-
static int
_dfb_set_operator (cairo_operator_t operator,IDirectFBSurface *dest)
{
@@ -137,7 +135,6 @@ _dfb_set_operator (cairo_operator_t oper
return DFB_SUPPORTED;
}
-
static inline int cairo_to_directfb_format(cairo_format_t format ) {
switch( format ) {
case CAIRO_FORMAT_RGB24:
@@ -187,7 +184,6 @@ static inline int directfb_to_cairo_form
}
}
-
static IDirectFBSurface *cairo_directfb_buffer_surface_create(IDirectFB *dfb,void *data,int pitch, int format,
int width, int height) {
@@ -267,7 +263,6 @@ _cairo_directfb_surface_get_image (cairo
}
surface->buffer->Unlock(surface->buffer);
-
surface->main_surface->GetSize(surface->main_surface,&width,&height);
surface->main_surface->GetPixelFormat(surface->main_surface,&dfbformat);
surface->format = directfb_to_cairo_format(dfbformat);
@@ -318,7 +313,6 @@ _cairo_directfb_surface_get_image (cairo
return CAIRO_STATUS_SUCCESS;
}
-
static cairo_surface_t *
_cairo_directfb_surface_create_similar (void *abstract_src,
cairo_content_t content,
@@ -350,7 +344,6 @@ _cairo_directfb_surface_create_similar (
return sur;
}
-
static cairo_status_t
_cairo_directfb_surface_finish (void *data ) {
cairo_directfb_surface_t *surface=(cairo_directfb_surface_t *)data;
@@ -660,7 +653,6 @@ _cairo_directfb_surface_scaled_glyph_fin
}
#endif
-
static const cairo_surface_backend_t cairo_directfb_surface_backend = {
CAIRO_SURFACE_TYPE_DIRECTFB,
_cairo_directfb_surface_create_similar,
@@ -782,8 +774,6 @@ _cairo_directfb_surface_show_glyphs (cai
}
#endif
-
-
cairo_surface_t *
cairo_directfb_surface_create (IDirectFB *dfb,IDirectFBSurface *dfbsurface)
{
@@ -804,4 +794,3 @@ cairo_directfb_surface_create (IDirectFB
surface->clip=NULL;
return ((cairo_surface_t *)surface);
}
-
diff --git a/src/cairo-directfb.h b/src/cairo-directfb.h
index 3b8e10d..b777196 100644
--- a/src/cairo-directfb.h
+++ b/src/cairo-directfb.h
@@ -47,14 +47,5 @@ cairo_surface_t * cairo_directfb_surface
CAIRO_END_DECLS
-
-
#endif /*CAIRO_HAS_DIRECTFB_SURFACE*/
#endif /*CAIRO_DIRECTFB_H*/
-
-
-
-
-
-
-
diff --git a/src/cairo-font-subset-private.h b/src/cairo-font-subset-private.h
index 5b43f52..4b9235b 100644
--- a/src/cairo-font-subset-private.h
+++ b/src/cairo-font-subset-private.h
@@ -51,7 +51,6 @@ struct cairo_font_subset {
long ascent, descent;
};
-
cairo_private int
_cairo_font_subset_use_glyph (cairo_font_subset_t *font, int glyph);
diff --git a/src/cairo-font-subset.c b/src/cairo-font-subset.c
index 9d7aa40..ab7dc81 100644
--- a/src/cairo-font-subset.c
+++ b/src/cairo-font-subset.c
@@ -74,7 +74,6 @@ struct cairo_pdf_ft_font {
static int
cairo_pdf_ft_font_use_glyph (void *abstract_font, int glyph);
-
#define ARRAY_LENGTH(a) ( (sizeof (a)) / (sizeof ((a)[0])) )
#define SFNT_VERSION 0x00010000
@@ -335,7 +334,6 @@ cairo_pdf_ft_font_write_generic_table (c
return 0;
}
-
typedef struct composite_glyph composite_glyph_t;
struct composite_glyph {
unsigned short flags;
diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index 24ac1a7..002466b 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -1471,7 +1471,6 @@ _cairo_ft_scaled_font_create (cairo_ft_u
fs_metrics.max_x_advance = face->max_advance_width / scale;
}
-
/* FIXME: this doesn't do vertical layout atm. */
fs_metrics.max_y_advance = 0.0;
diff --git a/src/cairo-glitz-surface.c b/src/cairo-glitz-surface.c
index 0db3df9..4c898f9 100644
--- a/src/cairo-glitz-surface.c
+++ b/src/cairo-glitz-surface.c
@@ -353,7 +353,6 @@ _cairo_glitz_surface_release_dest_image
cairo_surface_destroy (&image->base);
}
-
static cairo_status_t
_cairo_glitz_surface_clone_similar (void *abstract_surface,
cairo_surface_t *src,
diff --git a/src/cairo-matrix.c b/src/cairo-matrix.c
index 54c421d..a3ab6aa 100644
--- a/src/cairo-matrix.c
+++ b/src/cairo-matrix.c
@@ -583,7 +583,6 @@ _cairo_matrix_is_integer_translation(con
In other words, what is the maximum radius, MAX[ |X'| ], reached for any
X on the unit circle ( |X| = 1 ) ?
-
3. Some useful formulae
(A) through (C) below are standard double-angle formulae. (D) is a lesser
@@ -617,7 +616,6 @@ _cairo_matrix_is_integer_translation(con
MAX[a*cos(θ) + b*sin(θ)] = (a² + b²)/sqrt(a² + b²)
= sqrt(a² + b²)
-
4. Derivation of maximum expansion
To find MAX[ |X'| ] we search brute force method using calculus. The unit
@@ -666,7 +664,6 @@ _cairo_matrix_is_integer_translation(con
Which is the solution to this problem.
-
Walter Brisken
2004/10/08
diff --git a/src/cairo-output-stream.c b/src/cairo-output-stream.c
index 077de9c..5ef36e5 100644
--- a/src/cairo-output-stream.c
+++ b/src/cairo-output-stream.c
@@ -213,7 +213,6 @@ _cairo_dtostr (char *buffer, size_t size
return p + 1 - buffer;
}
-
enum {
LENGTH_MODIFIER_LONG = 0x100
};
@@ -327,7 +326,6 @@ _cairo_output_stream_get_status (cairo_o
return stream->status;
}
-
/* Maybe this should be a configure time option, so embedded targets
* don't have to pull in stdio. */
diff --git a/src/cairo-path-fill.c b/src/cairo-path-fill.c
index f9b9d9f..51e067f 100644
--- a/src/cairo-path-fill.c
+++ b/src/cairo-path-fill.c
@@ -205,4 +205,3 @@ BAIL:
return status;
}
-
diff --git a/src/cairo-path.c b/src/cairo-path.c
index 3c8c0b2..420e217 100644
--- a/src/cairo-path.c
+++ b/src/cairo-path.c
@@ -613,4 +613,3 @@ _cairo_path_fixed_offset (cairo_path_fix
CAIRO_FIXED_ONE,
CAIRO_FIXED_ONE);
}
-
diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index 9c5dea1..bdbc11d 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -740,7 +740,6 @@ emit_smask (cairo_pdf_surface_t *surfac
return status;
}
-
/* Emit image data into the given surface, providing a resource that
* can be used to reference the data in image_ret. */
static cairo_status_t
@@ -829,7 +828,6 @@ emit_image (cairo_pdf_surface_t *surfac
" /BitsPerComponent 8\r\n" \
" /Filter /FlateDecode\r\n"
-
if (need_smask)
*image_ret = _cairo_pdf_surface_open_stream (surface,
IMAGE_DICTIONARY
diff --git a/src/cairo-pdf-test.h b/src/cairo-pdf-test.h
index 7299be3..6d0c93c 100644
--- a/src/cairo-pdf-test.h
+++ b/src/cairo-pdf-test.h
@@ -52,4 +52,3 @@ CAIRO_END_DECLS
#endif /* CAIRO_HAS_PDF_SURFACE */
#endif /* CAIRO_PDF_TEST_H */
-
diff --git a/src/cairo-png.c b/src/cairo-png.c
index 06c6efb..d656016 100644
--- a/src/cairo-png.c
+++ b/src/cairo-png.c
@@ -529,4 +529,3 @@ cairo_image_surface_create_from_png_stre
return read_png (stream_read_func, &png_closure);
}
-
diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 9d49111..0149b14 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -393,7 +393,6 @@ _cairo_ps_surface_create_for_stream_inte
width, height,
&cairo_ps_surface_paginated_backend);
-
CLEANUP_OUTPUT_STREAM:
_cairo_output_stream_destroy (surface->stream);
CLEANUP_TMPFILE:
diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c
index 5b55ac3..a3237e3 100644
--- a/src/cairo-quartz-surface.c
+++ b/src/cairo-quartz-surface.c
@@ -225,7 +225,6 @@ static const struct _cairo_surface_backe
NULL /* old_show_glyphs */
};
-
cairo_surface_t *cairo_quartz_surface_create(CGContextRef context,
int width,
int height,
diff --git a/src/cairo-quartz.h b/src/cairo-quartz.h
index b3072df..286efe8 100644
--- a/src/cairo-quartz.h
+++ b/src/cairo-quartz.h
@@ -58,4 +58,3 @@ CAIRO_END_DECLS
#endif /* CAIRO_HAS_QUARTZ_SURFACE */
#endif /* CAIRO_QUARTZ_H */
-
diff --git a/src/cairo-region.c b/src/cairo-region.c
index be73741..88e89f2 100644
--- a/src/cairo-region.c
+++ b/src/cairo-region.c
@@ -80,4 +80,3 @@ _cairo_region_extents_rectangle (pixman_
rect->width = region_extents->x2 - region_extents->x1;
rect->height = region_extents->y2 - region_extents->y1;
}
-
diff --git a/src/cairo-scaled-font-subsets.c b/src/cairo-scaled-font-subsets.c
index 9be2be2..112925c 100644
--- a/src/cairo-scaled-font-subsets.c
+++ b/src/cairo-scaled-font-subsets.c
@@ -39,7 +39,6 @@
* Keith Packard <keithp at keithp.com>
*/
-
#include "cairoint.h"
#include "cairo-scaled-font-subsets-private.h"
diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index 06fbe11..003af49 100644
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -1009,7 +1009,6 @@ _scaled_glyph_path_curve_to (void *abstr
p2->y + closure->offset.y);
}
-
static cairo_status_t
_scaled_glyph_path_close_path (void *abstract_closure)
{
diff --git a/src/cairo-slope.c b/src/cairo-slope.c
index 5c4886f..2c888e4 100644
--- a/src/cairo-slope.c
+++ b/src/cairo-slope.c
@@ -97,7 +97,3 @@ _cairo_slope_counter_clockwise (cairo_sl
{
return ! _cairo_slope_clockwise (a, b);
}
-
-
-
-
diff --git a/src/cairo-spline.c b/src/cairo-spline.c
index 0da00aa..900d3ca 100644
--- a/src/cairo-spline.c
+++ b/src/cairo-spline.c
@@ -283,4 +283,3 @@ _cairo_spline_decompose (cairo_spline_t
return CAIRO_STATUS_SUCCESS;
}
-
diff --git a/src/cairo-stroke-style.c b/src/cairo-stroke-style.c
index 426dc8a..a150906 100644
--- a/src/cairo-stroke-style.c
+++ b/src/cairo-stroke-style.c
@@ -84,4 +84,3 @@ _cairo_stroke_style_fini (cairo_stroke_s
}
style->num_dashes = 0;
}
-
diff --git a/src/cairo-svg-surface.c b/src/cairo-svg-surface.c
index b2a36fb..6cdc905 100644
--- a/src/cairo-svg-surface.c
+++ b/src/cairo-svg-surface.c
@@ -1779,7 +1779,6 @@ _cairo_svg_surface_get_font_options (voi
cairo_font_options_set_hint_metrics (options, CAIRO_HINT_METRICS_OFF);
}
-
static const cairo_surface_backend_t cairo_svg_surface_backend = {
CAIRO_SURFACE_TYPE_SVG,
_cairo_svg_surface_create_similar,
diff --git a/src/cairo-traps.c b/src/cairo-traps.c
index 404461c..58b5146 100644
--- a/src/cairo-traps.c
+++ b/src/cairo-traps.c
@@ -549,7 +549,6 @@ _line_segs_intersect_ceil (cairo_line_t
l2_det = _det16_32 (l2->p1.x, l2->p1.y,
l2->p2.x, l2->p2.y);
-
num_det = _det32_64 (l1_det, _fixed_16_16_to_fixed_32_32 (dy1),
l2_det, _fixed_16_16_to_fixed_32_32 (dy2));
diff --git a/src/cairo-unicode.c b/src/cairo-unicode.c
index 22b0efb..8f99e82 100644
--- a/src/cairo-unicode.c
+++ b/src/cairo-unicode.c
@@ -85,7 +85,6 @@
((Char) < 0x200000 ? 4 : \
((Char) < 0x4000000 ? 5 : 6)))))
-
#define UTF8_GET(Result, Chars, Count, Mask, Len) \
(Result) = (Chars)[0] & (Mask); \
for ((Count) = 1; (Count) < (Len); ++(Count)) \
@@ -105,7 +104,6 @@
((Char) < 0xFDD0 || (Char) > 0xFDEF) && \
((Char) & 0xFFFE) != 0xFFFE)
-
static const char utf8_skip_data[256] = {
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
@@ -311,7 +309,6 @@ _cairo_utf8_to_utf16 (const unsigned cha
in = UTF8_NEXT_CHAR (in);
}
-
str16 = malloc (sizeof (uint16_t) * (n16 + 1));
if (!str16)
return CAIRO_STATUS_NO_MEMORY;
diff --git a/src/cairo-win32-font.c b/src/cairo-win32-font.c
index df5c758..144c3e1 100644
--- a/src/cairo-win32-font.c
+++ b/src/cairo-win32-font.c
@@ -192,7 +192,6 @@ _have_cleartype_quality (void)
version_info.dwMinorVersion >= 1)); /* XP or newer */
}
-
static BYTE
_get_system_quality (void)
{
@@ -1080,7 +1079,6 @@ _compute_a8_mask (cairo_win32_surface_t
return &image8->base;
}
-
static cairo_status_t
_cairo_win32_scaled_font_glyph_init (void *abstract_font,
cairo_scaled_glyph_t *scaled_glyph,
@@ -1443,7 +1441,6 @@ cairo_win32_font_face_create_for_logfont
return &font_face->base;
}
-
cairo_font_face_t *
cairo_win32_font_face_create_for_hfont (HFONT font)
{
diff --git a/src/cairo-win32-surface.c b/src/cairo-win32-surface.c
index 8976fee..8a62df0 100644
--- a/src/cairo-win32-surface.c
+++ b/src/cairo-win32-surface.c
@@ -1051,7 +1051,6 @@ _cairo_win32_surface_show_glyphs (void
else
dx_buf[i] = (glyphs[i+1].x - glyphs[i].x) * WIN32_FONT_LOGICAL_SCALE;
-
if (i == num_glyphs - 1 || glyphs[i].y != glyphs[i+1].y) {
const int offset = (i - output_count) + 1;
win_result = ExtTextOutW(dst->dc,
@@ -1194,7 +1193,6 @@ cairo_win32_surface_create_with_dib (cai
return _cairo_win32_surface_create_for_dc (NULL, format, width, height);
}
-
/**
* _cairo_surface_is_win32:
* @surface: a #cairo_surface_t
diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c
index ed8d498..2c1e669 100644
--- a/src/cairo-xcb-surface.c
+++ b/src/cairo-xcb-surface.c
@@ -1326,4 +1326,3 @@ cairo_xcb_surface_set_size (cairo_surfac
xcb_surface->width = width;
xcb_surface->height = height;
}
-
diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
index 7c613b8..bc2525f 100644
--- a/src/cairo-xlib-surface.c
+++ b/src/cairo-xlib-surface.c
@@ -136,7 +136,6 @@ struct _cairo_xlib_surface {
#define CAIRO_SURFACE_RENDER_HAS_COMPOSITE(surface) CAIRO_SURFACE_RENDER_AT_LEAST((surface), 0, 0)
#define CAIRO_SURFACE_RENDER_HAS_COMPOSITE_TEXT(surface) CAIRO_SURFACE_RENDER_AT_LEAST((surface), 0, 0)
-
#define CAIRO_SURFACE_RENDER_HAS_FILL_RECTANGLE(surface) CAIRO_SURFACE_RENDER_AT_LEAST((surface), 0, 1)
#define CAIRO_SURFACE_RENDER_HAS_FILL_RECTANGLES(surface) CAIRO_SURFACE_RENDER_AT_LEAST((surface), 0, 1)
@@ -1622,7 +1621,6 @@ _cairo_xlib_surface_composite_trapezoids
0, 0,
dst_x, dst_y, width, height);
-
} else {
/* XXX: The XTrapezoid cast is evil and needs to go away somehow. */
XRenderCompositeTrapezoids (dst->dpy,
@@ -2726,4 +2724,3 @@ _cairo_xlib_surface_show_glyphs (void
_cairo_pattern_fini (&solid_pattern.base);
return status;
}
-
diff --git a/src/cairo-xlib-test.h b/src/cairo-xlib-test.h
index fc06ce9..7ecb3ce 100644
--- a/src/cairo-xlib-test.h
+++ b/src/cairo-xlib-test.h
@@ -52,4 +52,3 @@ CAIRO_END_DECLS
#endif /* CAIRO_HAS_XLIB_SURFACE */
#endif /* CAIRO_XLIB_H */
-
diff --git a/src/cairo-xlib-xrender.h b/src/cairo-xlib-xrender.h
index cc1064f..f3b3726 100644
--- a/src/cairo-xlib-xrender.h
+++ b/src/cairo-xlib-xrender.h
@@ -53,7 +53,6 @@ cairo_xlib_surface_create_with_xrender_f
int width,
int height);
-
CAIRO_END_DECLS
#else /* CAIRO_HAS_XLIB_SURFACE */
diff --git a/src/cairo-xlib.h b/src/cairo-xlib.h
index bff1c38..f7802fd 100644
--- a/src/cairo-xlib.h
+++ b/src/cairo-xlib.h
@@ -92,4 +92,3 @@ CAIRO_END_DECLS
#endif /* CAIRO_HAS_XLIB_SURFACE */
#endif /* CAIRO_XLIB_H */
-
diff --git a/src/cairo.c b/src/cairo.c
index 8a8e75a..640cf7d 100644
--- a/src/cairo.c
+++ b/src/cairo.c
@@ -440,7 +440,6 @@ bail:
}
slim_hidden_def(cairo_push_group_with_content);
-
/**
* cairo_pop_group:
* @cr: a cairo context
@@ -941,7 +940,6 @@ cairo_set_miter_limit (cairo_t *cr, doub
_cairo_set_error (cr, cr->status);
}
-
/**
* cairo_translate:
* @cr: a cairo context
@@ -987,7 +985,6 @@ cairo_scale (cairo_t *cr, double sx, dou
_cairo_set_error (cr, cr->status);
}
-
/**
* cairo_rotate:
* @cr: a cairo context
diff --git a/src/cairo.h b/src/cairo.h
index ecda958..5b2b4ed 100644
--- a/src/cairo.h
+++ b/src/cairo.h
@@ -386,7 +386,6 @@ cairo_set_fill_rule (cairo_t *cr, cairo_
cairo_public void
cairo_set_line_width (cairo_t *cr, double width);
-
/**
* cairo_line_cap_t
* @CAIRO_LINE_CAP_BUTT: start(stop) the line exactly at the start(end) point
@@ -852,7 +851,6 @@ cairo_font_options_set_hint_metrics (cai
cairo_public cairo_hint_metrics_t
cairo_font_options_get_hint_metrics (const cairo_font_options_t *options);
-
/* This interface is for dealing with text as text, not caring about the
font object inside the the cairo_t. */
@@ -1620,7 +1618,6 @@ cairo_debug_reset_static_data (void);
#define cairo_xcb_surface_create_for_pixmap_with_visual cairo_xcb_surface_create_for_pixmap_with_visual_REPLACED_BY_cairo_xcb_surface_create
#define cairo_xcb_surface_create_for_window_with_visual cairo_xcb_surface_create_for_window_with_visual_REPLACED_BY_cairo_xcb_surface_create
-
#define cairo_current_path cairo_current_path_DEPRECATED_BY_cairo_copy_path
#define cairo_current_path_flat cairo_current_path_flat_DEPRECATED_BY_cairo_copy_path_flat
#define cairo_get_path cairo_get_path_DEPRECATED_BY_cairo_copy_path
diff --git a/src/cairoint.h b/src/cairoint.h
index 0e205b4..3a9c993 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -159,7 +159,6 @@ cairo_private void _cairo_beos_unlock(vo
# define CAIRO_MUTEX_UNLOCK(name) _cairo_beos_unlock (&name)
#endif
-
#ifndef CAIRO_MUTEX_DECLARE
# error "No mutex declarations. Cairo will not work with multiple threads." \
"(Remove this #error directive to acknowledge & accept this limitation)."
@@ -338,7 +337,6 @@ _cairo_box_round_to_rectangle (cairo_box
cairo_private void
_cairo_rectangle_intersect (cairo_rectangle_fixed_t *dest, cairo_rectangle_fixed_t *src);
-
/* cairo_array.c structures and functions */
typedef struct _cairo_array cairo_array_t;
@@ -894,7 +892,6 @@ struct _cairo_image_surface {
cairo_bool_t owns_data;
cairo_bool_t has_clip;
-
int width;
int height;
int stride;
@@ -2200,7 +2197,6 @@ typedef cairo_status_t (*cairo_write_fun
*/
typedef cairo_status_t (*cairo_close_func_t) (void *closure);
-
/* This function never returns NULL. If an error occurs (NO_MEMORY)
* while trying to create the output stream this function returns a
* valid pointer to a nil output stream.
diff --git a/test/buffer-diff.c b/test/buffer-diff.c
index e0f42da..ff4935e 100644
--- a/test/buffer-diff.c
+++ b/test/buffer-diff.c
@@ -52,7 +52,6 @@ xunlink (const char *pathname)
}
}
-
/* This function should be rewritten to compare all formats supported by
* cairo_format_t instead of taking a mask as a parameter.
*/
diff --git a/test/buffer-diff.h b/test/buffer-diff.h
index 7394a2f..2be2b39 100644
--- a/test/buffer-diff.h
+++ b/test/buffer-diff.h
@@ -54,7 +54,6 @@ buffer_diff_noalpha (unsigned char *buf_
int stride_b,
int stride_diff);
-
/* Returns number of pixels changed, (or -1 on error).
* Also saves a "diff" image intended to visually show where the
* images differ.
@@ -78,5 +77,4 @@ image_diff_flattened (const char *filena
int bx,
int by);
-
#endif
diff --git a/test/cairo-test-directfb.c b/test/cairo-test-directfb.c
index c2cf021..2a1f3d1 100644
--- a/test/cairo-test-directfb.c
+++ b/test/cairo-test-directfb.c
@@ -1,4 +1,3 @@
-
/*
Test were run with the following script
target can be directfb_bitmap or directfb
@@ -8,7 +7,6 @@ export DFBARGS=quiet,no-banner,no-debug,
cd cairo/test
make check
-
*/
#include <stdio.h>
@@ -43,7 +41,6 @@ static DFBInfo *init(void) {
if( !info )
return NULL;
-
DFBCHECK(DirectFBInit( NULL,NULL));
DFBCHECK(DirectFBCreate( &info->dfb ));
info->dfb->GetDeviceDescription(info->dfb, &desc );
@@ -61,7 +58,6 @@ static DFBInfo *init(void) {
return info;
}
-
cairo_surface_t *
create_directfb_surface (cairo_test_t* test, cairo_format_t format,
void **closure) {
diff --git a/test/cairo-test.c b/test/cairo-test.c
index 1072c77..3005638 100644
--- a/test/cairo-test.c
+++ b/test/cairo-test.c
@@ -451,7 +451,6 @@ create_glitz_glx_surface (glitz_format_n
goto DESTROY_WINDOW;
}
-
format = glitz_find_standard_format (drawable, formatname);
if (!format)
goto DESTROY_DRAWABLE;
@@ -1529,7 +1528,6 @@ cairo_test_for_target (cairo_test_t *tes
goto UNWIND_SURFACE;
}
-
cairo_surface_set_device_offset (surface, dev_offset, dev_offset);
cr = cairo_create (surface);
diff --git a/test/font-face-get-type.c b/test/font-face-get-type.c
index 31dccd3..86f5769 100644
--- a/test/font-face-get-type.c
+++ b/test/font-face-get-type.c
@@ -58,7 +58,3 @@ main (void)
return CAIRO_TEST_SUCCESS;
}
-
-
-
-
diff --git a/test/push-group.c b/test/push-group.c
index e88c145..58294e1 100644
--- a/test/push-group.c
+++ b/test/push-group.c
@@ -23,10 +23,8 @@
* Author: Vladimir Vukicevic <vladimir at pobox.com>
*/
-
#include "cairo-test.h"
-
#define UNIT_SIZE 100
#define PAD 5
#define INNER_PAD 10
diff --git a/test/read-png.c b/test/read-png.c
index ff311c2..f5d80b5 100644
--- a/test/read-png.c
+++ b/test/read-png.c
@@ -145,7 +145,6 @@ read_png_argb32 (const char *fil
*height = png_height;
*stride = 4 * png_width;
-
/* convert palette/gray image to rgb */
if (color_type == PNG_COLOR_TYPE_PALETTE)
png_set_palette_to_rgb (png);
diff --git a/test/surface-finish-twice.c b/test/surface-finish-twice.c
index ad6c0e9..30103bd 100644
--- a/test/surface-finish-twice.c
+++ b/test/surface-finish-twice.c
@@ -73,4 +73,3 @@ main (void)
{
return cairo_test (&test, draw);
}
-
diff --git a/test/text-cache-crash.c b/test/text-cache-crash.c
index 08e8573..a1d73e6 100644
--- a/test/text-cache-crash.c
+++ b/test/text-cache-crash.c
@@ -120,4 +120,3 @@ main (void)
return ret;
}
-
diff --git a/test/xmalloc.c b/test/xmalloc.c
index f5721c5..e98541c 100644
--- a/test/xmalloc.c
+++ b/test/xmalloc.c
@@ -56,4 +56,3 @@ xcalloc (size_t nmemb, size_t size)
return buf;
}
-
diff-tree 5278de09973c3e41028dc80a8862db01fc70cf11 (from 00592e075754594605fddfb2a702f3d2caa7c55c)
Author: Carl Worth <cworth at cworth.org>
Date: Tue Jun 6 15:41:31 2006 -0700
Remove all remaining trailing whitespace.
This patch was produced with the following (GNU) sed script:
sed -i -r -e 's/[ \t]+$//'
run on all *.[ch] files within cairo.
Note that the above script would have also created all the changes
from the previous commits to remove trailing whitespace.
diff --git a/doc/tutorial/src/include/cairo-tutorial-gtk.h b/doc/tutorial/src/include/cairo-tutorial-gtk.h
index 8a820f3..e944553 100644
--- a/doc/tutorial/src/include/cairo-tutorial-gtk.h
+++ b/doc/tutorial/src/include/cairo-tutorial-gtk.h
@@ -45,13 +45,13 @@ gdk_cairo_create (GdkDrawable *drawable)
GdkVisual *visual = gdk_drawable_get_visual (drawable);
gdk_drawable_get_size (drawable, &width, &height);
- if (visual)
+ if (visual)
surface = cairo_xlib_surface_create (GDK_DRAWABLE_XDISPLAY (drawable),
GDK_DRAWABLE_XID (drawable),
GDK_VISUAL_XVISUAL (visual),
width, height);
else if (gdk_drawable_get_depth (drawable) == 1)
- surface = cairo_xlib_surface_create_for_bitmap
+ surface = cairo_xlib_surface_create_for_bitmap
(GDK_PIXMAP_XDISPLAY (drawable),
GDK_PIXMAP_XID (drawable),
GDK_SCREEN_XSCREEN (gdk_drawable_get_screen (drawable)),
@@ -101,7 +101,7 @@ handle_key_press (GtkWidget *widget,
return FALSE;
}
-int
+int
main (int argc, char **argv)
{
GtkWidget *window, *drawing_area;
diff --git a/doc/tutorial/src/include/cairo-tutorial-pdf.h b/doc/tutorial/src/include/cairo-tutorial-pdf.h
index c65b7e4..4c89590 100644
--- a/doc/tutorial/src/include/cairo-tutorial-pdf.h
+++ b/doc/tutorial/src/include/cairo-tutorial-pdf.h
@@ -35,7 +35,7 @@
static void
draw (cairo_t *cr, int width, int height);
-int
+int
main (int argc, char **argv)
{
cairo_surface_t *surface;
diff --git a/doc/tutorial/src/include/cairo-tutorial-png.h b/doc/tutorial/src/include/cairo-tutorial-png.h
index 837dc37..9e15d4c 100644
--- a/doc/tutorial/src/include/cairo-tutorial-png.h
+++ b/doc/tutorial/src/include/cairo-tutorial-png.h
@@ -34,7 +34,7 @@
static void
draw (cairo_t *cr, int width, int height);
-int
+int
main (int argc, char **argv)
{
cairo_surface_t *surface;
diff --git a/pixman/src/fbcompose.c b/pixman/src/fbcompose.c
index f8aa3a3..8d20039 100644
--- a/pixman/src/fbcompose.c
+++ b/pixman/src/fbcompose.c
@@ -224,7 +224,7 @@ fbFetch_r5g6b5 (const FbBits *bits, int
const CARD16 *end = pixel + width;
while (pixel < end) {
CARD32 p = *pixel++;
- CARD32 r = (((p) << 3) & 0xf8) |
+ CARD32 r = (((p) << 3) & 0xf8) |
(((p) << 5) & 0xfc00) |
(((p) << 8) & 0xf80000);
r |= (r >> 5) & 0x70007;
diff --git a/pixman/src/fbmmx.c b/pixman/src/fbmmx.c
index 8ff9f9f..4b5e5dd 100644
--- a/pixman/src/fbmmx.c
+++ b/pixman/src/fbmmx.c
@@ -304,7 +304,7 @@ expand565 (__m64 pixel, int pos)
__m64 t1, t2;
/* move pixel to low 16 bit and zero the rest */
- p = shift (shift (p, (3 - pos) * 16), -48);
+ p = shift (shift (p, (3 - pos) * 16), -48);
t1 = shift (p, 36 - 11);
t2 = shift (p, 16 - 5);
@@ -753,7 +753,7 @@ mmxCombineAtopC (CARD32 *dest, CARD32 *s
__m64 s = load8888(*src);
__m64 d = load8888(*dest);
__m64 da = expand_alpha(d);
- __m64 sa = expand_alpha(s);
+ __m64 sa = expand_alpha(s);
s = pix_multiply(s, a);
a = pix_multiply(a, sa);
a = negate(a);
@@ -1214,7 +1214,7 @@ fbCompositeSrc_8888x8x8888mmx (pixman_op
}
}
- _mm_empty();
+ _mm_empty();
}
void
@@ -1349,7 +1349,7 @@ fbCompositeSrc_x888x8x8888mmx (pixman_op
}
}
- _mm_empty();
+ _mm_empty();
}
void
diff --git a/pixman/src/fbpict.c b/pixman/src/fbpict.c
index 2cfbeb8..3c032c1 100644
--- a/pixman/src/fbpict.c
+++ b/pixman/src/fbpict.c
@@ -1907,7 +1907,7 @@ slim_hidden_def(pixman_composite);
enum CPUFeatures {
NoFeatures = 0,
MMX = 0x1,
- MMX_Extensions = 0x2,
+ MMX_Extensions = 0x2,
SSE = 0x6,
SSE2 = 0x8,
CMOV = 0x10
@@ -1952,9 +1952,9 @@ static unsigned int detectCPUFeatures(vo
"pop %%ebx\n"
"1:\n"
"mov %%edx, %0\n"
- : "=r" (result),
- "=m" (vendor[0]),
- "=m" (vendor[4]),
+ : "=r" (result),
+ "=m" (vendor[0]),
+ "=m" (vendor[4]),
"=m" (vendor[8])
:
: "%eax", "%ecx", "%edx"
@@ -1974,7 +1974,7 @@ static unsigned int detectCPUFeatures(vo
if ((result & MMX) && !(result & SSE) && (strcmp(vendor, "AuthenticAMD") == 0)) {
/* check for AMD MMX extensions */
- unsigned int result;
+ unsigned int result;
__asm__("push %%ebx\n"
"mov $0x80000000, %%eax\n"
"cpuid\n"
diff --git a/pixman/src/icblt.c b/pixman/src/icblt.c
index cbd33c3..4f0c98e 100644
--- a/pixman/src/icblt.c
+++ b/pixman/src/icblt.c
@@ -45,7 +45,7 @@ fbBlt (FbBits *srcLine,
FbStride dstStride,
int dstX,
- int width,
+ int width,
int height,
int alu,
@@ -239,7 +239,7 @@ fbBlt (FbBits *srcLine,
bits1 = *--src;
if (endmask)
{
- bits = FbScrRight(bits1, rightShift);
+ bits = FbScrRight(bits1, rightShift);
if (FbScrRight(endmask, leftShift))
{
bits1 = *--src;
@@ -253,7 +253,7 @@ fbBlt (FbBits *srcLine,
{
while (n--)
{
- bits = FbScrRight(bits1, rightShift);
+ bits = FbScrRight(bits1, rightShift);
bits1 = *--src;
bits |= FbScrLeft(bits1, leftShift);
--dst;
@@ -264,7 +264,7 @@ fbBlt (FbBits *srcLine,
{
while (n--)
{
- bits = FbScrRight(bits1, rightShift);
+ bits = FbScrRight(bits1, rightShift);
bits1 = *--src;
bits |= FbScrLeft(bits1, leftShift);
--dst;
@@ -273,7 +273,7 @@ fbBlt (FbBits *srcLine,
}
if (startmask)
{
- bits = FbScrRight(bits1, rightShift);
+ bits = FbScrRight(bits1, rightShift);
if (FbScrRight(startmask, leftShift))
{
bits1 = *--src;
@@ -289,7 +289,7 @@ fbBlt (FbBits *srcLine,
bits1 = *src++;
if (startmask)
{
- bits = FbScrLeft(bits1, leftShift);
+ bits = FbScrLeft(bits1, leftShift);
bits1 = *src++;
bits |= FbScrRight(bits1, rightShift);
FbDoLeftMaskByteMergeRop (dst, bits, startbyte, startmask);
@@ -300,7 +300,7 @@ fbBlt (FbBits *srcLine,
{
while (n--)
{
- bits = FbScrLeft(bits1, leftShift);
+ bits = FbScrLeft(bits1, leftShift);
bits1 = *src++;
bits |= FbScrRight(bits1, rightShift);
*dst = FbDoDestInvarientMergeRop(bits);
@@ -311,7 +311,7 @@ fbBlt (FbBits *srcLine,
{
while (n--)
{
- bits = FbScrLeft(bits1, leftShift);
+ bits = FbScrLeft(bits1, leftShift);
bits1 = *src++;
bits |= FbScrRight(bits1, rightShift);
*dst = FbDoMergeRop(bits, *dst);
@@ -320,7 +320,7 @@ fbBlt (FbBits *srcLine,
}
if (endmask)
{
- bits = FbScrLeft(bits1, leftShift);
+ bits = FbScrLeft(bits1, leftShift);
if (FbScrLeft(endmask, rightShift))
{
bits1 = *src;
@@ -480,7 +480,7 @@ fbBlt24Line (FbBits *src,
bits1 = *--src;
if (endmask)
{
- bits = FbScrRight(bits1, rightShift);
+ bits = FbScrRight(bits1, rightShift);
if (FbScrRight(endmask, leftShift))
{
bits1 = *--src;
@@ -492,7 +492,7 @@ fbBlt24Line (FbBits *src,
}
while (n--)
{
- bits = FbScrRight(bits1, rightShift);
+ bits = FbScrRight(bits1, rightShift);
bits1 = *--src;
bits |= FbScrLeft(bits1, leftShift);
--dst;
@@ -501,7 +501,7 @@ fbBlt24Line (FbBits *src,
}
if (startmask)
{
- bits = FbScrRight(bits1, rightShift);
+ bits = FbScrRight(bits1, rightShift);
if (FbScrRight(startmask, leftShift))
{
bits1 = *--src;
@@ -517,7 +517,7 @@ fbBlt24Line (FbBits *src,
bits1 = *src++;
if (startmask)
{
- bits = FbScrLeft(bits1, leftShift);
+ bits = FbScrLeft(bits1, leftShift);
bits1 = *src++;
bits |= FbScrRight(bits1, rightShift);
*dst = FbDoMaskMergeRop (bits, *dst, mask & startmask);
@@ -526,7 +526,7 @@ fbBlt24Line (FbBits *src,
}
while (n--)
{
- bits = FbScrLeft(bits1, leftShift);
+ bits = FbScrLeft(bits1, leftShift);
bits1 = *src++;
bits |= FbScrRight(bits1, rightShift);
*dst = FbDoMaskMergeRop(bits, *dst, mask);
@@ -535,7 +535,7 @@ fbBlt24Line (FbBits *src,
}
if (endmask)
{
- bits = FbScrLeft(bits1, leftShift);
+ bits = FbScrLeft(bits1, leftShift);
if (FbScrLeft(endmask, rightShift))
{
bits1 = *src;
@@ -572,7 +572,7 @@ fbBlt24 (FbBits *srcLine,
FbStride dstStride,
int dstX,
- int width,
+ int width,
int height,
int alu,
@@ -880,7 +880,7 @@ fbBltStip (FbStip *src,
FbStride dstStride, /* in FbStip units, not FbBits units */
int dstX,
- int width,
+ int width,
int height,
int alu,
@@ -939,10 +939,10 @@ fbBltStip (FbStip *src,
else
#endif
{
- fbBlt ((FbBits *) src, FbStipStrideToBitsStride (srcStride),
- srcX,
- (FbBits *) dst, FbStipStrideToBitsStride (dstStride),
- dstX,
+ fbBlt ((FbBits *) src, FbStipStrideToBitsStride (srcStride),
+ srcX,
+ (FbBits *) dst, FbStipStrideToBitsStride (dstStride),
+ dstX,
width, height,
alu, pm, bpp, FALSE, FALSE);
}
diff --git a/pixman/src/icbltone.c b/pixman/src/icbltone.c
index 022d498..210061a 100644
--- a/pixman/src/icbltone.c
+++ b/pixman/src/icbltone.c
@@ -111,7 +111,7 @@ static uint8_t const fb8Lane[16] = {
};
static uint8_t const fb16Lane[16] = {
- 0, 3, 12, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 3, 12, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
static uint8_t const fb32Lane[16] = {
@@ -209,7 +209,7 @@ fbBltOne (FbStip *src,
srcX &= FB_STIP_MASK;
dstX &= FB_MASK;
- FbMaskBitsBytes(dstX, width, copy,
+ FbMaskBitsBytes(dstX, width, copy,
startmask, startbyte, nmiddle, endmask, endbyte);
/*
@@ -300,7 +300,7 @@ fbBltOne (FbStip *src,
else
#endif
mask = fbBits[FbLeftStipBits(bits,pixelsPerDst)];
-#ifndef FBNOPIXADDR
+#ifndef FBNOPIXADDR
if (fbLane)
{
fbTransparentSpan (dst, mask & startmask, fgxor, 1);
@@ -407,7 +407,7 @@ fbBltOne (FbStip *src,
#endif
{
if (mask || !transparent)
- FbDoRightMaskByteStippleRRop (dst, mask,
+ FbDoRightMaskByteStippleRRop (dst, mask,
fgand, fgxor, bgand, bgxor,
endbyte, endmask);
}
diff --git a/pixman/src/icformat.c b/pixman/src/icformat.c
index 033b65a..f133283 100644
--- a/pixman/src/icformat.c
+++ b/pixman/src/icformat.c
@@ -110,7 +110,7 @@ pixman_format_init (pixman_format_t *for
PICT_FORMAT_B(format_code));
format->redMask = Mask(PICT_FORMAT_R(format_code));
- format->red = (PICT_FORMAT_G(format_code) +
+ format->red = (PICT_FORMAT_G(format_code) +
PICT_FORMAT_B(format_code));
format->greenMask = Mask(PICT_FORMAT_G(format_code));
@@ -129,7 +129,7 @@ pixman_format_init (pixman_format_t *for
PICT_FORMAT_R(format_code));
format->blueMask = Mask(PICT_FORMAT_B(format_code));
- format->blue = (PICT_FORMAT_G(format_code) +
+ format->blue = (PICT_FORMAT_G(format_code) +
PICT_FORMAT_R(format_code));
format->greenMask = Mask(PICT_FORMAT_G(format_code));
diff --git a/pixman/src/icimage.c b/pixman/src/icimage.c
index 5425f65..a9e9289 100644
--- a/pixman/src/icimage.c
+++ b/pixman/src/icimage.c
@@ -613,11 +613,11 @@ FbClipImageSrc (pixman_region16_t *regio
if (image->compositeClipSource &&
image->clientClipType != CT_NONE)
{
- pixman_region_translate (region,
+ pixman_region_translate (region,
dx - image->clipOrigin.x,
dy - image->clipOrigin.y);
pixman_region_intersect (region, image->clientClip, region);
- pixman_region_translate (region,
+ pixman_region_translate (region,
- (dx - image->clipOrigin.x),
- (dy - image->clipOrigin.y));
}
@@ -812,7 +812,7 @@ SetPictureClipRects (PicturePtr pPicture
nRect, rects, CT_UNSORTED);
if (!clientClip)
return 1;
- result =(*ps->ChangePictureClip) (pPicture, CT_REGION,
+ result =(*ps->ChangePictureClip) (pPicture, CT_REGION,
(void *) clientClip, 0);
if (result == 0)
{
diff --git a/pixman/src/icimage.h b/pixman/src/icimage.h
index 0d50e1f..868ed66 100644
--- a/pixman/src/icimage.h
+++ b/pixman/src/icimage.h
@@ -35,7 +35,7 @@
/*
typedef struct _IndexFormat {
- VisualPtr pVisual;
+ VisualPtr pVisual;
ColormapPtr pColormap;
int nvalues;
xIndexValue *pValues;
diff --git a/pixman/src/icint.h b/pixman/src/icint.h
index d45f632..e7f1de3 100644
--- a/pixman/src/icint.h
+++ b/pixman/src/icint.h
@@ -590,7 +590,7 @@ extern void fbSetBits (FbStip *bits, int
* icblt.c
*/
pixman_private void
-fbBlt (pixman_bits_t *src,
+fbBlt (pixman_bits_t *src,
FbStride srcStride,
int srcX,
@@ -598,7 +598,7 @@ fbBlt (pixman_bits_t *src,
FbStride dstStride,
int dstX,
- int width,
+ int width,
int height,
int alu,
@@ -617,7 +617,7 @@ fbBlt24 (pixman_bits_t *srcLine,
FbStride dstStride,
int dstX,
- int width,
+ int width,
int height,
int alu,
@@ -635,7 +635,7 @@ fbBltStip (FbStip *src,
FbStride dstStride, /* in FbStip units, not FbBits units */
int dstX,
- int width,
+ int width,
int height,
int alu,
diff --git a/pixman/src/icrect.c b/pixman/src/icrect.c
index 959699a..7027d22 100644
--- a/pixman/src/icrect.c
+++ b/pixman/src/icrect.c
@@ -123,7 +123,7 @@ pixman_fill_rect_8bpp (pixman_image_t *d
static void
pixman_fill_rect_32bpp (pixman_image_t *dst,
int16_t xDst,
- int16_t yDst,
+ int16_t yDst,
uint16_t width,
uint16_t height,
pixman_bits_t *pixel)
@@ -210,11 +210,11 @@ pixman_color_rects (pixman_image_t *dst
pixman_region_intersect (clip, clip, clipPict->pCompositeClip);
if (clipPict->alphaMap)
{
- pixman_region_translate (clip,
+ pixman_region_translate (clip,
-clipPict->alphaOrigin.x,
-clipPict->alphaOrigin.y);
pixman_region_intersect (clip, clip, clipPict->alphaMap->pCompositeClip);
- pixman_region_translate (clip,
+ pixman_region_translate (clip,
clipPict->alphaOrigin.x,
clipPict->alphaOrigin.y);
}
@@ -248,14 +248,14 @@ pixman_color_rects (pixman_image_t *dst
func = pixman_fill_rect_32bpp;
else if (dst->pixels->bpp == 1)
func = pixman_fill_rect_1bpp;
- else
+ else
func = pixman_fill_rect_general;
for (i = 0; i < n_clipped_rects; i++) {
(*func) (dst,
- clipped_rects[i].x1,
- clipped_rects[i].y1,
- clipped_rects[i].x2 - clipped_rects[i].x1,
+ clipped_rects[i].x1,
+ clipped_rects[i].y1,
+ clipped_rects[i].x2 - clipped_rects[i].x1,
clipped_rects[i].y2 - clipped_rects[i].y1,
&pixel);
}
@@ -350,7 +350,7 @@ pixman_fill_rectangles (pixman_operator_
while (nRects--)
{
- pixman_composite (op, src, NULL, dst, 0, 0, 0, 0,
+ pixman_composite (op, src, NULL, dst, 0, 0, 0, 0,
rects->x,
rects->y,
rects->width,
diff --git a/pixman/src/ictransform.c b/pixman/src/ictransform.c
index 6e82161..c7358bf 100644
--- a/pixman/src/ictransform.c
+++ b/pixman/src/ictransform.c
@@ -40,7 +40,7 @@ pixman_transform_point (pixman_transform
v = 0;
for (i = 0; i < 3; i++)
{
- partial = ((xFixed_48_16) transform->matrix[j][i] *
+ partial = ((xFixed_48_16) transform->matrix[j][i] *
(xFixed_48_16) vector->vector[i]);
v += partial >> 16;
}
diff --git a/pixman/src/ictrap.c b/pixman/src/ictrap.c
index 68b4750..5a33ab8 100644
--- a/pixman/src/ictrap.c
+++ b/pixman/src/ictrap.c
@@ -46,7 +46,7 @@ FbCreateAlphaPicture (pixman_image_t *ds
}
/* pixman_image_create zeroes out the pixels, so we don't have to */
- image = pixman_image_create (format, width, height);
+ image = pixman_image_create (format, width, height);
if (own_format)
pixman_format_destroy (format);
@@ -174,7 +174,7 @@ pixman_composite_trapezoids (pixman_oper
{
if (!xTrapezoidValid(traps))
continue;
- fbRasterizeTrapezoid (image, traps,
+ fbRasterizeTrapezoid (image, traps,
-bounds.x1, -bounds.y1);
}
diff --git a/pixman/src/ictri.c b/pixman/src/ictri.c
index f612966..d3d5faa 100644
--- a/pixman/src/ictri.c
+++ b/pixman/src/ictri.c
@@ -252,7 +252,7 @@ pixman_composite_tri_strip (pixman_opera
if (bounds.x2 <= bounds.x1 || bounds.y2 <= bounds.y1)
continue;
image = FbCreateAlphaPicture (dst,
- format,
+ format,
bounds.x2 - bounds.x1,
bounds.y2 - bounds.y1);
if (!image)
@@ -332,7 +332,7 @@ pixman_composite_tri_fan (pixman_operato
if (bounds.x2 <= bounds.x1 || bounds.y2 <= bounds.y1)
continue;
image = FbCreateAlphaPicture (dst,
- format,
+ format,
bounds.x2 - bounds.x1,
bounds.y2 - bounds.y1);
if (!image)
diff --git a/pixman/src/pixman-xserver-compat.h b/pixman/src/pixman-xserver-compat.h
index 5113abd..ee2cca5 100644
--- a/pixman/src/pixman-xserver-compat.h
+++ b/pixman/src/pixman-xserver-compat.h
@@ -69,7 +69,7 @@ typedef pixman_triangle_t xTriangle;
*/
#define RENDER 1
/*
-#define FB_SHIFT IC_SHIFT
+#define FB_SHIFT IC_SHIFT
#define FB_MASK IC_MASK
#define FB_ALLONES IC_ALLONES
#define FbMaskBits IcMaskBits
diff --git a/pixman/src/pixman.h b/pixman/src/pixman.h
index 00884e7..28dc30a 100644
--- a/pixman/src/pixman.h
+++ b/pixman/src/pixman.h
@@ -37,13 +37,13 @@ Copyright 1987 by Digital Equipment Corp
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/pixman/src/pixregion.c b/pixman/src/pixregion.c
index 9ecd04a..a474161 100644
--- a/pixman/src/pixregion.c
+++ b/pixman/src/pixregion.c
@@ -23,18 +23,18 @@ used in advertising or otherwise to prom
in this Software without prior written authorization from The Open Group.
-Copyright 1987, 1988, 1989 by
-Digital Equipment Corporation, Maynard, Massachusetts.
+Copyright 1987, 1988, 1989 by
+Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
@@ -451,7 +451,7 @@ pixman_region_copy(pixman_region16_t *ds
dst->data->size = src->data->numRects;
}
dst->data->numRects = src->data->numRects;
- memmove((char *)PIXREGION_BOXPTR(dst),(char *)PIXREGION_BOXPTR(src),
+ memmove((char *)PIXREGION_BOXPTR(dst),(char *)PIXREGION_BOXPTR(src),
dst->data->numRects * sizeof(pixman_box16_t));
return PIXMAN_REGION_STATUS_SUCCESS;
}
@@ -1335,7 +1335,7 @@ pixman_region_append(dstrgn, rgn)
if (dnumRects == 1)
*new = *PIXREGION_BOXPTR(dstrgn);
else
- memmove((char *)new,(char *)PIXREGION_BOXPTR(dstrgn),
+ memmove((char *)new,(char *)PIXREGION_BOXPTR(dstrgn),
dnumRects * sizeof(pixman_box16_t));
new = PIXREGION_BOXPTR(dstrgn);
}
@@ -1869,9 +1869,9 @@ pixman_region_subtractO (
*/
pixman_region_status_t
pixman_region_subtract(regD, regM, regS)
- pixman_region16_t * regD;
+ pixman_region16_t * regD;
pixman_region16_t * regM;
- pixman_region16_t * regS;
+ pixman_region16_t * regS;
{
int overlap; /* result ignored */
@@ -2176,7 +2176,7 @@ pixman_region16_data_copy(pixman_region1
{
good(dst);
good(src);
- if (dst->data)
+ if (dst->data)
return PIXMAN_REGION_STATUS_SUCCESS;
if (dst == src)
return PIXMAN_REGION_STATUS_SUCCESS;
diff --git a/pixman/src/pixregionint.h b/pixman/src/pixregionint.h
index e47c455..8a902ad 100644
--- a/pixman/src/pixregionint.h
+++ b/pixman/src/pixregionint.h
@@ -27,13 +27,13 @@ Copyright 1987 by Digital Equipment Corp
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
+software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
diff --git a/pixman/src/slim_internal.h b/pixman/src/slim_internal.h
index 24b947a..742059c 100644
--- a/pixman/src/slim_internal.h
+++ b/pixman/src/slim_internal.h
@@ -30,7 +30,7 @@
/* This macro marks a symbol as STV_HIDDEN, which prevents it from being
added to the dynamic symbol table of the shared library. This prevents
users of the library from knowingly or unknowingly accessing library
- internals that may change in future releases. It also allows the
+ internals that may change in future releases. It also allows the
compiler to generate slightly more efficient code in some cases.
The macro should be placed either immediately before the return type in
diff --git a/src/cairo-atsui-font.c b/src/cairo-atsui-font.c
index c94f178..e4bf30f 100644
--- a/src/cairo-atsui-font.c
+++ b/src/cairo-atsui-font.c
@@ -370,9 +370,9 @@ _cairo_atsui_font_init_glyph_metrics (ca
extents.x_bearing = metricsH.sideBearing.x;
extents.y_bearing = metricsV.advance.y;
- extents.width =
+ extents.width =
metricsH.advance.x - metricsH.sideBearing.x - metricsH.otherSideBearing.x;
- extents.height =
+ extents.height =
-metricsV.advance.y - metricsV.sideBearing.y - metricsV.otherSideBearing.y;
extents.x_advance = metricsH.advance.x;
extents.y_advance = 0;
@@ -384,7 +384,7 @@ _cairo_atsui_font_init_glyph_metrics (ca
return CAIRO_STATUS_SUCCESS;
}
-static OSStatus
+static OSStatus
_move_to (const Float32Point *point,
void *callback_data)
{
@@ -398,7 +398,7 @@ _move_to (const Float32Point *point,
return noErr;
}
-static OSStatus
+static OSStatus
_line_to (const Float32Point *point,
void *callback_data)
{
@@ -441,7 +441,7 @@ _close_path (void *callback_data)
return noErr;
}
-static cairo_status_t
+static cairo_status_t
_cairo_atsui_scaled_font_init_glyph_path (cairo_atsui_font_t *scaled_font,
cairo_scaled_glyph_t *scaled_glyph)
{
@@ -498,12 +498,12 @@ _cairo_atsui_font_scaled_glyph_init (voi
return CAIRO_STATUS_SUCCESS;
}
-static cairo_int_status_t
+static cairo_int_status_t
_cairo_atsui_font_text_to_glyphs (void *abstract_font,
double x,
double y,
const char *utf8,
- cairo_glyph_t **glyphs,
+ cairo_glyph_t **glyphs,
int *num_glyphs)
{
cairo_status_t status = CAIRO_STATUS_SUCCESS;
@@ -549,7 +549,7 @@ _cairo_atsui_font_text_to_glyphs (void
free (utf16);
- ATSUDirectReleaseLayoutDataArrayPtr(NULL,
+ ATSUDirectReleaseLayoutDataArrayPtr(NULL,
kATSUDirectDataLayoutRecordATSLayoutRecordCurrent,
(void *) &layoutRecords);
ATSUDisposeTextLayout(textLayout);
@@ -557,7 +557,7 @@ _cairo_atsui_font_text_to_glyphs (void
return CAIRO_STATUS_SUCCESS;
}
-static cairo_int_status_t
+static cairo_int_status_t
_cairo_atsui_font_old_show_glyphs (void *abstract_font,
cairo_operator_t op,
cairo_pattern_t *pattern,
diff --git a/src/cairo-clip.c b/src/cairo-clip.c
index d14dd2f..0e3e6fa 100644
--- a/src/cairo-clip.c
+++ b/src/cairo-clip.c
@@ -218,7 +218,7 @@ _cairo_clip_combine_to_surface (cairo_cl
NULL,
dst,
extents->x - clip->surface_rect.x,
- extents->y - clip->surface_rect.y,
+ extents->y - clip->surface_rect.y,
0, 0,
extents->x - dst_x,
extents->y - dst_y,
@@ -312,7 +312,7 @@ _cairo_clip_intersect_region (cairo_clip
} else {
pixman_region16_t *intersection = pixman_region_create();
- if (pixman_region_intersect (intersection,
+ if (pixman_region_intersect (intersection,
clip->region, region)
== PIXMAN_REGION_STATUS_SUCCESS) {
pixman_region_destroy (clip->region);
diff --git a/src/cairo-directfb-surface.c b/src/cairo-directfb-surface.c
index 11bd3f4..46e8cc8 100644
--- a/src/cairo-directfb-surface.c
+++ b/src/cairo-directfb-surface.c
@@ -39,7 +39,7 @@
#include "cairoint.h"
#define DFB_UNSUPPORTED -1
-#define DFB_SUPPORTED 1
+#define DFB_SUPPORTED 1
/*
Glyph support not working
@@ -51,7 +51,7 @@ Composite support not working
#define DFB_COMPOSITE 0
-#if DFB_SHOW_GLYPHS
+#if DFB_SHOW_GLYPHS
static cairo_int_status_t
_cairo_directfb_surface_show_glyphs (cairo_scaled_font_t *scaled_font,
cairo_operator_t operator,
@@ -128,7 +128,7 @@ _dfb_set_operator (cairo_operator_t oper
case CAIRO_OPERATOR_ADD:
return DFB_UNSUPPORTED;
break;
- case CAIRO_OPERATOR_SATURATE:
+ case CAIRO_OPERATOR_SATURATE:
return DFB_UNSUPPORTED;
break;
default:
@@ -143,15 +143,15 @@ static inline int cairo_to_directfb_form
case CAIRO_FORMAT_RGB24:
return DSPF_RGB24;
case CAIRO_FORMAT_ARGB32:
- return DSPF_ARGB;
+ return DSPF_ARGB;
case CAIRO_FORMAT_A8:
- return DSPF_A8;
+ return DSPF_A8;
case CAIRO_FORMAT_A1:
- return DSPF_A1;
+ return DSPF_A1;
default:
{
/*assert(0);*/
- return DSPF_UNKNOWN;
+ return DSPF_UNKNOWN;
}
}
}
@@ -195,7 +195,7 @@ static IDirectFBSurface *cairo_directfb_
IDirectFBSurface *buffer;
DFBSurfaceDescription dsc;
- dsc.flags = DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT;
+ dsc.flags = DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT;
dsc.caps = DSCAPS_NONE;
dsc.width = width;
dsc.height = height;
@@ -244,11 +244,11 @@ _cairo_directfb_surface_get_image (cairo
void *data;
(void)interest;
- if( surface->buffer->Lock(surface->buffer,flags,&data,&pitch) != DFB_OK )
+ if( surface->buffer->Lock(surface->buffer,flags,&data,&pitch) != DFB_OK )
return CAIRO_STATUS_NO_MEMORY;
/*lock the dest agianst other changes*/
- if( surface->buffer_image ) {
+ if( surface->buffer_image ) {
if( surface->buffer_data == data ) {
cairo_surface_reference(surface->buffer_image);
}
@@ -276,7 +276,7 @@ _cairo_directfb_surface_get_image (cairo
surface->format = CAIRO_FORMAT_ARGB32;
surface->buffer = cairo_directfb_buffer_surface_create(surface->dfb,NULL,
0,DSPF_ARGB,width,height);
- if( !surface->buffer )
+ if( !surface->buffer )
return CAIRO_STATUS_NO_MEMORY;
/*Have to flip the main surface if its double buffered to blit the buffer*/
surface->main_surface->Flip(surface->main_surface,NULL,0);
@@ -288,7 +288,7 @@ _cairo_directfb_surface_get_image (cairo
surface->width=width;
surface->height=height;
- if( surface->buffer->Lock(surface->buffer,flags,&data,&pitch) != DFB_OK )
+ if( surface->buffer->Lock(surface->buffer,flags,&data,&pitch) != DFB_OK )
return CAIRO_STATUS_NO_MEMORY;
surface->buffer_data = data;
@@ -301,7 +301,7 @@ _cairo_directfb_surface_get_image (cairo
return CAIRO_STATUS_NO_MEMORY;
}
#if 0
- if( surface->clip)
+ if( surface->clip)
_cairo_image_surface_set_clip_region (
(cairo_image_surface_t *)surface->buffer_image,surface->clip);
#endif
@@ -354,7 +354,7 @@ _cairo_directfb_surface_create_similar (
static cairo_status_t
_cairo_directfb_surface_finish (void *data ) {
cairo_directfb_surface_t *surface=(cairo_directfb_surface_t *)data;
- if( surface->buffer_image )
+ if( surface->buffer_image )
cairo_surface_destroy (surface->buffer_image);
if (surface->clip)
pixman_region_destroy (surface->clip);
@@ -370,7 +370,7 @@ _cairo_directfb_surface_finish (void *da
#endif
surface->main_surface->Release (surface->main_surface);
surface->main_surface=NULL;
- surface->dfb->Release(surface->dfb);
+ surface->dfb->Release(surface->dfb);
surface->dfb=NULL;
return CAIRO_STATUS_SUCCESS;
}
@@ -480,10 +480,10 @@ _cairo_directfb_surface_composite (cairo
int itx, ity;
cairo_directfb_surface_t *surface = abstract_dst;
- if( _dfb_set_operator(op,surface->buffer) == DFB_UNSUPPORTED )
+ if( _dfb_set_operator(op,surface->buffer) == DFB_UNSUPPORTED )
return CAIRO_INT_STATUS_UNSUPPORTED;
- if (src_pattern->type == CAIRO_PATTERN_TYPE_SOLID ) {
+ if (src_pattern->type == CAIRO_PATTERN_TYPE_SOLID ) {
} else if (src_pattern->type != CAIRO_PATTERN_TYPE_SURFACE ||
src_pattern->extend != CAIRO_EXTEND_NONE) {
@@ -534,15 +534,15 @@ _cairo_directfb_surface_fill_rectangles
}
buffer->SetColor(buffer,color->red_short >> 8,
- color->green_short >> 8,
- color->blue_short >> 8,
+ color->green_short >> 8,
+ color->blue_short >> 8,
color->alpha_short >> 8 );
/*Not optimized not sure of the sorting on region*/
if( surface->clip ) {
- DFBRegion region;
+ DFBRegion region;
int n_boxes = pixman_region_num_rects (surface->clip);
pixman_box16_t *boxes = pixman_region_rects (surface->clip);
- for( k = 0; k < n_boxes; k++ ) {
+ for( k = 0; k < n_boxes; k++ ) {
region.x1 = boxes[k].x1;
region.y1 = boxes[k].y1;
region.x2 = boxes[k].x2;
@@ -581,7 +581,7 @@ _cairo_directfb_surface_set_clip_region
pixman_region_copy (surface->clip, region);
}
#if 0
- if( surface->buffer_image )
+ if( surface->buffer_image )
_cairo_image_surface_set_clip_region (
(cairo_image_surface_t *)surface->buffer_image,region);
#endif
@@ -611,7 +611,7 @@ _cairo_directfb_surface_mark_dirty_recta
{
cairo_directfb_surface_t *surface = abstract_surface;
if( surface->main_surface != surface->buffer) {
- DFBRegion region;
+ DFBRegion region;
region.x1=x;
region.y1=y;
region.x2=x+width;
@@ -622,11 +622,11 @@ _cairo_directfb_surface_mark_dirty_recta
}
return CAIRO_STATUS_SUCCESS;
}
-static cairo_status_t
+static cairo_status_t
_cairo_directfb_surface_flush (void *abstract_surface)
{
cairo_directfb_surface_t *surface = abstract_surface;
- if( surface->main_surface != surface->buffer)
+ if( surface->main_surface != surface->buffer)
surface->main_surface->Blit(surface->main_surface,surface->buffer,NULL,0,0);
return CAIRO_STATUS_SUCCESS;
}
@@ -662,7 +662,7 @@ _cairo_directfb_surface_scaled_glyph_fin
static const cairo_surface_backend_t cairo_directfb_surface_backend = {
- CAIRO_SURFACE_TYPE_DIRECTFB,
+ CAIRO_SURFACE_TYPE_DIRECTFB,
_cairo_directfb_surface_create_similar,
_cairo_directfb_surface_finish,
_cairo_directfb_surface_acquire_source_image,
@@ -785,17 +785,17 @@ _cairo_directfb_surface_show_glyphs (cai
cairo_surface_t *
-cairo_directfb_surface_create (IDirectFB *dfb,IDirectFBSurface *dfbsurface)
+cairo_directfb_surface_create (IDirectFB *dfb,IDirectFBSurface *dfbsurface)
{
cairo_directfb_surface_t *surface = calloc(1,sizeof(cairo_directfb_surface_t));
- if( surface == NULL )
+ if( surface == NULL )
return NULL;
/* XXX: The content value here might be totally wrong. */
_cairo_surface_init (&surface->base, &cairo_directfb_surface_backend,
CAIRO_CONTENT_COLOR_ALPHA);
/*Reference the surface */
- dfb->AddRef(dfb);
- dfbsurface->AddRef(dfbsurface);
+ dfb->AddRef(dfb);
+ dfbsurface->AddRef(dfbsurface);
surface->dfb=dfb;
surface->main_surface = dfbsurface;
dfbsurface->GetSize(dfbsurface,&surface->width,&surface->height);
diff --git a/src/cairo-directfb.h b/src/cairo-directfb.h
index ff30416..3b8e10d 100644
--- a/src/cairo-directfb.h
+++ b/src/cairo-directfb.h
@@ -35,7 +35,7 @@
*/
#ifndef CAIRO_DIRECTFB_H
-#define CAIRO_DIRECTFB_H
+#define CAIRO_DIRECTFB_H
#include <cairo.h>
@@ -43,7 +43,7 @@
CAIRO_BEGIN_DECLS
-cairo_surface_t * cairo_directfb_surface_create (IDirectFB *dfb,IDirectFBSurface *surface);
+cairo_surface_t * cairo_directfb_surface_create (IDirectFB *dfb,IDirectFBSurface *surface);
CAIRO_END_DECLS
diff --git a/src/cairo-font-options.c b/src/cairo-font-options.c
index 6764c2c..e3a5f75 100644
--- a/src/cairo-font-options.c
+++ b/src/cairo-font-options.c
@@ -129,7 +129,7 @@ cairo_font_options_copy (const cairo_fon
* Destroys a #cairo_font_options_t object created with with
* cairo_font_options_create() or cairo_font_options_copy().
**/
-void
+void
cairo_font_options_destroy (cairo_font_options_t *options)
{
if (options == (cairo_font_options_t *)&cairo_font_options_nil)
@@ -219,7 +219,7 @@ cairo_font_options_hash (const cairo_fon
{
return ((options->antialias) |
(options->subpixel_order << 4) |
- (options->hint_style << 8) |
+ (options->hint_style << 8) |
(options->hint_metrics << 16));
}
diff --git a/src/cairo-font-subset.c b/src/cairo-font-subset.c
index bb50566..9d7aa40 100644
--- a/src/cairo-font-subset.c
+++ b/src/cairo-font-subset.c
@@ -536,7 +536,7 @@ cairo_pdf_ft_font_write_hmtx_table (cair
status = cairo_pdf_ft_font_allocate_write_buffer (font, entry_size,
(unsigned char **) &p);
/* XXX: Need to check status here. */
- FT_Load_Sfnt_Table (font->face, TTAG_hmtx,
+ FT_Load_Sfnt_Table (font->face, TTAG_hmtx,
font->glyphs[i].parent_index * entry_size,
(FT_Byte *) p, &entry_size);
font->base.widths[i] = be16_to_cpu (p[0]);
@@ -663,7 +663,7 @@ cairo_pdf_ft_font_calculate_checksum (ca
unsigned long checksum;
char *data;
- checksum = 0;
+ checksum = 0;
data = _cairo_array_index (&font->output, 0);
p = (unsigned long *) (data + start);
padded_end = (unsigned long *) (data + ((end + 3) & ~3));
diff --git a/src/cairo-font.c b/src/cairo-font.c
index 87f300e..fb475c3 100644
--- a/src/cairo-font.c
+++ b/src/cairo-font.c
@@ -55,7 +55,7 @@ const cairo_font_face_t _cairo_font_face
};
void
-_cairo_font_face_init (cairo_font_face_t *font_face,
+_cairo_font_face_init (cairo_font_face_t *font_face,
const cairo_font_face_backend_t *backend)
{
font_face->status = CAIRO_STATUS_SUCCESS;
@@ -337,8 +337,8 @@ _cairo_toy_font_face_keys_equal (const v
* cairo_font_face_destroy()
**/
cairo_font_face_t *
-_cairo_toy_font_face_create (const char *family,
- cairo_font_slant_t slant,
+_cairo_toy_font_face_create (const char *family,
+ cairo_font_slant_t slant,
cairo_font_weight_t weight)
{
cairo_status_t status;
@@ -427,7 +427,7 @@ static const cairo_font_face_backend_t _
};
void
-_cairo_unscaled_font_init (cairo_unscaled_font_t *unscaled_font,
+_cairo_unscaled_font_init (cairo_unscaled_font_t *unscaled_font,
const cairo_unscaled_font_backend_t *backend)
{
unscaled_font->ref_count = 1;
diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index 0d03d4e..24ac1a7 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -434,7 +434,7 @@ UNWIND_UNSCALED_MALLOC:
free (unscaled);
UNWIND_FONT_MAP_LOCK:
_cairo_ft_unscaled_font_map_unlock ();
-UNWIND:
+UNWIND:
return NULL;
}
@@ -457,7 +457,7 @@ _cairo_ft_unscaled_font_create_from_face
return unscaled;
}
-static void
+static void
_cairo_ft_unscaled_font_destroy (void *abstract_font)
{
cairo_ft_unscaled_font_t *unscaled = abstract_font;
@@ -573,14 +573,14 @@ _compute_transform (cairo_ft_font_transf
* freetype's transformation.
*/
- _cairo_matrix_compute_scale_factors (&normalized,
+ _cairo_matrix_compute_scale_factors (&normalized,
&sf->x_scale, &sf->y_scale,
/* XXX */ 1);
if (sf->x_scale != 0 && sf->y_scale != 0) {
cairo_matrix_scale (&normalized, 1.0 / sf->x_scale, 1.0 / sf->y_scale);
- _cairo_matrix_get_affine (&normalized,
+ _cairo_matrix_get_affine (&normalized,
&sf->shape[0][0], &sf->shape[0][1],
&sf->shape[1][0], &sf->shape[1][1],
&tx, &ty);
@@ -1000,7 +1000,7 @@ _render_glyph_outline (FT_Face
stride = (width * hmul + 3) & -4;
}
- bitmap.pitch = stride;
+ bitmap.pitch = stride;
bitmap.width = width * hmul;
bitmap.rows = height * vmul;
bitmap.buffer = calloc (1, stride * bitmap.rows);
@@ -1232,9 +1232,9 @@ _get_pattern_ft_options (FcPattern *patt
FcMatrix *font_matrix;
cairo_ft_options_t ft_options;
int rgba;
-#ifdef FC_HINT_STYLE
+#ifdef FC_HINT_STYLE
int hintstyle;
-#endif
+#endif
int target_flags = 0;
ft_options.load_flags = 0;
@@ -1271,7 +1271,7 @@ _get_pattern_ft_options (FcPattern *patt
FC_HINTING, 0, &hinting) != FcResultMatch)
hinting = FcTrue;
-#ifdef FC_HINT_STYLE
+#ifdef FC_HINT_STYLE
if (FcPatternGetInteger (pattern, FC_HINT_STYLE, 0, &hintstyle) != FcResultMatch)
hintstyle = FC_HINT_FULL;
@@ -1291,7 +1291,7 @@ _get_pattern_ft_options (FcPattern *patt
} else {
#ifdef FT_LOAD_TARGET_MONO
target_flags = FT_LOAD_TARGET_MONO;
-#endif
+#endif
}
#else /* !FC_HINT_STYLE */
if (!hinting)
@@ -1580,7 +1580,7 @@ _cairo_ft_scaled_font_create_toy (cairo_
}
}
-static void
+static void
_cairo_ft_scaled_font_fini (void *abstract_font)
{
cairo_ft_scaled_font_t *scaled_font = abstract_font;
@@ -1679,7 +1679,7 @@ _cubic_to (FT_Vector *control1, FT_Vecto
return 0;
}
-static cairo_status_t
+static cairo_status_t
_decompose_glyph_outline (FT_Face face,
cairo_font_options_t *options,
cairo_path_fixed_t **pathp)
@@ -1740,7 +1740,7 @@ _cairo_ft_scaled_glyph_init (void *abs
(info & CAIRO_SCALED_GLYPH_INFO_SURFACE) == 0)
load_flags |= FT_LOAD_NO_BITMAP;
- error = FT_Load_Glyph (scaled_font->unscaled->face,
+ error = FT_Load_Glyph (scaled_font->unscaled->face,
_cairo_scaled_glyph_index(scaled_glyph),
load_flags);
@@ -1787,7 +1787,7 @@ _cairo_ft_scaled_glyph_init (void *abs
*/
if ((scaled_font->base.options.hint_metrics != CAIRO_HINT_METRICS_OFF) &&
- (load_flags & FT_LOAD_NO_HINTING))
+ (load_flags & FT_LOAD_NO_HINTING))
{
FT_Pos x1, x2;
FT_Pos y1, y2;
@@ -1841,7 +1841,7 @@ _cairo_ft_scaled_glyph_init (void *abs
cairo_ft_scaled_font_unlock_face (abstract_font);
return status;
}
- _cairo_scaled_glyph_set_surface (scaled_glyph,
+ _cairo_scaled_glyph_set_surface (scaled_glyph,
&scaled_font->base,
surface);
}
@@ -1901,7 +1901,7 @@ _cairo_ft_ucs4_to_index (void *abstr
return index;
}
-static cairo_int_status_t
+static cairo_int_status_t
_cairo_ft_show_glyphs (void *abstract_font,
cairo_operator_t op,
cairo_pattern_t *pattern,
@@ -2127,7 +2127,7 @@ cairo_ft_font_options_substitute (const
FcPatternAddBool (pattern, FC_HINTING, options->hint_style != CAIRO_HINT_STYLE_NONE);
}
-#ifdef FC_HINT_STYLE
+#ifdef FC_HINT_STYLE
if (FcPatternGet (pattern, FC_HINT_STYLE, 0, &v) == FcResultNoMatch)
{
int hint_style;
@@ -2147,7 +2147,7 @@ cairo_ft_font_options_substitute (const
FcPatternAddInteger (pattern, FC_HINT_STYLE, hint_style);
}
-#endif
+#endif
}
}
diff --git a/src/cairo-gstate.c b/src/cairo-gstate.c
index 8095f3b..fdecf43 100644
--- a/src/cairo-gstate.c
+++ b/src/cairo-gstate.c
@@ -88,7 +88,7 @@ _cairo_gstate_create (cairo_surface_t *t
status = _cairo_gstate_init (gstate, target);
if (status) {
free (gstate);
- return NULL;
+ return NULL;
}
return gstate;
@@ -111,7 +111,7 @@ _cairo_gstate_init (cairo_gstate_t *gst
gstate->scaled_font = NULL;
cairo_matrix_init_scale (&gstate->font_matrix,
- CAIRO_GSTATE_DEFAULT_FONT_SIZE,
+ CAIRO_GSTATE_DEFAULT_FONT_SIZE,
CAIRO_GSTATE_DEFAULT_FONT_SIZE);
_cairo_font_options_init_default (&gstate->font_options);
@@ -1140,9 +1140,9 @@ _cairo_gstate_unset_scaled_font (cairo_g
}
cairo_status_t
-_cairo_gstate_select_font_face (cairo_gstate_t *gstate,
- const char *family,
- cairo_font_slant_t slant,
+_cairo_gstate_select_font_face (cairo_gstate_t *gstate,
+ const char *family,
+ cairo_font_slant_t slant,
cairo_font_weight_t weight)
{
cairo_font_face_t *font_face;
@@ -1158,7 +1158,7 @@ _cairo_gstate_select_font_face (cairo_gs
}
cairo_status_t
-_cairo_gstate_set_font_size (cairo_gstate_t *gstate,
+_cairo_gstate_set_font_size (cairo_gstate_t *gstate,
double size)
{
_cairo_gstate_unset_scaled_font (gstate);
@@ -1169,7 +1169,7 @@ _cairo_gstate_set_font_size (cairo_gstat
}
cairo_status_t
-_cairo_gstate_set_font_matrix (cairo_gstate_t *gstate,
+_cairo_gstate_set_font_matrix (cairo_gstate_t *gstate,
const cairo_matrix_t *matrix)
{
_cairo_gstate_unset_scaled_font (gstate);
@@ -1341,7 +1341,7 @@ _cairo_gstate_ensure_scaled_font (cairo_
}
cairo_status_t
-_cairo_gstate_get_font_extents (cairo_gstate_t *gstate,
+_cairo_gstate_get_font_extents (cairo_gstate_t *gstate,
cairo_font_extents_t *extents)
{
cairo_status_t status = _cairo_gstate_ensure_scaled_font (gstate);
@@ -1354,7 +1354,7 @@ _cairo_gstate_get_font_extents (cairo_gs
}
cairo_status_t
-_cairo_gstate_text_to_glyphs (cairo_gstate_t *gstate,
+_cairo_gstate_text_to_glyphs (cairo_gstate_t *gstate,
const char *utf8,
double x,
double y,
@@ -1377,7 +1377,7 @@ _cairo_gstate_text_to_glyphs (cairo_gsta
}
cairo_status_t
-_cairo_gstate_set_font_face (cairo_gstate_t *gstate,
+_cairo_gstate_set_font_face (cairo_gstate_t *gstate,
cairo_font_face_t *font_face)
{
if (font_face && font_face->status)
@@ -1395,7 +1395,7 @@ _cairo_gstate_set_font_face (cairo_gstat
cairo_status_t
_cairo_gstate_glyph_extents (cairo_gstate_t *gstate,
- cairo_glyph_t *glyphs,
+ cairo_glyph_t *glyphs,
int num_glyphs,
cairo_text_extents_t *extents)
{
@@ -1413,8 +1413,8 @@ _cairo_gstate_glyph_extents (cairo_gstat
}
cairo_status_t
-_cairo_gstate_show_glyphs (cairo_gstate_t *gstate,
- cairo_glyph_t *glyphs,
+_cairo_gstate_show_glyphs (cairo_gstate_t *gstate,
+ cairo_glyph_t *glyphs,
int num_glyphs)
{
cairo_status_t status;
@@ -1441,7 +1441,7 @@ _cairo_gstate_show_glyphs (cairo_gstate_
{
transformed_glyphs[i] = glyphs[i];
_cairo_gstate_user_to_backend (gstate,
- &transformed_glyphs[i].x,
+ &transformed_glyphs[i].x,
&transformed_glyphs[i].y);
}
@@ -1462,7 +1462,7 @@ _cairo_gstate_show_glyphs (cairo_gstate_
cairo_status_t
_cairo_gstate_glyph_path (cairo_gstate_t *gstate,
- cairo_glyph_t *glyphs,
+ cairo_glyph_t *glyphs,
int num_glyphs,
cairo_path_fixed_t *path)
{
@@ -1482,7 +1482,7 @@ _cairo_gstate_glyph_path (cairo_gstate_t
{
transformed_glyphs[i] = glyphs[i];
_cairo_gstate_user_to_backend (gstate,
- &(transformed_glyphs[i].x),
+ &(transformed_glyphs[i].x),
&(transformed_glyphs[i].y));
}
diff --git a/src/cairo-hash.c b/src/cairo-hash.c
index 6b9f3d0..a9909a2 100644
--- a/src/cairo-hash.c
+++ b/src/cairo-hash.c
@@ -264,7 +264,7 @@ _cairo_hash_table_lookup_internal (cairo
return entry;
}
- if (step == 0) {
+ if (step == 0) {
step = key->hash % hash_table->arrangement->rehash;
if (step == 0)
step = 1;
@@ -328,7 +328,7 @@ _cairo_hash_table_resize (cairo_hash_ta
new_size = tmp.arrangement->size;
tmp.entries = calloc (new_size, sizeof (cairo_hash_entry_t*));
- if (tmp.entries == NULL)
+ if (tmp.entries == NULL)
return CAIRO_STATUS_NO_MEMORY;
for (i = 0; i < hash_table->arrangement->size; ++i) {
@@ -424,7 +424,7 @@ _cairo_hash_table_random_entry (cairo_ha
return *entry;
}
- if (step == 0) {
+ if (step == 0) {
step = hash % hash_table->arrangement->rehash;
if (step == 0)
step = 1;
diff --git a/src/cairo-matrix.c b/src/cairo-matrix.c
index 39b2523..54c421d 100644
--- a/src/cairo-matrix.c
+++ b/src/cairo-matrix.c
@@ -511,7 +511,7 @@ _cairo_matrix_compute_scale_factors (con
det = -det;
if (major)
minor = det / major;
- else
+ else
minor = 0.0;
if (x_major)
{
@@ -528,7 +528,7 @@ _cairo_matrix_compute_scale_factors (con
return CAIRO_STATUS_SUCCESS;
}
-cairo_bool_t
+cairo_bool_t
_cairo_matrix_is_integer_translation(const cairo_matrix_t *m,
int *itx, int *ity)
{
@@ -566,11 +566,11 @@ _cairo_matrix_is_integer_translation(con
1. First some notation:
- All capital letters represent vectors in two dimensions. A prime '
+ All capital letters represent vectors in two dimensions. A prime '
represents a transformed coordinate. Matrices are written in underlined
form, ie _R_. Lowercase letters represent scalar real values.
- 2. The question has been posed: What is the maximum expansion factor
+ 2. The question has been posed: What is the maximum expansion factor
achieved by the linear transformation
X' = X _R_
@@ -580,7 +580,7 @@ _cairo_matrix_is_integer_translation(con
_R_ = [a b]
[c d] .
- In other words, what is the maximum radius, MAX[ |X'| ], reached for any
+ In other words, what is the maximum radius, MAX[ |X'| ], reached for any
X on the unit circle ( |X| = 1 ) ?
@@ -600,15 +600,15 @@ _cairo_matrix_is_integer_translation(con
-a*sin(θ)+b*cos(θ) = 0
- From this it follows that
+ From this it follows that
- tan(θ) = b/a
+ tan(θ) = b/a
- and hence
+ and hence
sin(θ) = b/sqrt(a² + b²)
- and
+ and
cos(θ) = a/sqrt(a² + b²)
@@ -625,25 +625,25 @@ _cairo_matrix_is_integer_translation(con
X(θ) = (cos(θ), sin(θ))
- Thus
+ Thus
X'(θ) = X(θ) * _R_ = (cos(θ), sin(θ)) * [a b]
[c d]
= (a*cos(θ) + c*sin(θ), b*cos(θ) + d*sin(θ)).
- Define
+ Define
r(θ) = |X'(θ)|
Thus
r²(θ) = (a*cos(θ) + c*sin(θ))² + (b*cos(θ) + d*sin(θ))²
- = (a² + b²)*cos²(θ) + (c² + d²)*sin²(θ)
- + 2*(a*c + b*d)*cos(θ)*sin(θ)
+ = (a² + b²)*cos²(θ) + (c² + d²)*sin²(θ)
+ + 2*(a*c + b*d)*cos(θ)*sin(θ)
Now apply the double angle formulae (A) to (C) from above:
- r²(θ) = (a² + b² + c² + d²)/2
+ r²(θ) = (a² + b² + c² + d²)/2
+ (a² + b² - c² - d²)*cos(2*θ)/2
+ (a*c + b*d)*sin(2*θ)
= f + g*cos(Ï) + h*sin(Ï)
diff --git a/src/cairo-meta-surface.c b/src/cairo-meta-surface.c
index 92fd448..31d16a0 100644
--- a/src/cairo-meta-surface.c
+++ b/src/cairo-meta-surface.c
@@ -233,7 +233,7 @@ _cairo_meta_surface_paint (void *abstr
/* An optimisation that takes care to not replay what was done
* before surface is cleared. We don't erase recorded commands
* since we may have earlier snapshots of this surface. */
- if (op == CAIRO_OPERATOR_CLEAR && !meta->is_clipped)
+ if (op == CAIRO_OPERATOR_CLEAR && !meta->is_clipped)
meta->replay_start_idx = meta->commands.num_elements;
command = malloc (sizeof (cairo_command_paint_t));
@@ -621,7 +621,7 @@ _cairo_meta_surface_replay (cairo_surfac
meta = (cairo_meta_surface_t *) surface;
status = CAIRO_STATUS_SUCCESS;
- _cairo_clip_init (&clip, target);
+ _cairo_clip_init (&clip, target);
num_elements = meta->commands.num_elements;
elements = _cairo_array_index (&meta->commands, 0);
diff --git a/src/cairo-path.c b/src/cairo-path.c
index 5c94ad9..3c8c0b2 100644
--- a/src/cairo-path.c
+++ b/src/cairo-path.c
@@ -482,7 +482,7 @@ _cairo_path_arg_buf_add_points (cairo_pa
#define CAIRO_PATH_OP_MAX_ARGS 3
-static int const num_args[] =
+static int const num_args[] =
{
1, /* cairo_path_move_to */
1, /* cairo_path_op_line_to */
diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c
index 1e8015b..f76f492 100644
--- a/src/cairo-pattern.c
+++ b/src/cairo-pattern.c
@@ -113,7 +113,7 @@ _cairo_pattern_set_error (cairo_pattern_
static void
_cairo_pattern_init (cairo_pattern_t *pattern, cairo_pattern_type_t type)
{
- pattern->type = type;
+ pattern->type = type;
pattern->ref_count = 1;
pattern->status = CAIRO_STATUS_SUCCESS;
@@ -1061,7 +1061,7 @@ _cairo_pattern_acquire_surface_for_solid
*
* Return value: %TRUE if the pattern is an opaque, solid color.
**/
-cairo_bool_t
+cairo_bool_t
_cairo_pattern_is_opaque_solid (const cairo_pattern_t *pattern)
{
cairo_solid_pattern_t *solid;
diff --git a/src/cairo-pen.c b/src/cairo-pen.c
index bb4adff..87de9a4 100644
--- a/src/cairo-pen.c
+++ b/src/cairo-pen.c
@@ -165,7 +165,7 @@ We construct the pen by computing points
using equally spaced angles.
We show that this approximation to the ellipse has maximum error at the
-major axis of the ellipse.
+major axis of the ellipse.
Set
@@ -377,8 +377,8 @@ _cairo_pen_stroke_spline_half (cairo_pen
initial_slope.dx = -initial_slope.dx;
initial_slope.dy = -initial_slope.dy;
final_slope = spline->initial_slope;
- final_slope.dx = -final_slope.dx;
- final_slope.dy = -final_slope.dy;
+ final_slope.dx = -final_slope.dx;
+ final_slope.dy = -final_slope.dy;
}
_cairo_pen_find_active_cw_vertex_index (pen, &initial_slope, &active);
diff --git a/src/cairo-polygon.c b/src/cairo-polygon.c
index 59c615d..dc9d380 100644
--- a/src/cairo-polygon.c
+++ b/src/cairo-polygon.c
@@ -128,7 +128,7 @@ _cairo_polygon_add_edge (cairo_polygon_t
return CAIRO_STATUS_SUCCESS;
}
-cairo_status_t
+cairo_status_t
_cairo_polygon_move_to (cairo_polygon_t *polygon, cairo_point_t *point)
{
if (! polygon->has_current_point)
diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index d291a94..9d49111 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -290,7 +290,7 @@ _cairo_ps_surface_emit_font_subset (cair
"\t/Glyphs [\n");
for (i = 0; i < font_subset->num_glyphs; i++) {
- _cairo_ps_surface_emit_glyph (surface,
+ _cairo_ps_surface_emit_glyph (surface,
font_subset->scaled_font,
font_subset->glyphs[i], i);
}
@@ -546,7 +546,7 @@ cairo_ps_surface_set_dpi (cairo_surface_
return;
}
- ps_surface->x_dpi = x_dpi;
+ ps_surface->x_dpi = x_dpi;
ps_surface->y_dpi = y_dpi;
}
@@ -1434,7 +1434,7 @@ emit_pattern (cairo_ps_surface_t *surfac
* different pattern. */
switch (pattern->type) {
- case CAIRO_PATTERN_TYPE_SOLID:
+ case CAIRO_PATTERN_TYPE_SOLID:
emit_solid_pattern (surface, (cairo_solid_pattern_t *) pattern);
break;
@@ -1448,7 +1448,7 @@ emit_pattern (cairo_ps_surface_t *surfac
case CAIRO_PATTERN_TYPE_RADIAL:
emit_radial_pattern (surface, (cairo_radial_pattern_t *) pattern);
- break;
+ break;
}
}
diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c
index 269e9b6..5b55ac3 100644
--- a/src/cairo-quartz-surface.c
+++ b/src/cairo-quartz-surface.c
@@ -101,7 +101,7 @@ _cairo_quartz_surface_acquire_dest_image
image_rect->height = y2 - y1;
data = calloc (image_rect->width * image_rect->height * 4, 1);
- image_surface = cairo_image_surface_create_for_data (data,
+ image_surface = cairo_image_surface_create_for_data (data,
CAIRO_FORMAT_ARGB32,
image_rect->width,
image_rect->height,
@@ -127,7 +127,7 @@ create_image_from_surface (cairo_image_s
height = cairo_image_surface_get_height ((cairo_surface_t *)image_surface);
color_space = CGColorSpaceCreateDeviceRGB();
- data_provider = CGDataProviderCreateWithData (NULL, data,
+ data_provider = CGDataProviderCreateWithData (NULL, data,
width * height * 4, NULL);
image = CGImageCreate (width, height,
8, 32,
@@ -227,7 +227,7 @@ static const struct _cairo_surface_backe
cairo_surface_t *cairo_quartz_surface_create(CGContextRef context,
- int width,
+ int width,
int height,
cairo_bool_t y_grows_down)
{
diff --git a/src/cairo-scaled-font-subsets.c b/src/cairo-scaled-font-subsets.c
index 8d907b0..9be2be2 100644
--- a/src/cairo-scaled-font-subsets.c
+++ b/src/cairo-scaled-font-subsets.c
@@ -341,7 +341,7 @@ _cairo_scaled_font_subsets_map_glyph (ca
_cairo_sub_font_init_key (&key, scaled_font);
if (! _cairo_hash_table_lookup (subsets->sub_fonts, &key.base,
- (cairo_hash_entry_t **) &sub_font))
+ (cairo_hash_entry_t **) &sub_font))
{
sub_font = _cairo_sub_font_create (subsets, scaled_font,
subsets->num_sub_fonts++,
diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index 5893f8f..06fbe11 100644
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -318,7 +318,7 @@ _cairo_scaled_font_keys_equal (const voi
*/
cairo_status_t
-_cairo_scaled_font_init (cairo_scaled_font_t *scaled_font,
+_cairo_scaled_font_init (cairo_scaled_font_t *scaled_font,
cairo_font_face_t *font_face,
const cairo_matrix_t *font_matrix,
const cairo_matrix_t *ctm,
@@ -655,7 +655,7 @@ cairo_scaled_font_text_extents (cairo_sc
**/
void
cairo_scaled_font_glyph_extents (cairo_scaled_font_t *scaled_font,
- cairo_glyph_t *glyphs,
+ cairo_glyph_t *glyphs,
int num_glyphs,
cairo_text_extents_t *extents)
{
@@ -723,8 +723,8 @@ cairo_status_t
_cairo_scaled_font_text_to_glyphs (cairo_scaled_font_t *scaled_font,
double x,
double y,
- const char *utf8,
- cairo_glyph_t **glyphs,
+ const char *utf8,
+ cairo_glyph_t **glyphs,
int *num_glyphs)
{
size_t i;
@@ -752,7 +752,7 @@ _cairo_scaled_font_text_to_glyphs (cairo
goto FAIL;
}
- for (i = 0; i < *num_glyphs; i++) {
+ for (i = 0; i < *num_glyphs; i++) {
(*glyphs)[i].index = (*scaled_font->backend->
ucs4_to_index) (scaled_font, ucs4[i]);
(*glyphs)[i].x = x;
@@ -864,7 +864,7 @@ _cairo_scaled_font_show_glyphs (cairo_sc
if (scaled_font->backend->show_glyphs != NULL) {
status = scaled_font->backend->show_glyphs (scaled_font,
- op, pattern,
+ op, pattern,
surface,
source_x, source_y,
dest_x, dest_y,
@@ -919,7 +919,7 @@ _cairo_scaled_font_show_glyphs (cairo_sc
}
/* round glyph locations to the nearest pixel */
- x = (int) floor (glyphs[i].x +
+ x = (int) floor (glyphs[i].x +
glyph_surface->base.device_x_offset +
0.5);
y = (int) floor (glyphs[i].y +
@@ -928,14 +928,14 @@ _cairo_scaled_font_show_glyphs (cairo_sc
_cairo_pattern_init_for_surface (&glyph_pattern, &glyph_surface->base);
- status = _cairo_surface_composite (CAIRO_OPERATOR_ADD,
- &glyph_pattern.base,
+ status = _cairo_surface_composite (CAIRO_OPERATOR_ADD,
+ &glyph_pattern.base,
NULL,
mask,
0, 0,
- 0, 0,
- x - dest_x,
- y - dest_y,
+ 0, 0,
+ x - dest_x,
+ y - dest_y,
glyph_surface->width,
glyph_surface->height);
@@ -951,7 +951,7 @@ _cairo_scaled_font_show_glyphs (cairo_sc
status = _cairo_surface_composite (op, pattern, &mask_pattern.base,
surface,
- source_x, source_y,
+ source_x, source_y,
0, 0,
dest_x, dest_y,
width, height);
@@ -1020,7 +1020,7 @@ _scaled_glyph_path_close_path (void *abs
cairo_status_t
_cairo_scaled_font_glyph_path (cairo_scaled_font_t *scaled_font,
- const cairo_glyph_t *glyphs,
+ const cairo_glyph_t *glyphs,
int num_glyphs,
cairo_path_fixed_t *path)
{
@@ -1189,8 +1189,8 @@ _cairo_scaled_glyph_lookup (cairo_scaled
* Check cache for glyph
*/
info |= CAIRO_SCALED_GLYPH_INFO_METRICS;
- if (!_cairo_cache_lookup (scaled_font->glyphs, &key,
- (cairo_cache_entry_t **) &scaled_glyph))
+ if (!_cairo_cache_lookup (scaled_font->glyphs, &key,
+ (cairo_cache_entry_t **) &scaled_glyph))
{
/*
* On miss, create glyph and insert into cache
@@ -1229,7 +1229,7 @@ _cairo_scaled_glyph_lookup (cairo_scaled
* already has the requested data and ammend it if not
*/
need_info = 0;
- if ((info & CAIRO_SCALED_GLYPH_INFO_SURFACE) != 0 &&
+ if ((info & CAIRO_SCALED_GLYPH_INFO_SURFACE) != 0 &&
scaled_glyph->surface == NULL)
need_info |= CAIRO_SCALED_GLYPH_INFO_SURFACE;
diff --git a/src/cairo-slope.c b/src/cairo-slope.c
index a2edec0..5c4886f 100644
--- a/src/cairo-slope.c
+++ b/src/cairo-slope.c
@@ -59,7 +59,7 @@ _cairo_slope_compare (cairo_slope_t *a,
{
cairo_fixed_48_16_t diff;
- diff = ((cairo_fixed_48_16_t) a->dy * (cairo_fixed_48_16_t) b->dx
+ diff = ((cairo_fixed_48_16_t) a->dy * (cairo_fixed_48_16_t) b->dx
- (cairo_fixed_48_16_t) b->dy * (cairo_fixed_48_16_t) a->dx);
if (diff > 0)
diff --git a/src/cairo-surface-fallback.c b/src/cairo-surface-fallback.c
index 934d361..3b3dd03 100644
--- a/src/cairo-surface-fallback.c
+++ b/src/cairo-surface-fallback.c
@@ -237,7 +237,7 @@ _clip_and_composite_combine (cairo_clip_
*/
status = _cairo_clip_combine_to_surface (clip, CAIRO_OPERATOR_DEST_IN,
intermediate,
- extents->x, extents->y,
+ extents->x, extents->y,
extents);
if (status)
goto CLEANUP_SURFACE;
@@ -878,7 +878,7 @@ _cairo_surface_old_show_glyphs_draw_func
if (!src)
src = &pattern.base;
- status = _cairo_surface_old_show_glyphs (glyph_info->font, op, src,
+ status = _cairo_surface_old_show_glyphs (glyph_info->font, op, src,
dst,
extents->x, extents->y,
extents->x - dst_x,
@@ -891,8 +891,8 @@ _cairo_surface_old_show_glyphs_draw_func
if (status != CAIRO_INT_STATUS_UNSUPPORTED)
return status;
- status = _cairo_scaled_font_show_glyphs (glyph_info->font,
- op,
+ status = _cairo_scaled_font_show_glyphs (glyph_info->font,
+ op,
src, dst,
extents->x, extents->y,
extents->x - dst_x,
@@ -925,8 +925,8 @@ _cairo_surface_fallback_show_glyphs (cai
if (_cairo_operator_bounded_by_mask (op)) {
status = _cairo_scaled_font_glyph_device_extents (scaled_font,
- glyphs,
- num_glyphs,
+ glyphs,
+ num_glyphs,
&glyph_extents);
if (status)
return status;
diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index 2d3218d..f2629c4 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -288,9 +288,9 @@ _cairo_surface_create_similar_solid (cai
return (cairo_surface_t*) &_cairo_surface_nil;
}
- status = _cairo_surface_paint (surface,
- color == CAIRO_COLOR_TRANSPARENT ?
- CAIRO_OPERATOR_CLEAR :
+ status = _cairo_surface_paint (surface,
+ color == CAIRO_COLOR_TRANSPARENT ?
+ CAIRO_OPERATOR_CLEAR :
CAIRO_OPERATOR_SOURCE, source);
cairo_pattern_destroy (source);
@@ -1528,7 +1528,7 @@ _cairo_surface_set_clip (cairo_surface_t
clip->serial);
if (clip->region)
- return _cairo_surface_set_clip_region (surface,
+ return _cairo_surface_set_clip_region (surface,
clip->region,
clip->serial);
}
diff --git a/src/cairo-svg-surface.c b/src/cairo-svg-surface.c
index 720d936..b2a36fb 100644
--- a/src/cairo-svg-surface.c
+++ b/src/cairo-svg-surface.c
@@ -58,13 +58,13 @@
typedef struct cairo_svg_document cairo_svg_document_t;
typedef struct cairo_svg_surface cairo_svg_surface_t;
-static const cairo_svg_version_t _cairo_svg_versions[CAIRO_SVG_VERSION_LAST] =
+static const cairo_svg_version_t _cairo_svg_versions[CAIRO_SVG_VERSION_LAST] =
{
CAIRO_SVG_VERSION_1_1,
CAIRO_SVG_VERSION_1_2
};
-static const char * _cairo_svg_version_strings[CAIRO_SVG_VERSION_LAST] =
+static const char * _cairo_svg_version_strings[CAIRO_SVG_VERSION_LAST] =
{
"SVG 1.1",
"SVG 1.2"
@@ -288,13 +288,13 @@ cairo_svg_surface_set_dpi (cairo_surface
status = _extract_svg_surface (abstract_surface, &surface);
if (status) {
- _cairo_surface_set_error (abstract_surface,
+ _cairo_surface_set_error (abstract_surface,
CAIRO_STATUS_SURFACE_TYPE_MISMATCH);
return;
}
- surface->document->x_dpi = x_dpi;
- surface->document->y_dpi = y_dpi;
+ surface->document->x_dpi = x_dpi;
+ surface->document->y_dpi = y_dpi;
}
/**
@@ -320,7 +320,7 @@ cairo_svg_surface_restrict_to_version (c
status = _extract_svg_surface (abstract_surface, &surface);
if (status) {
- _cairo_surface_set_error (abstract_surface,
+ _cairo_surface_set_error (abstract_surface,
CAIRO_STATUS_SURFACE_TYPE_MISMATCH);
return;
}
@@ -448,7 +448,7 @@ _cairo_svg_surface_create_for_stream_int
return (cairo_surface_t *) &_cairo_surface_nil;
}
- surface = _cairo_svg_surface_create_for_document (document, CAIRO_CONTENT_COLOR_ALPHA,
+ surface = _cairo_svg_surface_create_for_document (document, CAIRO_CONTENT_COLOR_ALPHA,
width, height);
document->owner = surface;
@@ -613,9 +613,9 @@ _cairo_svg_document_emit_glyph (cairo_sv
_cairo_svg_path_close_path,
&info);
- symbol = xmlNewChild (document->xml_node_glyphs, NULL,
+ symbol = xmlNewChild (document->xml_node_glyphs, NULL,
CC2XML ("symbol"), NULL);
- snprintf (buffer, sizeof buffer, "glyph%d-%d",
+ snprintf (buffer, sizeof buffer, "glyph%d-%d",
font_id,
subset_glyph_index);
xmlSetProp (symbol, CC2XML ("id"), C2XML (buffer));
@@ -724,14 +724,14 @@ emit_alpha_filter (cairo_svg_document_t
child = xmlNewChild (node, NULL, CC2XML ("feColorMatrix"), NULL);
xmlSetProp (child, CC2XML("type"), CC2XML ("matrix"));
xmlSetProp (child, CC2XML("in"), CC2XML ("SourceGraphic"));
- xmlSetProp (child, CC2XML("values"), CC2XML ("0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"));
+ xmlSetProp (child, CC2XML("values"), CC2XML ("0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"));
document->alpha_filter = TRUE;
}
}
static void
-emit_transform (xmlNodePtr node,
- char const *attribute_str,
+emit_transform (xmlNodePtr node,
+ char const *attribute_str,
cairo_matrix_t *matrix)
{
xmlBufferPtr matrix_buffer;
@@ -773,7 +773,7 @@ static char const *base64_table =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
static cairo_status_t
-base64_write_func (void *closure,
+base64_write_func (void *closure,
const unsigned char *data,
unsigned int length)
{
@@ -785,7 +785,7 @@ base64_write_func (void *closure,
src = info->src;
if (info->in_mem + length < 3) {
- for (i = 0; i < length; i++) {
+ for (i = 0; i < length; i++) {
src[i + info->in_mem] = *data;
data++;
}
@@ -816,7 +816,7 @@ base64_write_func (void *closure,
info->in_mem = 0;
}
- for (i = 0; i < length; i++) {
+ for (i = 0; i < length; i++) {
src[i] = *data;
data++;
}
@@ -844,7 +844,7 @@ _cairo_surface_base64_encode (cairo_surf
xmlBufferCat (info.buffer, CC2XML ("data:image/png;base64,"));
- status = cairo_surface_write_to_png_stream (surface, base64_write_func,
+ status = cairo_surface_write_to_png_stream (surface, base64_write_func,
(void *) &info);
if (status) {
@@ -891,7 +891,7 @@ emit_composite_image_pattern (xmlNodePtr
}
status = _cairo_surface_base64_encode (surface, &image_buffer);
- if (status)
+ if (status)
goto BAIL;
child = xmlNewChild (node, NULL, CC2XML ("image"), NULL);
@@ -949,11 +949,11 @@ emit_meta_surface (cairo_svg_document_t
meta = (cairo_meta_surface_t *) _cairo_surface_snapshot ((cairo_surface_t *)surface);
svg_surface = _cairo_svg_surface_create_for_document (document,
meta->content,
- meta->width_pixels,
+ meta->width_pixels,
meta->height_pixels);
paginated_surface = _cairo_paginated_surface_create (svg_surface,
meta->content,
- meta->width_pixels,
+ meta->width_pixels,
meta->height_pixels,
&cairo_svg_surface_paginated_backend);
_cairo_meta_surface_replay ((cairo_surface_t *)meta, paginated_surface);
@@ -963,11 +963,11 @@ emit_meta_surface (cairo_svg_document_t
new_snapshot.id = ((cairo_svg_surface_t *) svg_surface)->id;
_cairo_array_append (&document->meta_snapshots, &new_snapshot);
- if (meta->content == CAIRO_CONTENT_ALPHA)
+ if (meta->content == CAIRO_CONTENT_ALPHA)
emit_alpha_filter (document);
- child = xmlAddChild (document->xml_node_defs,
+ child = xmlAddChild (document->xml_node_defs,
xmlCopyNode (((cairo_svg_surface_t *) svg_surface)->xml_root_node, 1));
- if (meta->content == CAIRO_CONTENT_ALPHA)
+ if (meta->content == CAIRO_CONTENT_ALPHA)
xmlSetProp (child, CC2XML ("filter"), CC2XML("url(#alpha)"));
id = new_snapshot.id;
@@ -979,10 +979,10 @@ emit_meta_surface (cairo_svg_document_t
}
static xmlNodePtr
-emit_composite_meta_pattern (xmlNodePtr node,
+emit_composite_meta_pattern (xmlNodePtr node,
cairo_svg_surface_t *surface,
cairo_surface_pattern_t *pattern,
- double *width,
+ double *width,
double *height,
cairo_bool_t is_pattern)
{
@@ -1016,7 +1016,7 @@ emit_composite_meta_pattern (xmlNodePtr
}
static xmlNodePtr
-emit_composite_pattern (xmlNodePtr node,
+emit_composite_pattern (xmlNodePtr node,
cairo_svg_surface_t *surface,
cairo_surface_pattern_t *pattern,
double *width,
@@ -1024,7 +1024,7 @@ emit_composite_pattern (xmlNodePtr node,
int is_pattern)
{
- if (_cairo_surface_is_meta (pattern->surface)) {
+ if (_cairo_surface_is_meta (pattern->surface)) {
return emit_composite_meta_pattern (node, surface, pattern, width, height, is_pattern);
}
@@ -1033,7 +1033,7 @@ emit_composite_pattern (xmlNodePtr node,
static void
emit_operator (xmlNodePtr node,
- cairo_svg_surface_t *surface,
+ cairo_svg_surface_t *surface,
cairo_operator_t op)
{
char const *op_str[] = {
@@ -1043,9 +1043,9 @@ emit_operator (xmlNodePtr node,
"src-out", "src-atop",
"dst", "dst-over", "dst-in",
- "dst-out", "dst-atop",
+ "dst-out", "dst-atop",
- "xor", "plus",
+ "xor", "plus",
"color-dodge" /* FIXME: saturate ? */
};
@@ -1054,9 +1054,9 @@ emit_operator (xmlNodePtr node,
}
static void
-emit_color (cairo_color_t const *color,
+emit_color (cairo_color_t const *color,
xmlBufferPtr style,
- char const *color_str,
+ char const *color_str,
char const *opacity_str)
{
char buffer[CAIRO_SVG_DTOSTR_BUFFER_LEN];
@@ -1082,18 +1082,18 @@ emit_color (cairo_color_t const *color,
static void
emit_solid_pattern (cairo_svg_surface_t *surface,
cairo_solid_pattern_t *pattern,
- xmlBufferPtr style,
+ xmlBufferPtr style,
int is_stroke)
{
- emit_color (&pattern->color,
- style, is_stroke ? "stroke" : "fill",
+ emit_color (&pattern->color,
+ style, is_stroke ? "stroke" : "fill",
"opacity");
}
static void
emit_surface_pattern (cairo_svg_surface_t *surface,
cairo_surface_pattern_t *pattern,
- xmlBufferPtr style,
+ xmlBufferPtr style,
int is_stroke)
{
cairo_svg_document_t *document = surface->document;
@@ -1133,9 +1133,9 @@ emit_surface_pattern (cairo_svg_surface_
xmlSetProp (child, CC2XML ("patternUnits"), CC2XML ("userSpaceOnUse"));
}
-static void
+static void
emit_pattern_stops (xmlNodePtr parent,
- cairo_gradient_pattern_t const *pattern,
+ cairo_gradient_pattern_t const *pattern,
double start_offset)
{
xmlNodePtr child;
@@ -1146,7 +1146,7 @@ emit_pattern_stops (xmlNodePtr parent,
for (i = 0; i < pattern->n_stops; i++) {
child = xmlNewChild (parent, NULL, CC2XML ("stop"), NULL);
- _cairo_dtostr (buffer, sizeof buffer,
+ _cairo_dtostr (buffer, sizeof buffer,
start_offset + (1 - start_offset ) *
_cairo_fixed_to_double (pattern->stops[i].x));
xmlSetProp (child, CC2XML ("offset"), C2XML (buffer));
@@ -1169,10 +1169,10 @@ emit_pattern_extend (xmlNodePtr node, ca
switch (extend) {
case CAIRO_EXTEND_REPEAT:
- value = "repeat";
+ value = "repeat";
break;
case CAIRO_EXTEND_REFLECT:
- value = "reflect";
+ value = "reflect";
break;
case CAIRO_EXTEND_NONE:
break;
@@ -1186,9 +1186,9 @@ emit_pattern_extend (xmlNodePtr node, ca
}
static void
-emit_linear_pattern (cairo_svg_surface_t *surface,
+emit_linear_pattern (cairo_svg_surface_t *surface,
cairo_linear_pattern_t *pattern,
- xmlBufferPtr style,
+ xmlBufferPtr style,
int is_stroke)
{
cairo_svg_document_t *document = surface->document;
@@ -1239,7 +1239,7 @@ emit_linear_pattern (cairo_svg_surface_t
}
static void
-emit_radial_pattern (cairo_svg_surface_t *surface,
+emit_radial_pattern (cairo_svg_surface_t *surface,
cairo_radial_pattern_t *pattern,
xmlBufferPtr style, int is_stroke)
{
@@ -1304,11 +1304,11 @@ emit_radial_pattern (cairo_svg_surface_t
}
static void
-emit_pattern (cairo_svg_surface_t *surface, cairo_pattern_t *pattern,
+emit_pattern (cairo_svg_surface_t *surface, cairo_pattern_t *pattern,
xmlBufferPtr style, int is_stroke)
{
switch (pattern->type) {
- case CAIRO_PATTERN_TYPE_SOLID:
+ case CAIRO_PATTERN_TYPE_SOLID:
emit_solid_pattern (surface, (cairo_solid_pattern_t *) pattern, style, is_stroke);
break;
@@ -1322,7 +1322,7 @@ emit_pattern (cairo_svg_surface_t *surfa
case CAIRO_PATTERN_TYPE_RADIAL:
emit_radial_pattern (surface, (cairo_radial_pattern_t *) pattern, style, is_stroke);
- break;
+ break;
}
}
@@ -1405,11 +1405,11 @@ emit_paint (xmlNodePtr node,
xmlBufferPtr style;
char buffer[CAIRO_SVG_DTOSTR_BUFFER_LEN];
- if (source->type == CAIRO_PATTERN_TYPE_SURFACE &&
+ if (source->type == CAIRO_PATTERN_TYPE_SURFACE &&
source->extend == CAIRO_EXTEND_NONE)
- return emit_composite_pattern (node,
+ return emit_composite_pattern (node,
surface,
- (cairo_surface_pattern_t *) source,
+ (cairo_surface_pattern_t *) source,
NULL, NULL, FALSE);
style = xmlBufferCreate ();
@@ -1438,7 +1438,7 @@ _cairo_svg_surface_paint (void *abs
{
cairo_svg_surface_t *surface = abstract_surface;
- if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE)
+ if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE)
return _analyze_operation (surface, op, source);
/* XXX: It would be nice to be able to assert this condition
@@ -1567,7 +1567,7 @@ _cairo_svg_surface_stroke (void *abstr
emit_pattern (surface, source, style, 1);
xmlBufferCat (style, CC2XML ("fill: none; stroke-width: "));
_cairo_dtostr (buffer, sizeof buffer, stroke_style->line_width);
- xmlBufferCat (style, C2XML (buffer));
+ xmlBufferCat (style, C2XML (buffer));
xmlBufferCat (style, CC2XML (";"));
switch (stroke_style->line_cap) {
@@ -1585,13 +1585,13 @@ _cairo_svg_surface_stroke (void *abstr
switch (stroke_style->line_join) {
case CAIRO_LINE_JOIN_MITER:
xmlBufferCat (style, CC2XML ("stroke-linejoin: miter;"));
- break;
+ break;
case CAIRO_LINE_JOIN_ROUND:
xmlBufferCat (style, CC2XML ("stroke-linejoin: round;"));
- break;
+ break;
case CAIRO_LINE_JOIN_BEVEL:
xmlBufferCat (style, CC2XML ("stroke-linejoin: bevel;"));
- break;
+ break;
}
if (stroke_style->num_dashes > 0) {
@@ -1686,9 +1686,9 @@ _cairo_svg_surface_show_glyphs (void *
}
glyph_node = xmlNewChild (child, NULL, CC2XML ("use"), NULL);
- snprintf (buffer, sizeof buffer, "#glyph%d-%d",
+ snprintf (buffer, sizeof buffer, "#glyph%d-%d",
font_id, subset_glyph_index);
- xmlSetProp (glyph_node, CC2XML ("xlink:href"), C2XML (buffer));
+ xmlSetProp (glyph_node, CC2XML ("xlink:href"), C2XML (buffer));
_cairo_dtostr (buffer, sizeof buffer, glyphs[i].x);
xmlSetProp (glyph_node, CC2XML ("x"), C2XML (buffer));
_cairo_dtostr (buffer, sizeof buffer, glyphs[i].y);
@@ -1707,7 +1707,7 @@ FALLBACK:
return status;
status = _cairo_svg_surface_fill (abstract_surface, op, pattern,
- &path, CAIRO_FILL_RULE_WINDING, 0.0, CAIRO_ANTIALIAS_SUBPIXEL);
+ &path, CAIRO_FILL_RULE_WINDING, 0.0, CAIRO_ANTIALIAS_SUBPIXEL);
_cairo_path_fixed_fini (&path);
@@ -1757,8 +1757,8 @@ _cairo_svg_surface_intersect_clip_path (
snprintf (buffer, sizeof buffer, "url(#clip%d)", document->clip_id);
xmlSetProp (group, CC2XML ("clip-path"), C2XML (buffer));
- xmlSetProp (group, CC2XML ("clip-rule"),
- fill_rule == CAIRO_FILL_RULE_EVEN_ODD ?
+ xmlSetProp (group, CC2XML ("clip-rule"),
+ fill_rule == CAIRO_FILL_RULE_EVEN_ODD ?
CC2XML ("evenodd") : CC2XML ("nonzero"));
document->clip_id++;
@@ -1853,14 +1853,14 @@ _cairo_svg_document_create (cairo_output
document->clip_id = 0;
document->mask_id = 0;
- doc = xmlNewDoc (CC2XML ("1.0"));
+ doc = xmlNewDoc (CC2XML ("1.0"));
node = xmlNewNode (NULL, CC2XML ("svg"));
xmlDocSetRootElement (doc, node);
document->xml_doc = doc;
document->xml_node_main = node;
- document->xml_node_defs = xmlNewChild (node, NULL, CC2XML ("defs"), NULL);
+ document->xml_node_defs = xmlNewChild (node, NULL, CC2XML ("defs"), NULL);
xml_buffer = xmlBufferCreate ();
@@ -1952,12 +1952,12 @@ _cairo_svg_document_finish (cairo_svg_do
_cairo_svg_document_emit_font_subsets (document);
- xmlSetProp (document->xml_node_main, CC2XML ("version"),
+ xmlSetProp (document->xml_node_main, CC2XML ("version"),
CC2XML (_cairo_svg_internal_version_strings [document->svg_version]));
xml_output_buffer = xmlOutputBufferCreateIO ((xmlOutputWriteCallback) _cairo_svg_document_write,
(xmlOutputCloseCallback) NULL,
- (void *) document->output_stream,
+ (void *) document->output_stream,
NULL);
xmlSaveFormatFileTo (xml_output_buffer, document->xml_doc, "UTF-8", 1);
diff --git a/src/cairo-traps.c b/src/cairo-traps.c
index 93f4ead..404461c 100644
--- a/src/cairo-traps.c
+++ b/src/cairo-traps.c
@@ -611,7 +611,7 @@ _compute_x (cairo_line_t *line, cairo_fi
static double
_compute_inverse_slope (cairo_line_t *l)
{
- return (_cairo_fixed_to_double (l->p2.x - l->p1.x) /
+ return (_cairo_fixed_to_double (l->p2.x - l->p1.x) /
_cairo_fixed_to_double (l->p2.y - l->p1.y));
}
diff --git a/src/cairo-unicode.c b/src/cairo-unicode.c
index cf7c373..22b0efb 100644
--- a/src/cairo-unicode.c
+++ b/src/cairo-unicode.c
@@ -143,7 +143,7 @@ _utf8_get_char (const unsigned char *p)
*/
static uint32_t
_utf8_get_char_extended (const unsigned char *p,
- long max_len)
+ long max_len)
{
int i, len;
uint32_t wc = (unsigned char) *p;
diff --git a/src/cairo-wideint.c b/src/cairo-wideint.c
index b5fd555..da68f1b 100644
--- a/src/cairo-wideint.c
+++ b/src/cairo-wideint.c
@@ -476,7 +476,7 @@ _cairo_int64x64_128_mul (cairo_int64_t a
s = _cairo_uint64x64_128_mul (_cairo_int64_to_uint64(a),
_cairo_int64_to_uint64(b));
if (_cairo_int64_negative (a))
- s.hi = _cairo_uint64_sub (s.hi,
+ s.hi = _cairo_uint64_sub (s.hi,
_cairo_int64_to_uint64 (b));
if (_cairo_int64_negative (b))
s.hi = _cairo_uint64_sub (s.hi,
diff --git a/src/cairo-win32-font.c b/src/cairo-win32-font.c
index 94163ce..df5c758 100644
--- a/src/cairo-win32-font.c
+++ b/src/cairo-win32-font.c
@@ -37,7 +37,7 @@
#include "cairoint.h"
#include "cairo-win32-private.h"
-#ifndef SPI_GETFONTSMOOTHINGTYPE
+#ifndef SPI_GETFONTSMOOTHINGTYPE
#define SPI_GETFONTSMOOTHINGTYPE 0x200a
#endif
#ifndef FE_FONTSMOOTHINGCLEARTYPE
@@ -100,10 +100,10 @@ typedef struct {
cairo_bool_t delete_scaled_hfont;
} cairo_win32_scaled_font_t;
-static cairo_status_t
+static cairo_status_t
_cairo_win32_scaled_font_set_metrics (cairo_win32_scaled_font_t *scaled_font);
-static cairo_status_t
+static cairo_status_t
_cairo_win32_scaled_font_init_glyph_metrics (cairo_win32_scaled_font_t *scaled_font,
cairo_scaled_glyph_t *scaled_glyph);
@@ -228,7 +228,7 @@ _win32_scaled_font_create (LOGFONTW
cairo_font_face_t *font_face,
const cairo_matrix_t *font_matrix,
const cairo_matrix_t *ctm,
- const cairo_font_options_t *options)
+ const cairo_font_options_t *options)
{
cairo_win32_scaled_font_t *f;
cairo_matrix_t scale;
@@ -510,7 +510,7 @@ _cairo_win32_scaled_font_create_toy (cai
* interpretation is locale-specific, but it's not clear what
* would be a better alternative.
*/
- logfont.lfCharSet = DEFAULT_CHARSET;
+ logfont.lfCharSet = DEFAULT_CHARSET;
logfont.lfOutPrecision = OUT_DEFAULT_PRECIS;
logfont.lfClipPrecision = CLIP_DEFAULT_PRECIS;
logfont.lfQuality = DEFAULT_QUALITY; /* filled in later */
@@ -529,7 +529,7 @@ _cairo_win32_scaled_font_create_toy (cai
return CAIRO_STATUS_SUCCESS;
}
-static void
+static void
_cairo_win32_scaled_font_fini (void *abstract_font)
{
cairo_win32_scaled_font_t *scaled_font = abstract_font;
@@ -544,12 +544,12 @@ _cairo_win32_scaled_font_fini (void *abs
DeleteObject (scaled_font->unscaled_hfont);
}
-static cairo_int_status_t
+static cairo_int_status_t
_cairo_win32_scaled_font_text_to_glyphs (void *abstract_font,
double x,
double y,
const char *utf8,
- cairo_glyph_t **glyphs,
+ cairo_glyph_t **glyphs,
int *num_glyphs)
{
cairo_win32_scaled_font_t *scaled_font = abstract_font;
@@ -620,7 +620,7 @@ _cairo_win32_scaled_font_text_to_glyphs
if (!GetCharacterPlacementW (hdc, utf16, n16,
0,
- &gcp_results,
+ &gcp_results,
GCP_DIACRITIC | GCP_LIGATE | GCP_GLYPHSHAPE | GCP_REORDER)) {
status = _cairo_win32_print_gdi_error ("_cairo_win32_scaled_font_text_to_glyphs");
goto FAIL2;
@@ -671,7 +671,7 @@ _cairo_win32_scaled_font_text_to_glyphs
return status;
}
-static cairo_status_t
+static cairo_status_t
_cairo_win32_scaled_font_set_metrics (cairo_win32_scaled_font_t *scaled_font)
{
cairo_status_t status;
@@ -726,7 +726,7 @@ _cairo_win32_scaled_font_set_metrics (ca
return CAIRO_STATUS_SUCCESS;
}
-static cairo_status_t
+static cairo_status_t
_cairo_win32_scaled_font_init_glyph_metrics (cairo_win32_scaled_font_t *scaled_font,
cairo_scaled_glyph_t *scaled_glyph)
{
@@ -815,7 +815,7 @@ _cairo_win32_scaled_font_init_glyph_metr
* font-space metrics.
*/
#if 0
-static cairo_status_t
+static cairo_status_t
_cairo_win32_scaled_font_glyph_bbox (void *abstract_font,
const cairo_glyph_t *glyphs,
int num_glyphs,
@@ -1108,7 +1108,7 @@ _cairo_win32_scaled_font_glyph_init (voi
return CAIRO_STATUS_SUCCESS;
}
-static cairo_int_status_t
+static cairo_int_status_t
_cairo_win32_scaled_font_show_glyphs (void *abstract_font,
cairo_operator_t op,
cairo_pattern_t *pattern,
@@ -1206,7 +1206,7 @@ _cairo_win32_scaled_font_show_glyphs (vo
*/
_cairo_pattern_init_for_surface (&mask, mask_surface);
- status = _cairo_surface_composite (op, pattern,
+ status = _cairo_surface_composite (op, pattern,
&mask.base,
&surface->base,
source_x, source_y,
@@ -1228,7 +1228,7 @@ _cairo_fixed_from_FIXED (FIXED f)
return *((cairo_fixed_t *)&f);
}
-static cairo_status_t
+static cairo_status_t
_cairo_win32_scaled_font_init_glyph_path (cairo_win32_scaled_font_t *scaled_font,
cairo_scaled_glyph_t *scaled_glyph)
{
diff --git a/src/cairo-win32-surface.c b/src/cairo-win32-surface.c
index ff14d5b..8976fee 100644
--- a/src/cairo-win32-surface.c
+++ b/src/cairo-win32-surface.c
@@ -65,7 +65,7 @@ _cairo_win32_print_gdi_error (const char
void *lpMsgBuf;
DWORD last_error = GetLastError ();
- if (!FormatMessageA (FORMAT_MESSAGE_ALLOCATE_BUFFER |
+ if (!FormatMessageA (FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
last_error,
@@ -368,7 +368,7 @@ _cairo_win32_surface_get_subimage (cairo
cairo_status_t status;
cairo_content_t content = _cairo_content_from_format (surface->format);
- local =
+ local =
(cairo_win32_surface_t *) _cairo_win32_surface_create_similar (surface,
content,
width,
@@ -376,7 +376,7 @@ _cairo_win32_surface_get_subimage (cairo
if (local->base.status)
return CAIRO_STATUS_NO_MEMORY;
- if (!BitBlt (local->dc,
+ if (!BitBlt (local->dc,
0, 0,
width, height,
surface->dc,
@@ -497,7 +497,7 @@ _cairo_win32_surface_acquire_dest_image
return CAIRO_STATUS_SUCCESS;
}
- status = _cairo_win32_surface_get_subimage (abstract_surface,
+ status = _cairo_win32_surface_get_subimage (abstract_surface,
x1, y1, x2 - x1, y2 - y1,
&local);
if (status)
@@ -833,7 +833,7 @@ _cairo_win32_surface_fill_rectangles (vo
switch (categorize_solid_dest_operator (op, color->alpha_short)) {
case DO_CLEAR:
new_color = RGB (0, 0, 0);
- break;
+ break;
case DO_SOURCE:
new_color = RGB (color->red_short >> 8, color->green_short >> 8, color->blue_short >> 8);
break;
@@ -1014,7 +1014,7 @@ _cairo_win32_surface_show_glyphs (void
/* We can only handle operator SOURCE or OVER with the destination
* having no alpha */
- if ((op != CAIRO_OPERATOR_SOURCE && op != CAIRO_OPERATOR_OVER) ||
+ if ((op != CAIRO_OPERATOR_SOURCE && op != CAIRO_OPERATOR_OVER) ||
(dst->format != CAIRO_FORMAT_RGB24))
return CAIRO_INT_STATUS_UNSUPPORTED;
diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c
index 5d05e24..ed8d498 100644
--- a/src/cairo-xcb-surface.c
+++ b/src/cairo-xcb-surface.c
@@ -530,7 +530,7 @@ _get_image_surface (cairo_xcb_surface_t
image = (cairo_image_surface_t *)
cairo_image_surface_create_for_data (data,
format,
- x2 - x1,
+ x2 - x1,
y2 - y1,
bytes_per_line);
if (image->base.status)
@@ -1026,7 +1026,7 @@ _cairo_xcb_surface_composite_trapezoids
_render_operator (op),
src->picture, dst->picture,
render_format.id,
- render_src_x + attributes.x_offset,
+ render_src_x + attributes.x_offset,
render_src_y + attributes.y_offset,
num_traps, (XCBRenderTRAP *) traps);
diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
index 38bf1bc..7c613b8 100644
--- a/src/cairo-xlib-surface.c
+++ b/src/cairo-xlib-surface.c
@@ -53,10 +53,10 @@ typedef struct _cairo_xlib_surface cairo
static void
_cairo_xlib_surface_ensure_gc (cairo_xlib_surface_t *surface);
-static void
+static void
_cairo_xlib_surface_ensure_src_picture (cairo_xlib_surface_t *surface);
-static void
+static void
_cairo_xlib_surface_ensure_dst_picture (cairo_xlib_surface_t *surface);
static cairo_bool_t
@@ -215,7 +215,7 @@ _cairo_xlib_surface_create_similar_with_
Pixmap pix;
cairo_xlib_surface_t *surface;
int depth = _CAIRO_FORMAT_DEPTH (format);
- XRenderPictFormat *xrender_format = _CAIRO_FORMAT_TO_XRENDER_FORMAT (dpy,
+ XRenderPictFormat *xrender_format = _CAIRO_FORMAT_TO_XRENDER_FORMAT (dpy,
format);
/* As a good first approximation, if the display doesn't have even
@@ -647,7 +647,7 @@ _get_image_surface (cairo_xlib_surface_t
image = (cairo_image_surface_t*)
cairo_image_surface_create_for_data ((unsigned char *) ximage->data,
format,
- ximage->width,
+ ximage->width,
ximage->height,
ximage->bytes_per_line);
if (image->base.status)
@@ -664,7 +664,7 @@ _get_image_surface (cairo_xlib_surface_t
image = (cairo_image_surface_t*)
_cairo_image_surface_create_with_masks ((unsigned char *) ximage->data,
&masks,
- ximage->width,
+ ximage->width,
ximage->height,
ximage->bytes_per_line);
if (image->base.status)
@@ -688,8 +688,8 @@ static void
_cairo_xlib_surface_ensure_src_picture (cairo_xlib_surface_t *surface)
{
if (!surface->src_picture)
- surface->src_picture = XRenderCreatePicture (surface->dpy,
- surface->drawable,
+ surface->src_picture = XRenderCreatePicture (surface->dpy,
+ surface->drawable,
surface->xrender_format,
0, NULL);
}
@@ -718,8 +718,8 @@ static void
_cairo_xlib_surface_ensure_dst_picture (cairo_xlib_surface_t *surface)
{
if (!surface->dst_picture) {
- surface->dst_picture = XRenderCreatePicture (surface->dpy,
- surface->drawable,
+ surface->dst_picture = XRenderCreatePicture (surface->dpy,
+ surface->drawable,
surface->xrender_format,
0, NULL);
_cairo_xlib_surface_set_picture_clip_rects (surface);
@@ -1148,7 +1148,7 @@ _categorize_composite_operation (cairo_x
* make a copy as core drawing can't cross depths and doesn't
* work rightacross visuals of the same depth
*/
- if (_cairo_xlib_surface_same_screen (dst, src) &&
+ if (_cairo_xlib_surface_same_screen (dst, src) &&
!_surfaces_compatible (dst, src))
return DO_UNSUPPORTED;
}
@@ -1629,7 +1629,7 @@ _cairo_xlib_surface_composite_trapezoids
_render_operator (op),
src->src_picture, dst->dst_picture,
pict_format,
- render_src_x + attributes.x_offset,
+ render_src_x + attributes.x_offset,
render_src_y + attributes.y_offset,
(XTrapezoid *) traps, num_traps);
}
@@ -2207,7 +2207,7 @@ _native_byte_order_lsb (void)
return *((char *) &x) == 1;
}
-static cairo_status_t
+static cairo_status_t
_cairo_xlib_surface_add_glyph (Display *dpy,
cairo_scaled_font_t *scaled_font,
cairo_scaled_glyph_t *scaled_glyph)
@@ -2220,7 +2220,7 @@ _cairo_xlib_surface_add_glyph (Display *
cairo_image_surface_t *glyph_surface = scaled_glyph->surface;
if (scaled_font->surface_private == NULL) {
- status = _cairo_xlib_surface_font_init (dpy, scaled_font,
+ status = _cairo_xlib_surface_font_init (dpy, scaled_font,
glyph_surface->format);
if (status)
return status;
@@ -2403,7 +2403,7 @@ _cairo_xlib_surface_show_glyphs8 (cairo
elts = stack_elts;
chars = stack_chars;
} else {
- elts = malloc (num_glyphs * sizeof (XGlyphElt8) +
+ elts = malloc (num_glyphs * sizeof (XGlyphElt8) +
num_glyphs * sizeof (unsigned char));
if (elts == NULL)
return CAIRO_STATUS_NO_MEMORY;
@@ -2464,7 +2464,7 @@ _cairo_xlib_surface_show_glyphs16 (cairo
elts = stack_elts;
chars = stack_chars;
} else {
- elts = malloc (num_glyphs * sizeof (XGlyphElt16) +
+ elts = malloc (num_glyphs * sizeof (XGlyphElt16) +
num_glyphs * sizeof (unsigned short));
if (elts == NULL)
return CAIRO_STATUS_NO_MEMORY;
@@ -2525,7 +2525,7 @@ _cairo_xlib_surface_show_glyphs32 (cairo
elts = stack_elts;
chars = stack_chars;
} else {
- elts = malloc (num_glyphs * sizeof (XGlyphElt32) +
+ elts = malloc (num_glyphs * sizeof (XGlyphElt32) +
num_glyphs * sizeof (unsigned int));
if (elts == NULL)
return CAIRO_STATUS_NO_MEMORY;
diff --git a/src/cairo.c b/src/cairo.c
index 98308c3..8a8e75a 100644
--- a/src/cairo.c
+++ b/src/cairo.c
@@ -769,7 +769,7 @@ cairo_set_tolerance (cairo_t *cr, double
void
cairo_set_antialias (cairo_t *cr, cairo_antialias_t antialias)
{
- if (cr->status)
+ if (cr->status)
return;
cr->status = _cairo_gstate_set_antialias (cr->gstate, antialias);
@@ -1460,7 +1460,7 @@ cairo_rel_move_to (cairo_t *cr, double d
{
cairo_fixed_t dx_fixed, dy_fixed;
- if (cr->status)
+ if (cr->status)
return;
_cairo_gstate_user_to_device_distance (cr->gstate, &dx, &dy);
@@ -2047,9 +2047,9 @@ cairo_reset_clip (cairo_t *cr)
* cairo.
**/
void
-cairo_select_font_face (cairo_t *cr,
- const char *family,
- cairo_font_slant_t slant,
+cairo_select_font_face (cairo_t *cr,
+ const char *family,
+ cairo_font_slant_t slant,
cairo_font_weight_t weight)
{
if (cr->status)
@@ -2097,7 +2097,7 @@ cairo_get_font_face (cairo_t *cr)
* Gets the font extents for the currently selected font.
**/
void
-cairo_font_extents (cairo_t *cr,
+cairo_font_extents (cairo_t *cr,
cairo_font_extents_t *extents)
{
if (cr->status)
@@ -2124,7 +2124,7 @@ cairo_set_font_face (cairo_t *
if (cr->status)
return;
- cr->status = _cairo_gstate_set_font_face (cr->gstate, font_face);
+ cr->status = _cairo_gstate_set_font_face (cr->gstate, font_face);
if (cr->status)
_cairo_set_error (cr, cr->status);
}
@@ -2253,7 +2253,7 @@ cairo_set_scaled_font (cairo_t
if (cr->status)
goto BAIL;
- cr->status = _cairo_gstate_set_font_face (cr->gstate, scaled_font->font_face);
+ cr->status = _cairo_gstate_set_font_face (cr->gstate, scaled_font->font_face);
if (cr->status)
goto BAIL;
@@ -2354,7 +2354,7 @@ cairo_text_extents (cairo_t
**/
void
cairo_glyph_extents (cairo_t *cr,
- cairo_glyph_t *glyphs,
+ cairo_glyph_t *glyphs,
int num_glyphs,
cairo_text_extents_t *extents)
{
diff --git a/src/cairo.h b/src/cairo.h
index 1edc88f..ecda958 100644
--- a/src/cairo.h
+++ b/src/cairo.h
@@ -812,7 +812,7 @@ cairo_font_options_create (void);
cairo_public cairo_font_options_t *
cairo_font_options_copy (const cairo_font_options_t *original);
-cairo_public void
+cairo_public void
cairo_font_options_destroy (cairo_font_options_t *options);
cairo_public cairo_status_t
@@ -857,9 +857,9 @@ cairo_font_options_get_hint_metrics (con
font object inside the the cairo_t. */
cairo_public void
-cairo_select_font_face (cairo_t *cr,
- const char *family,
- cairo_font_slant_t slant,
+cairo_select_font_face (cairo_t *cr,
+ const char *family,
+ cairo_font_slant_t slant,
cairo_font_weight_t weight);
cairo_public void
@@ -895,7 +895,7 @@ cairo_public cairo_font_face_t *
cairo_get_font_face (cairo_t *cr);
cairo_public void
-cairo_font_extents (cairo_t *cr,
+cairo_font_extents (cairo_t *cr,
cairo_font_extents_t *extents);
cairo_public void
@@ -908,7 +908,7 @@ cairo_text_extents (cairo_t
cairo_public void
cairo_glyph_extents (cairo_t *cr,
- cairo_glyph_t *glyphs,
+ cairo_glyph_t *glyphs,
int num_glyphs,
cairo_text_extents_t *extents);
@@ -1011,7 +1011,7 @@ cairo_scaled_font_text_extents (cairo_sc
cairo_public void
cairo_scaled_font_glyph_extents (cairo_scaled_font_t *scaled_font,
- cairo_glyph_t *glyphs,
+ cairo_glyph_t *glyphs,
int num_glyphs,
cairo_text_extents_t *extents);
diff --git a/src/cairoint.h b/src/cairoint.h
index 700e418..0e205b4 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -143,7 +143,7 @@ CAIRO_BEGIN_DECLS
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
/* the real initialization must take place in DllMain */
-# define CAIRO_MUTEX_DECLARE(name) extern CRITICAL_SECTION name;
+# define CAIRO_MUTEX_DECLARE(name) extern CRITICAL_SECTION name;
# define CAIRO_MUTEX_DECLARE_GLOBAL(name) extern LPCRITICAL_SECTION name;
# define CAIRO_MUTEX_LOCK(name) EnterCriticalSection (&name)
# define CAIRO_MUTEX_UNLOCK(name) LeaveCriticalSection (&name)
@@ -153,7 +153,7 @@ CAIRO_BEGIN_DECLS
cairo_private void _cairo_beos_lock(void*);
cairo_private void _cairo_beos_unlock(void*);
/* the real initialization takes place in a global constructor */
-# define CAIRO_MUTEX_DECLARE(name) extern void* name;
+# define CAIRO_MUTEX_DECLARE(name) extern void* name;
# define CAIRO_MUTEX_DECLARE_GLOBAL(name) extern void* name;
# define CAIRO_MUTEX_LOCK(name) _cairo_beos_lock (&name)
# define CAIRO_MUTEX_UNLOCK(name) _cairo_beos_unlock (&name)
@@ -546,8 +546,8 @@ struct _cairo_scaled_font_backend {
(*text_to_glyphs) (void *scaled_font,
double x,
double y,
- const char *utf8,
- cairo_glyph_t **glyphs,
+ const char *utf8,
+ cairo_glyph_t **glyphs,
int *num_glyphs);
unsigned long
@@ -756,7 +756,7 @@ struct _cairo_surface_backend {
* resources. If null, render against this surface, using image
* surfaces as glyphs.
*/
- cairo_int_status_t
+ cairo_int_status_t
(*old_show_glyphs) (cairo_scaled_font_t *font,
cairo_operator_t op,
cairo_pattern_t *pattern,
@@ -1260,13 +1260,13 @@ _cairo_gstate_show_surface (cairo_gstate
double height);
cairo_private cairo_status_t
-_cairo_gstate_select_font_face (cairo_gstate_t *gstate,
- const char *family,
- cairo_font_slant_t slant,
+_cairo_gstate_select_font_face (cairo_gstate_t *gstate,
+ const char *family,
+ cairo_font_slant_t slant,
cairo_font_weight_t weight);
cairo_private cairo_status_t
-_cairo_gstate_set_font_size (cairo_gstate_t *gstate,
+_cairo_gstate_set_font_size (cairo_gstate_t *gstate,
double size);
cairo_private void
@@ -1274,7 +1274,7 @@ _cairo_gstate_get_font_matrix (cairo_gst
cairo_matrix_t *matrix);
cairo_private cairo_status_t
-_cairo_gstate_set_font_matrix (cairo_gstate_t *gstate,
+_cairo_gstate_set_font_matrix (cairo_gstate_t *gstate,
const cairo_matrix_t *matrix);
cairo_private void
@@ -1282,43 +1282,43 @@ _cairo_gstate_get_font_options (cairo_gs
cairo_font_options_t *options);
cairo_private cairo_status_t
-_cairo_gstate_set_font_options (cairo_gstate_t *gstate,
+_cairo_gstate_set_font_options (cairo_gstate_t *gstate,
const cairo_font_options_t *options);
cairo_private cairo_status_t
-_cairo_gstate_get_font_face (cairo_gstate_t *gstate,
+_cairo_gstate_get_font_face (cairo_gstate_t *gstate,
cairo_font_face_t **font_face);
cairo_private cairo_status_t
-_cairo_gstate_get_font_extents (cairo_gstate_t *gstate,
+_cairo_gstate_get_font_extents (cairo_gstate_t *gstate,
cairo_font_extents_t *extents);
cairo_private cairo_status_t
-_cairo_gstate_set_font_face (cairo_gstate_t *gstate,
+_cairo_gstate_set_font_face (cairo_gstate_t *gstate,
cairo_font_face_t *font_face);
cairo_private cairo_status_t
_cairo_gstate_text_to_glyphs (cairo_gstate_t *font,
- const char *utf8,
+ const char *utf8,
double x,
double y,
- cairo_glyph_t **glyphs,
+ cairo_glyph_t **glyphs,
int *num_glyphs);
cairo_private cairo_status_t
_cairo_gstate_glyph_extents (cairo_gstate_t *gstate,
- cairo_glyph_t *glyphs,
+ cairo_glyph_t *glyphs,
int num_glyphs,
cairo_text_extents_t *extents);
cairo_private cairo_status_t
-_cairo_gstate_show_glyphs (cairo_gstate_t *gstate,
- cairo_glyph_t *glyphs,
+_cairo_gstate_show_glyphs (cairo_gstate_t *gstate,
+ cairo_glyph_t *glyphs,
int num_glyphs);
cairo_private cairo_status_t
-_cairo_gstate_glyph_path (cairo_gstate_t *gstate,
- cairo_glyph_t *glyphs,
+_cairo_gstate_glyph_path (cairo_gstate_t *gstate,
+ cairo_glyph_t *glyphs,
int num_glyphs,
cairo_path_fixed_t *path);
@@ -1384,7 +1384,7 @@ _cairo_toy_font_face_create (const char
cairo_font_weight_t weight);
cairo_private void
-_cairo_unscaled_font_init (cairo_unscaled_font_t *font,
+_cairo_unscaled_font_init (cairo_unscaled_font_t *font,
const cairo_unscaled_font_backend_t *backend);
cairo_private cairo_unscaled_font_t *
@@ -1528,7 +1528,7 @@ _cairo_path_fixed_stroke_to_traps (cairo
/* cairo-scaled-font.c */
cairo_private cairo_status_t
-_cairo_scaled_font_init (cairo_scaled_font_t *scaled_font,
+_cairo_scaled_font_init (cairo_scaled_font_t *scaled_font,
cairo_font_face_t *font_face,
const cairo_matrix_t *font_matrix,
const cairo_matrix_t *ctm,
@@ -1543,15 +1543,15 @@ cairo_private void
_cairo_scaled_font_fini (cairo_scaled_font_t *scaled_font);
cairo_private cairo_status_t
-_cairo_scaled_font_font_extents (cairo_scaled_font_t *scaled_font,
+_cairo_scaled_font_font_extents (cairo_scaled_font_t *scaled_font,
cairo_font_extents_t *extents);
cairo_private cairo_status_t
_cairo_scaled_font_text_to_glyphs (cairo_scaled_font_t *scaled_font,
double x,
double y,
- const char *utf8,
- cairo_glyph_t **glyphs,
+ const char *utf8,
+ cairo_glyph_t **glyphs,
int *num_glyphs);
cairo_private cairo_status_t
@@ -1582,7 +1582,7 @@ _cairo_scaled_font_show_glyphs (cairo_sc
cairo_private cairo_status_t
_cairo_scaled_font_glyph_path (cairo_scaled_font_t *scaled_font,
- const cairo_glyph_t *glyphs,
+ const cairo_glyph_t *glyphs,
int num_glyphs,
cairo_path_fixed_t *path);
@@ -2116,7 +2116,7 @@ cairo_private void
_cairo_pattern_transform (cairo_pattern_t *pattern,
const cairo_matrix_t *ctm_inverse);
-cairo_private cairo_bool_t
+cairo_private cairo_bool_t
_cairo_pattern_is_opaque_solid (const cairo_pattern_t *pattern);
cairo_bool_t
diff --git a/test/cairo-test-directfb.c b/test/cairo-test-directfb.c
index 13049c5..c2cf021 100644
--- a/test/cairo-test-directfb.c
+++ b/test/cairo-test-directfb.c
@@ -39,8 +39,8 @@ static DFBInfo *init(void) {
DFBDisplayLayerConfig layer_config;
DFBGraphicsDeviceDescription desc;
int err;
- DFBInfo *info = malloc(sizeof(DFBInfo));
- if( !info )
+ DFBInfo *info = malloc(sizeof(DFBInfo));
+ if( !info )
return NULL;
@@ -68,7 +68,7 @@ create_directfb_surface (cairo_test_t* t
DFBWindowDescription desc;
int err;
DFBInfo *info = init();
- if( !info )
+ if( !info )
return NULL;
*closure = info;
@@ -94,7 +94,7 @@ create_directfb_surface (cairo_test_t* t
cairo_surface_t *
create_directfb_bitmap_surface (cairo_test_t* test, cairo_format_t format,
- void **closure) {
+ void **closure) {
int err;
DFBInfo *info = init();
if( !info ) return NULL;
@@ -102,7 +102,7 @@ create_directfb_bitmap_surface (cairo_te
info->window= NULL; /* make sure window is null*/
DFBSurfaceDescription desc;
- desc.flags = DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT;
+ desc.flags = DSDESC_WIDTH | DSDESC_HEIGHT | DSDESC_PIXELFORMAT;
desc.caps = DSCAPS_NONE;
desc.width = test->width;
desc.height = test->height;
@@ -118,10 +118,10 @@ cleanup_directfb (void* closure) {
DFBInfo *info = (DFBInfo *)closure;
if( info->surface )
info->surface->Release( info->surface );
- if( info->window )
+ if( info->window )
info->window->Release( info->window );
- if( info->layer )
+ if( info->layer )
info->layer->Release( info->layer );
- if( info->dfb )
+ if( info->dfb )
info->dfb->Release( info->dfb );
}
diff --git a/test/cairo-test.c b/test/cairo-test.c
index 09e8012..1072c77 100644
--- a/test/cairo-test.c
+++ b/test/cairo-test.c
@@ -119,7 +119,7 @@ cairo_test_log (const char *fmt, ...)
void
xasprintf (char **strp, const char *fmt, ...)
{
-#ifdef HAVE_VASPRINTF
+#ifdef HAVE_VASPRINTF
va_list va;
int ret;
@@ -1143,7 +1143,7 @@ create_ps_surface (cairo_test_t *test,
/* Sanitize back to a real cairo_content_t value. */
if (content == CAIRO_TEST_CONTENT_COLOR_ALPHA_FLATTENED)
- content = CAIRO_CONTENT_COLOR_ALPHA;
+ content = CAIRO_CONTENT_COLOR_ALPHA;
*closure = ptc = xmalloc (sizeof (ps_target_closure_t));
@@ -1328,7 +1328,7 @@ cleanup_pdf (void *closure)
static const char *svg_ignored_tests[] = {
/* rectangle-rounding-error uses CAIRO_ANTIALIAS_NONE,
* which is not supported */
- "rectangle-rounding-error",
+ "rectangle-rounding-error",
NULL
};
@@ -1353,7 +1353,7 @@ create_svg_surface (cairo_test_t *test,
cairo_surface_t *surface;
for (i = 0; svg_ignored_tests[i] != NULL; i++)
- if (strcmp (test->name, svg_ignored_tests[i]) == 0)
+ if (strcmp (test->name, svg_ignored_tests[i]) == 0)
return NULL;
*closure = ptc = xmalloc (sizeof (svg_target_closure_t));
@@ -1374,7 +1374,7 @@ create_svg_surface (cairo_test_t *test,
if (content == CAIRO_CONTENT_COLOR) {
ptc->target = surface;
- surface = cairo_surface_create_similar (ptc->target,
+ surface = cairo_surface_create_similar (ptc->target,
CAIRO_CONTENT_COLOR,
width, height);
} else {
@@ -1606,7 +1606,7 @@ cairo_test_expecting (cairo_test_t *test
const char *tname;
cairo_test_status_t status, ret;
cairo_test_target_t **targets_to_test;
- cairo_test_target_t targets[] =
+ cairo_test_target_t targets[] =
{
{ "image", CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR_ALPHA,
create_image_surface, cairo_surface_write_to_png, NULL},
@@ -1640,26 +1640,26 @@ cairo_test_expecting (cairo_test_t *test
#if CAIRO_CAN_TEST_GLITZ_GLX_SURFACE
{ "glitz-glx", CAIRO_SURFACE_TYPE_GLITZ,CAIRO_CONTENT_COLOR_ALPHA,
create_cairo_glitz_glx_surface, cairo_surface_write_to_png,
- cleanup_cairo_glitz_glx },
+ cleanup_cairo_glitz_glx },
{ "glitz-glx", CAIRO_SURFACE_TYPE_GLITZ, CAIRO_CONTENT_COLOR,
create_cairo_glitz_glx_surface, cairo_surface_write_to_png,
- cleanup_cairo_glitz_glx },
+ cleanup_cairo_glitz_glx },
#endif
#if CAIRO_CAN_TEST_GLITZ_AGL_SURFACE
{ "glitz-agl", CAIRO_SURFACE_TYPE_GLITZ, CAIRO_CONTENT_COLOR_ALPHA,
create_cairo_glitz_agl_surface, cairo_surface_write_to_png,
- cleanup_cairo_glitz_agl },
+ cleanup_cairo_glitz_agl },
{ "glitz-agl", CAIRO_SURFACE_TYPE_GLITZ, CAIRO_CONTENT_COLOR,
create_cairo_glitz_agl_surface, cairo_surface_write_to_png,
- cleanup_cairo_glitz_agl },
+ cleanup_cairo_glitz_agl },
#endif
#if CAIRO_CAN_TEST_GLITZ_WGL_SURFACE
{ "glitz-wgl", CAIRO_SURFACE_TYPE_GLITZ, CAIRO_CONTENT_COLOR_ALPHA,
create_cairo_glitz_wgl_surface, cairo_surface_write_to_png,
- cleanup_cairo_glitz_wgl },
+ cleanup_cairo_glitz_wgl },
{ "glitz-wgl", CAIRO_SURFACE_TYPE_GLITZ, CAIRO_CONTENT_COLOR,
create_cairo_glitz_wgl_surface, cairo_surface_write_to_png,
- cleanup_cairo_glitz_wgl },
+ cleanup_cairo_glitz_wgl },
#endif
#endif /* CAIRO_HAS_GLITZ_SURFACE */
#if 0 && CAIRO_HAS_QUARTZ_SURFACE
@@ -1830,7 +1830,7 @@ cairo_test_expecting (cairo_test_t *test
}
cairo_test_status_t
-cairo_test_expect_failure (cairo_test_t *test,
+cairo_test_expect_failure (cairo_test_t *test,
cairo_test_draw_function_t draw,
const char *because)
{
@@ -1858,7 +1858,7 @@ cairo_test_create_surface_from_png (cons
char *srcdir = getenv ("srcdir");
image = cairo_image_surface_create_from_png (filename);
- if (cairo_surface_status(image)) {
+ if (cairo_surface_status(image)) {
/* expect not found when running with srcdir != builddir
* such as when 'make distcheck' is run
*/
diff --git a/test/cairo-test.h b/test/cairo-test.h
index c5e122d..d47c47f 100644
--- a/test/cairo-test.h
+++ b/test/cairo-test.h
@@ -108,7 +108,7 @@ cairo_test (cairo_test_t *test, cairo_te
* reason. Any test calling this variant should be listed in the
* XFAIL_TESTS list in Makefile.am. */
cairo_test_status_t
-cairo_test_expect_failure (cairo_test_t *test,
+cairo_test_expect_failure (cairo_test_t *test,
cairo_test_draw_function_t draw,
const char *reason);
diff --git a/test/imagediff.c b/test/imagediff.c
index 90126ed..d030e76 100644
--- a/test/imagediff.c
+++ b/test/imagediff.c
@@ -31,7 +31,7 @@
#include "write-png.h"
#include "xmalloc.h"
-int
+int
main (int argc, char *argv[])
{
int total_pixels_changed;
diff --git a/test/write-png.c b/test/write-png.c
index 3cb023d..83ba2b5 100644
--- a/test/write-png.c
+++ b/test/write-png.c
@@ -76,7 +76,7 @@ write_png_argb32 (unsigned char *buffer,
png_init_io (png, file);
png_set_IHDR (png, info,
width, height, 8,
- PNG_COLOR_TYPE_RGB_ALPHA,
+ PNG_COLOR_TYPE_RGB_ALPHA,
PNG_INTERLACE_NONE,
PNG_COMPRESSION_TYPE_DEFAULT,
PNG_FILTER_TYPE_DEFAULT);
diff-tree 00592e075754594605fddfb2a702f3d2caa7c55c (from 4670366ede0b0ed1abf47f4595a64bc5cd3c19fc)
Author: Carl Worth <cworth at cworth.org>
Date: Tue Jun 6 15:38:58 2006 -0700
Remove trailing whitespace from lines with a single brace.
This patch was produced with the following (GNU) sed script:
sed -i -r -e '/^[ \t]*[{}][ \t]*/ s/[ \t]+$//'
run on all *.[ch] files within cairo.
diff --git a/pixman/src/fbmmx.c b/pixman/src/fbmmx.c
index 408c22c..8ff9f9f 100644
--- a/pixman/src/fbmmx.c
+++ b/pixman/src/fbmmx.c
@@ -171,7 +171,7 @@ static __inline__ __m64
expand_alpha_rev (__m64 pixel)
{
return _mm_shuffle_pi16 (pixel, _MM_SHUFFLE(0, 0, 0, 0));
-}
+}
static __inline__ __m64
invert_colors (__m64 pixel)
@@ -860,7 +860,7 @@ void fbComposeSetupMMX(void)
composeFunctions.combineC[PIXMAN_OPERATOR_ADD] = mmxCombineAddC;
composeFunctions.combineMaskU = mmxCombineMaskU;
- }
+ }
}
@@ -2237,7 +2237,7 @@ fbSolidFillmmx (FbPixels *pDraw,
int width,
int height,
FbBits xor)
-{
+{
FbStride stride;
int bpp;
ullong fill;
diff --git a/pixman/src/icimage.c b/pixman/src/icimage.c
index ce03a97..5425f65 100644
--- a/pixman/src/icimage.c
+++ b/pixman/src/icimage.c
@@ -521,7 +521,7 @@ pixman_image_destroyClip (pixman_image_t
}
image->clientClip = NULL;
image->clientClipType = CT_NONE;
-}
+}
int
pixman_image_set_clip_region (pixman_image_t *image,
@@ -883,7 +883,7 @@ FbComputeCompositeRegion (pixman_region1
{
pixman_region_destroy (region);
return 0;
- }
+ }
if (iMask->alphaMap)
{
if (!FbClipImageSrc (region, iMask->alphaMap,
diff --git a/src/cairo-atsui-font.c b/src/cairo-atsui-font.c
index 4adeabd..c94f178 100644
--- a/src/cairo-atsui-font.c
+++ b/src/cairo-atsui-font.c
@@ -535,7 +535,7 @@ _cairo_atsui_font_text_to_glyphs (void
&glyphCount);
*num_glyphs = glyphCount - 1;
- *glyphs =
+ *glyphs =
(cairo_glyph_t *) malloc(*num_glyphs * (sizeof (cairo_glyph_t)));
if (*glyphs == NULL) {
return CAIRO_STATUS_NO_MEMORY;
diff --git a/src/cairo-clip.c b/src/cairo-clip.c
index b0d142b..d14dd2f 100644
--- a/src/cairo-clip.c
+++ b/src/cairo-clip.c
@@ -317,7 +317,7 @@ _cairo_clip_intersect_region (cairo_clip
== PIXMAN_REGION_STATUS_SUCCESS) {
pixman_region_destroy (clip->region);
clip->region = intersection;
- } else {
+ } else {
status = CAIRO_STATUS_NO_MEMORY;
}
pixman_region_destroy (region);
diff --git a/src/cairo-directfb-surface.c b/src/cairo-directfb-surface.c
index 8776581..11bd3f4 100644
--- a/src/cairo-directfb-surface.c
+++ b/src/cairo-directfb-surface.c
@@ -228,7 +228,7 @@ static IDirectFBSurface *cairo_directfb_
buffer->Lock(buffer,DSLF_READ,&ndata,&npitch);
buffer->Unlock(buffer);
assert( ( nwidth == width) && (nheight == height));
- }
+ }
#endif
return buffer;
}
@@ -252,7 +252,7 @@ _cairo_directfb_surface_get_image (cairo
if( surface->buffer_data == data ) {
cairo_surface_reference(surface->buffer_image);
}
- }
+ }
if( surface->buffer_data != data ){
/* new off screen buffer */
diff --git a/src/cairo-font-options.c b/src/cairo-font-options.c
index 5ffae46..6764c2c 100644
--- a/src/cairo-font-options.c
+++ b/src/cairo-font-options.c
@@ -154,7 +154,7 @@ cairo_font_options_status (cairo_font_op
return CAIRO_STATUS_NO_MEMORY;
else
return CAIRO_STATUS_SUCCESS;
-}
+}
/**
* cairo_font_options_merge:
diff --git a/src/cairo-font-subset.c b/src/cairo-font-subset.c
index f96b2a4..bb50566 100644
--- a/src/cairo-font-subset.c
+++ b/src/cairo-font-subset.c
@@ -652,7 +652,7 @@ cairo_pdf_ft_font_write_offset_table (ca
return status;
return font->status;
-}
+}
static unsigned long
cairo_pdf_ft_font_calculate_checksum (cairo_pdf_ft_font_t *font,
diff --git a/src/cairo-font.c b/src/cairo-font.c
index f3b1c9d..87f300e 100644
--- a/src/cairo-font.c
+++ b/src/cairo-font.c
@@ -447,7 +447,7 @@ _cairo_unscaled_font_reference (cairo_un
void
_cairo_unscaled_font_destroy (cairo_unscaled_font_t *unscaled_font)
-{
+{
if (unscaled_font == NULL)
return;
diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index 4bc8aec..0d03d4e 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -1407,7 +1407,7 @@ _cairo_ft_scaled_font_create (cairo_ft_u
const cairo_matrix_t *ctm,
const cairo_font_options_t *options,
cairo_ft_options_t ft_options)
-{
+{
cairo_ft_scaled_font_t *scaled_font = NULL;
FT_Face face;
FT_Size_Metrics *metrics;
diff --git a/src/cairo-hash.c b/src/cairo-hash.c
index e649412..6b9f3d0 100644
--- a/src/cairo-hash.c
+++ b/src/cairo-hash.c
@@ -145,7 +145,7 @@ struct _cairo_hash_table {
**/
cairo_hash_table_t *
_cairo_hash_table_create (cairo_hash_keys_equal_func_t keys_equal)
-{
+{
cairo_hash_table_t *hash_table;
hash_table = malloc (sizeof (cairo_hash_table_t));
@@ -231,7 +231,7 @@ static cairo_hash_entry_t **
_cairo_hash_table_lookup_internal (cairo_hash_table_t *hash_table,
cairo_hash_entry_t *key,
cairo_bool_t key_is_unique)
-{
+{
cairo_hash_entry_t **entry, **first_available = NULL;
unsigned long table_size, i, idx, step;
diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
index 75f9234..da0649f 100644
--- a/src/cairo-image-surface.c
+++ b/src/cairo-image-surface.c
@@ -566,7 +566,7 @@ _cairo_image_surface_clone_similar (void
*clone_out = cairo_surface_reference (src);
return CAIRO_STATUS_SUCCESS;
- }
+ }
return CAIRO_INT_STATUS_UNSUPPORTED;
}
diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c
index f5e468c..1e8015b 100644
--- a/src/cairo-pattern.c
+++ b/src/cairo-pattern.c
@@ -1109,7 +1109,7 @@ _cairo_pattern_is_opaque (const cairo_pa
case CAIRO_PATTERN_TYPE_LINEAR:
case CAIRO_PATTERN_TYPE_RADIAL:
return _gradient_is_opaque (&pattern->gradient.base);
- }
+ }
ASSERT_NOT_REACHED;
return FALSE;
diff --git a/src/cairo-png.c b/src/cairo-png.c
index a4fcd4e..06c6efb 100644
--- a/src/cairo-png.c
+++ b/src/cairo-png.c
@@ -286,7 +286,7 @@ cairo_surface_write_to_png_stream (cairo
png_closure.closure = closure;
return write_png (surface, stream_write_func, &png_closure);
-}
+}
static INLINE int
multiply_alpha (int alpha, int color)
diff --git a/src/cairo-rectangle.c b/src/cairo-rectangle.c
index 2f30e92..bf04978 100644
--- a/src/cairo-rectangle.c
+++ b/src/cairo-rectangle.c
@@ -81,5 +81,5 @@ _cairo_rectangle_intersect (cairo_rectan
dest->y = y1;
dest->width = x2 - x1;
dest->height = y2 - y1;
- }
+ }
}
diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index e7f203b..2d3218d 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -1899,7 +1899,7 @@ _format_is_opaque (cairo_format_t format
*/
cairo_bool_t
_cairo_surface_is_opaque (const cairo_surface_t *surface)
-{
+{
if (_cairo_surface_is_image (surface)) {
const cairo_image_surface_t *image_surface = (cairo_image_surface_t *) surface;
diff --git a/src/cairo-svg-surface.c b/src/cairo-svg-surface.c
index 4019639..720d936 100644
--- a/src/cairo-svg-surface.c
+++ b/src/cairo-svg-surface.c
@@ -1481,7 +1481,7 @@ _cairo_svg_surface_paint (void *abs
_cairo_dtostr (buffer, sizeof buffer, surface->height);
xmlSetProp (rect, CC2XML ("height"), C2XML (buffer));
xmlSetProp (rect, CC2XML ("style"), CC2XML ("opacity:1; stroke:none; fill:rgb(0,0,0);"));
- }
+ }
return CAIRO_STATUS_SUCCESS;
}
}
@@ -1764,7 +1764,7 @@ _cairo_svg_surface_intersect_clip_path (
document->clip_id++;
surface->xml_node = group;
surface->clip_level++;
- }
+ }
return status;
}
diff --git a/src/cairo-win32-surface.c b/src/cairo-win32-surface.c
index e931a80..ff14d5b 100644
--- a/src/cairo-win32-surface.c
+++ b/src/cairo-win32-surface.c
@@ -801,7 +801,7 @@ categorize_solid_dest_operator (cairo_op
else
return DO_UNSUPPORTED;
break;
- }
+ }
ASSERT_NOT_REACHED;
return DO_UNSUPPORTED;
@@ -1081,7 +1081,7 @@ FAIL:
free(dx_buf);
}
return (win_result) ? CAIRO_STATUS_SUCCESS : CAIRO_INT_STATUS_UNSUPPORTED;
-}
+}
#undef STACK_GLYPH_SIZE
diff --git a/test/clip-operator.c b/test/clip-operator.c
index c11f33d..10df2b3 100644
--- a/test/clip-operator.c
+++ b/test/clip-operator.c
@@ -102,7 +102,7 @@ draw_polygon (cairo_t *cr, int x, int y)
static void
draw_rects (cairo_t *cr, int x, int y)
-{
+{
double block_width = (int)(0.33 * WIDTH + 0.5);
double block_height = (int)(0.33 * HEIGHT + 0.5);
int i, j;
diff --git a/test/operator-clear.c b/test/operator-clear.c
index 34f1a85..6bd5298 100644
--- a/test/operator-clear.c
+++ b/test/operator-clear.c
@@ -96,7 +96,7 @@ draw_glyphs (cairo_t *cr, int x, int y)
static void
draw_polygon (cairo_t *cr, int x, int y)
-{
+{
double width = (int)(0.9 * WIDTH);
double height = (int)(0.9 * HEIGHT);
x += 0.05 * WIDTH;
@@ -115,7 +115,7 @@ draw_polygon (cairo_t *cr, int x, int y)
static void
draw_rects (cairo_t *cr, int x, int y)
-{
+{
double block_width = (int)(0.33 * WIDTH + 0.5);
double block_height = (int)(0.33 * HEIGHT + 0.5);
int i, j;
diff --git a/test/operator-source.c b/test/operator-source.c
index b61a6c5..fd9ad5b 100644
--- a/test/operator-source.c
+++ b/test/operator-source.c
@@ -133,7 +133,7 @@ draw_glyphs (cairo_t *cr, int x, int y)
static void
draw_polygon (cairo_t *cr, int x, int y)
-{
+{
double width = (int)(0.9 * WIDTH);
double height = (int)(0.9 * HEIGHT);
x += 0.05 * WIDTH;
@@ -152,7 +152,7 @@ draw_polygon (cairo_t *cr, int x, int y)
static void
draw_rects (cairo_t *cr, int x, int y)
-{
+{
double block_width = (int)(0.33 * WIDTH + 0.5);
double block_height = (int)(0.33 * HEIGHT + 0.5);
int i, j;
diff --git a/test/unbounded-operator.c b/test/unbounded-operator.c
index 853627b..74c9537 100644
--- a/test/unbounded-operator.c
+++ b/test/unbounded-operator.c
@@ -82,7 +82,7 @@ draw_glyphs (cairo_t *cr, int x, int y)
static void
draw_polygon (cairo_t *cr, int x, int y)
-{
+{
double width = (int)(0.9 * WIDTH);
double height = (int)(0.9 * HEIGHT);
x += 0.05 * WIDTH;
@@ -101,7 +101,7 @@ draw_polygon (cairo_t *cr, int x, int y)
static void
draw_rects (cairo_t *cr, int x, int y)
-{
+{
double block_width = (int)(0.33 * WIDTH + 0.5);
double block_height = (int)(0.33 * HEIGHT + 0.5);
int i, j;
diff-tree 4670366ede0b0ed1abf47f4595a64bc5cd3c19fc (from 80b8deb1e4f9d0b856106031c6a7a629cca7552c)
Author: Carl Worth <cworth at cworth.org>
Date: Tue Jun 6 15:35:48 2006 -0700
Remove trailing whitespace from lines that look like comments.
This patch was produced with the following (GNU) sed script:
sed -i -r -e '/^[ \t]*\/?\*/ s/[ \t]+$//'
run on all *.[ch] files within cairo, (though I manually excluded
src/cairo-atsui-font.c which has a code line that appears as a comment
to this script).
diff --git a/doc/tutorial/src/include/cairo-tutorial-xlib.h b/doc/tutorial/src/include/cairo-tutorial-xlib.h
index f500420..bfb4e9f 100644
--- a/doc/tutorial/src/include/cairo-tutorial-xlib.h
+++ b/doc/tutorial/src/include/cairo-tutorial-xlib.h
@@ -1,5 +1,5 @@
/* cairo-tutorial-xlib.h - a tutorial framework for cairo with xlib
- *
+ *
* Copyright © 2005, Keith Packard
*
* This program is free software; you can redistribute it and/or modify
diff --git a/pixman/src/fbmmx.c b/pixman/src/fbmmx.c
index 1d3f759..408c22c 100644
--- a/pixman/src/fbmmx.c
+++ b/pixman/src/fbmmx.c
@@ -24,7 +24,7 @@
*
* Author: Søren Sandmann (sandmann at redhat.com)
* Minor Improvements: Nicholas Miell (nmiell at gmail.com)
- * MMX code paths for fbcompose.c by Lars Knoll (lars at trolltech.com)
+ * MMX code paths for fbcompose.c by Lars Knoll (lars at trolltech.com)
*
* Based on work by Owen Taylor
*/
@@ -286,14 +286,14 @@ store8888 (__m64 v)
/* Expand 16 bits positioned at @pos (0-3) of a mmx register into
*
* 00RR00GG00BB
- *
+ *
* --- Expanding 565 in the low word ---
- *
+ *
* m = (m << (32 - 3)) | (m << (16 - 5)) | m;
* m = m & (01f0003f001f);
* m = m * (008404100840);
* m = m >> 8;
- *
+ *
* Note the trick here - the top word is shifted by another nibble to
* avoid it bumping into the middle word
*/
diff --git a/pixman/src/fbmmx.h b/pixman/src/fbmmx.h
index 5da42a0..1a6a27d 100644
--- a/pixman/src/fbmmx.h
+++ b/pixman/src/fbmmx.h
@@ -23,7 +23,7 @@
*
* Author: Søren Sandmann (sandmann at redhat.com)
* Lars Knoll (lars at trolltech.com)
- *
+ *
* Based on work by Owen Taylor
*/
#ifdef USE_MMX
diff --git a/pixman/src/icbltone.c b/pixman/src/icbltone.c
index 9f0a391..022d498 100644
--- a/pixman/src/icbltone.c
+++ b/pixman/src/icbltone.c
@@ -37,7 +37,7 @@
* Example: srcX = 0 dstX = 8 (FB unit 32 dstBpp 8)
*
* **** **** **** **** **** **** **** ****
- * ^
+ * ^
* ******** ******** ******** ********
* ^
*
@@ -190,7 +190,7 @@ fbBltOne (FbStip *src,
pixelsPerDst = FB_UNIT / dstBpp;
/*
- * Number of source stipple patterns in FbStip
+ * Number of source stipple patterns in FbStip
*/
unitsPerSrc = FB_STIP_UNIT / pixelsPerDst;
@@ -243,8 +243,8 @@ fbBltOne (FbStip *src,
#endif
/*
- * Compute total number of destination words written, but
- * don't count endmask
+ * Compute total number of destination words written, but
+ * don't count endmask
*/
nDst = nmiddle;
if (startmask)
@@ -633,7 +633,7 @@ fbBltOne24 (FbStip *srcLine,
while (nl--)
{
mask = fbStipple24Bits[rot>>3][stip];
- *dst = FbOpaqueStipple (mask,
+ *dst = FbOpaqueStipple (mask,
FbRot24(fgxor, rot),
FbRot24(bgxor, rot));
dst++;
diff --git a/pixman/src/iccolor.c b/pixman/src/iccolor.c
index e3e2a30..716382f 100644
--- a/pixman/src/iccolor.c
+++ b/pixman/src/iccolor.c
@@ -15,7 +15,7 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
diff --git a/pixman/src/icformat.c b/pixman/src/icformat.c
index 7837aea..033b65a 100644
--- a/pixman/src/icformat.c
+++ b/pixman/src/icformat.c
@@ -15,7 +15,7 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
diff --git a/pixman/src/icimage.c b/pixman/src/icimage.c
index f4fd516..ce03a97 100644
--- a/pixman/src/icimage.c
+++ b/pixman/src/icimage.c
@@ -15,7 +15,7 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
@@ -304,7 +304,7 @@ pixman_image_init (pixman_image_t *image
image->subWindowMode = ClipByChildren;
image->polyEdge = PolyEdgeSharp;
image->polyMode = PolyModePrecise;
- /*
+ /*
* In the server this was 0 because the composite clip list
* can be referenced from a window (and often is)
*/
diff --git a/pixman/src/icint.h b/pixman/src/icint.h
index f65e26f..d45f632 100644
--- a/pixman/src/icint.h
+++ b/pixman/src/icint.h
@@ -966,7 +966,7 @@ typedef struct _PictFormat *PictFormatPt
#define PICT_g1 PICT_FORMAT(1,PICT_TYPE_GRAY,0,0,0,0)
/*
- * For dynamic indexed visuals (GrayScale and PseudoColor), these control the
+ * For dynamic indexed visuals (GrayScale and PseudoColor), these control the
* selection of colors allocated for drawing to Pictures. The default
* policy depends on the size of the colormap:
*
@@ -997,7 +997,7 @@ typedef struct _PictFormat *PictFormatPt
* 4x4x4 cube allocates another two and nine more are allocated to fill
* in the 13 levels. When the 4x4x4 cube is not allocated, a total of
* 11 cells are allocated.
- */
+ */
#define PictureCmapPolicyInvalid -1
#define PictureCmapPolicyDefault 0
@@ -1037,8 +1037,8 @@ typedef uint32_t xFixed_1_16;
typedef int32_t xFixed_16_16;
/*
- * An unadorned "xFixed" is the same as xFixed_16_16,
- * (since it's quite common in the code)
+ * An unadorned "xFixed" is the same as xFixed_16_16,
+ * (since it's quite common in the code)
*/
typedef xFixed_16_16 xFixed;
#define XFIXED_BITS 16
diff --git a/pixman/src/icrop.h b/pixman/src/icrop.h
index d65b5c4..4e6ac82 100644
--- a/pixman/src/icrop.h
+++ b/pixman/src/icrop.h
@@ -94,7 +94,7 @@ extern const FbMergeRopRec FbMergeRopBit
#define fbAndStip(rop,fg,pm) fbAndT(rop,fg,pm,FbStip)
/*
- * Stippling operations;
+ * Stippling operations;
*/
/* half of table */
diff --git a/pixman/src/ictransform.c b/pixman/src/ictransform.c
index 982f929..6e82161 100644
--- a/pixman/src/ictransform.c
+++ b/pixman/src/ictransform.c
@@ -15,7 +15,7 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Keith Packard, SuSE, Inc.
diff --git a/pixman/src/pixregion.c b/pixman/src/pixregion.c
index bb2eb4f..9ecd04a 100644
--- a/pixman/src/pixregion.c
+++ b/pixman/src/pixregion.c
@@ -109,9 +109,9 @@ slim_hidden_proto(pixman_region_union)
* there is no separate list of band start pointers.
*
* The y-x band representation does not minimize rectangles. In particular,
- * if a rectangle vertically crosses a band (the rectangle has scanlines in
+ * if a rectangle vertically crosses a band (the rectangle has scanlines in
* the y1 to y2 area spanned by the band), then the rectangle may be broken
- * down into two or more smaller rectangles stacked one atop the other.
+ * down into two or more smaller rectangles stacked one atop the other.
*
* ----------- -----------
* | | | | band 0
@@ -137,7 +137,7 @@ slim_hidden_proto(pixman_region_union)
* pixman_region_validateTree. Bob Scheifler changed the representation to be more
* compact when empty or a single rectangle, and did a bunch of gratuitous
* reformatting. Carl Worth did further gratuitous reformatting while re-merging
- * the server and client region code into libpixregion.
+ * the server and client region code into libpixregion.
*/
/* true iff two Boxes overlap */
@@ -1249,7 +1249,7 @@ slim_hidden_def(pixman_region_union);
/*-
*-----------------------------------------------------------------------
* pixman_region_append --
- *
+ *
* "Append" the rgn rectangles onto the end of dstrgn, maintaining
* knowledge of YX-banding when it's easy. Otherwise, dstrgn just
* becomes a non-y-x-banded random collection of rectangles, and not
@@ -1420,7 +1420,7 @@ QuickSortRects(
/*-
*-----------------------------------------------------------------------
* pixman_region_validate --
- *
+ *
* Take a ``region'' which is a non-y-x-banded random collection of
* rectangles, and compute a nice region which is the union of all the
* rectangles.
@@ -2421,7 +2421,7 @@ pixman_region16_clip_spans(
if (!prgnDst->data)
{
/* Do special fast code with clip boundaries in registers(?) */
- /* It doesn't pay much to make use of fSorted in this case,
+ /* It doesn't pay much to make use of fSorted in this case,
so we lump everything together. */
int clipx1, clipx2, clipy1, clipy2;
diff --git a/pixman/src/slim_internal.h b/pixman/src/slim_internal.h
index 5c1e5cf..24b947a 100644
--- a/pixman/src/slim_internal.h
+++ b/pixman/src/slim_internal.h
@@ -12,7 +12,7 @@
* Richard Henderson makes no representations about the suitability of this
* software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
* RICHARD HENDERSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
* NO EVENT SHALL RICHARD HENDERSON BE LIABLE FOR ANY SPECIAL, INDIRECT OR
diff --git a/src/cairo-arc.c b/src/cairo-arc.c
index e65e381..fdef6a3 100644
--- a/src/cairo-arc.c
+++ b/src/cairo-arc.c
@@ -238,7 +238,7 @@ _cairo_arc_in_direction (cairo_t *cr,
* @radius: the radius of the arc
* @angle1: the start angle, in radians
* @angle2: the end angle, in radians
- *
+ *
* Compute a path for the given arc and append it onto the current
* path within @cr. The arc will be accurate within the current
* tolerance and given the current transformation.
@@ -267,7 +267,7 @@ _cairo_arc_path (cairo_t *cr,
* @ctm: the current transformation matrix
* @tolerance: the current tolerance value
* @path: the path onto which th earc will be appended
- *
+ *
* Compute a path for the given arc (defined in the negative
* direction) and append it onto the current path within @cr. The arc
* will be accurate within the current tolerance and given the current
diff --git a/src/cairo-array.c b/src/cairo-array.c
index 7252101..49d764c 100644
--- a/src/cairo-array.c
+++ b/src/cairo-array.c
@@ -39,7 +39,7 @@
/**
* _cairo_array_init:
- *
+ *
* Initialize a new cairo_array object to store objects each of size
* @element_size.
*
@@ -66,7 +66,7 @@ _cairo_array_init (cairo_array_t *array,
* _cairo_array_init_snapshot:
* @array: A #cairo_array_t to be initialized as a snapshot
* @other: The #cairo_array_t from which to create the snapshot
- *
+ *
* Initialize @array as an immutable copy of @other. It is an error to
* call an array-modifying function (other than _cairo_array_fini) on
* @array after calling this function.
@@ -104,7 +104,7 @@ _cairo_array_fini (cairo_array_t *array)
/**
* _cairo_array_grow_by:
- *
+ *
* Increase the size of @array (if needed) so that there are at least
* @additional free spaces in the array. The actual size of the array
* is always increased by doubling as many times as necessary.
@@ -153,7 +153,7 @@ _cairo_array_grow_by (cairo_array_t *arr
/**
* _cairo_array_truncate:
- *
+ *
* Truncate size of the array to @num_elements if less than the
* current size. No memory is actually freed. The stored objects
* beyond @num_elements are simply "forgotten".
@@ -169,7 +169,7 @@ _cairo_array_truncate (cairo_array_t *ar
/**
* _cairo_array_index:
- *
+ *
* Return value: A pointer to object stored at @index. If the
* resulting value is assigned to a pointer to an object of the same
* element_size as initially passed to _cairo_array_init() then that
@@ -210,7 +210,7 @@ _cairo_array_index (cairo_array_t *array
/**
* _cairo_array_copy_element:
- *
+ *
* Copy a single element out of the array from index @index into the
* location pointed to by @dst.
**/
@@ -222,7 +222,7 @@ _cairo_array_copy_element (cairo_array_t
/**
* _cairo_array_append:
- *
+ *
* Append a single item onto the array by growing the array by at
* least one element, then copying element_size bytes from @element
* into the array. The address of the resulting object within the
@@ -245,7 +245,7 @@ _cairo_array_append (cairo_array_t *arra
/**
* _cairo_array_append:
- *
+ *
* Append one or more items onto the array by growing the array by
* @num_elements, then copying @num_elements * element_size bytes from
* @elements into the array.
@@ -275,12 +275,12 @@ _cairo_array_append_multiple (cairo_arra
/**
* _cairo_array_allocate:
- *
+ *
* Allocate space at the end of the array for @num_elements additional
* elements, providing the address of the new memory chunk in
* @elements. This memory will be unitialized, but will be accounted
* for in the return value of _cairo_array_num_elements().
- *
+ *
* Return value: CAIRO_STATUS_SUCCESS if successful or
* CAIRO_STATUS_NO_MEMORY if insufficient memory is available for the
* operation.
@@ -309,7 +309,7 @@ _cairo_array_allocate (cairo_array_t *a
/**
* _cairo_array_num_elements:
- *
+ *
* Return value: The number of elements stored in @array.
**/
int
@@ -329,7 +329,7 @@ typedef struct {
/**
* _cairo_user_data_array_init:
* @array: a #cairo_user_data_array_t
- *
+ *
* Initializes a #cairo_user_data_array_t structure for future
* use. After initialization, the array has no keys. Call
* _cairo_user_data_array_fini() to free any allocated memory
@@ -344,7 +344,7 @@ _cairo_user_data_array_init (cairo_user_
/**
* _cairo_user_data_array_fini:
* @array: a #cairo_user_data_array_t
- *
+ *
* Destroys all current keys in the user data array and deallocates
* any memory allocated for the array itself.
**/
@@ -369,11 +369,11 @@ _cairo_user_data_array_fini (cairo_user_
* @array: a #cairo_user_data_array_t
* @key: the address of the #cairo_user_data_key_t the user data was
* attached to
- *
+ *
* Returns user data previously attached using the specified
* key. If no user data has been attached with the given key this
* function returns %NULL.
- *
+ *
* Return value: the user data previously attached or %NULL.
**/
void *
@@ -406,7 +406,7 @@ _cairo_user_data_array_get_data (cairo_u
* @destroy: a #cairo_destroy_func_t which will be called when the
* user data array is destroyed or when new user data is attached using the
* same key.
- *
+ *
* Attaches user data to a user data array. To remove user data,
* call this function with the key that was used to set it and %NULL
* for @data.
diff --git a/src/cairo-base85-stream.c b/src/cairo-base85-stream.c
index 43401e6..42d732b 100644
--- a/src/cairo-base85-stream.c
+++ b/src/cairo-base85-stream.c
@@ -1,5 +1,5 @@
/* cairo_output_stream.c: Output stream abstraction
- *
+ *
* Copyright © 2005 Red Hat, Inc
*
* This library is free software; you can redistribute it and/or
diff --git a/src/cairo-cache.c b/src/cairo-cache.c
index 1bd850f..3a7d5be 100644
--- a/src/cairo-cache.c
+++ b/src/cairo-cache.c
@@ -104,7 +104,7 @@ _cairo_cache_fini (cairo_cache_t *cache)
* @keys_equal: a function to return %TRUE if two keys are equal
* @entry_destroy: destroy notifier for cache entries
* @max_size: the maximum size for this cache
- *
+ *
* Creates a new cache using the keys_equal() function to determine
* the equality of entries.
*
@@ -131,8 +131,8 @@ _cairo_cache_fini (cairo_cache_t *cache)
* _cairo_cache_freeze() and _cairo_cache_thaw() calls can be
* used to establish a window during which no automatic removal of
* entries will occur.
- *
- * Return value:
+ *
+ * Return value:
**/
cairo_cache_t *
_cairo_cache_create (cairo_cache_keys_equal_func_t keys_equal,
@@ -158,7 +158,7 @@ _cairo_cache_create (cairo_cache_keys_eq
/**
* _cairo_cache_destroy:
* @cache: a cache to destroy
- *
+ *
* Immediately destroys the given cache, freeing all resources
* associated with it. As part of this process, the entry_destroy()
* function, (as passed to _cairo_cache_create()), will be called for
@@ -176,7 +176,7 @@ _cairo_cache_destroy (cairo_cache_t *cac
* _cairo_cache_freeze:
* @cache: a cache with some precious entries in it (or about to be
* added)
- *
+ *
* Disable the automatic ejection of entries from the cache. For as
* long as the cache is "frozen", calls to _cairo_cache_insert() will
* add new entries to the cache regardless of how large the cache
@@ -198,7 +198,7 @@ _cairo_cache_freeze (cairo_cache_t *cach
* _cairo_cache_thaw:
* @cache: a cache, just after the entries in it have become less
* precious
- *
+ *
* Cancels the effects of _cairo_cache_freeze().
*
* When a number of calls to _cairo_cache_thaw() is made corresponding
@@ -224,11 +224,11 @@ _cairo_cache_thaw (cairo_cache_t *cache)
* @cache: a cache
* @key: the key of interest
* @entry_return: pointer for return value
- *
+ *
* Performs a lookup in @cache looking for an entry which has a key
* that matches @key, (as determined by the keys_equal() function
* passed to _cairo_cache_create()).
- *
+ *
* Return value: %TRUE if there is an entry in the cache that matches
* @key, (which will now be in *entry_return). %FALSE otherwise, (in
* which case *entry_return will be %NULL).
@@ -246,9 +246,9 @@ _cairo_cache_lookup (cairo_cache_t *ca
/**
* _cairo_cache_remove_random:
* @cache: a cache
- *
+ *
* Remove a random entry from the cache.
- *
+ *
* Return value: CAIRO_STATUS_SUCCESS if an entry was successfully
* removed. CAIRO_INT_STATUS_CACHE_EMPTY if there are no entries that
* can be removed.
@@ -271,7 +271,7 @@ _cairo_cache_remove_random (cairo_cache_
* _cairo_cache_shrink_to_accomodate:
* @cache: a cache
* @additional: additional size requested in bytes
- *
+ *
* If cache is not frozen, eject entries randomly until the size of
* the cache is at least @additional bytes less than
* cache->max_size. That is, make enough room to accomodate a new
@@ -300,11 +300,11 @@ _cairo_cache_shrink_to_accomodate (cairo
* _cairo_cache_insert:
* @cache: a cache
* @entry: an entry to be inserted
- *
+ *
* Insert @entry into the cache. If an entry exists in the cache with
* a matching key, then the old entry will be removed first, (and the
* entry_destroy() callback will be called on it).
- *
+ *
* Return value: CAIRO_STATUS_SUCCESS if successful or
* CAIRO_STATUS_NO_MEMORY if insufficient memory is available.
**/
@@ -330,7 +330,7 @@ _cairo_cache_insert (cairo_cache_t *cac
* _cairo_cache_remove:
* @cache: a cache
* @entry: an entry that exists in the cache
- *
+ *
* Remove an existing entry from the cache.
*
* (NOTE: If any caller wanted access to a non-static version of this
@@ -356,7 +356,7 @@ _cairo_cache_remove (cairo_cache_t *cac
* @cache: a cache
* @cache_callback: function to be called for each entry
* @closure: additional argument to be passed to @cache_callback
- *
+ *
* Call @cache_callback for each entry in the cache, in a
* non-specified order.
**/
diff --git a/src/cairo-clip-private.h b/src/cairo-clip-private.h
index 576b6aa..91d23fb 100644
--- a/src/cairo-clip-private.h
+++ b/src/cairo-clip-private.h
@@ -51,7 +51,7 @@ struct _cairo_clip {
cairo_clip_mode_t mode;
/*
- * Mask-based clipping for cases where the backend
+ * Mask-based clipping for cases where the backend
* clipping isn't sufficiently able.
*
* The rectangle here represents the
diff --git a/src/cairo-debug.c b/src/cairo-debug.c
index 6d32b41..cd0de78 100644
--- a/src/cairo-debug.c
+++ b/src/cairo-debug.c
@@ -37,7 +37,7 @@
/**
* cairo_debug_reset_static_data:
- *
+ *
* Resets all static data within cairo to its original state,
* (ie. identical to the state at the time of program invocation). For
* example, all caches within cairo will be flushed empty.
diff --git a/src/cairo-font-options.c b/src/cairo-font-options.c
index 91d7a4d..5ffae46 100644
--- a/src/cairo-font-options.c
+++ b/src/cairo-font-options.c
@@ -46,7 +46,7 @@ static const cairo_font_options_t cairo_
/**
* _cairo_font_options_init_default:
* @options: a #cairo_font_options_t
- *
+ *
* Initializes all fileds of the font options object to default values.
**/
void
@@ -76,7 +76,7 @@ _cairo_font_options_init_copy (cairo_fon
*
* Allocates a new font options object with all options initialized
* to default values.
- *
+ *
* Return value: a newly allocated #cairo_font_options_t. Free with
* cairo_font_options_destroy(). This function always returns a
* valid pointer; if memory cannot be allocated, then a special
@@ -102,7 +102,7 @@ cairo_font_options_create (void)
*
* Allocates a new font options object copying the option values from
* @original.
- *
+ *
* Return value: a newly allocated #cairo_font_options_t. Free with
* cairo_font_options_destroy(). This function always returns a
* valid pointer; if memory cannot be allocated, then a special
@@ -125,7 +125,7 @@ cairo_font_options_copy (const cairo_fon
/**
* cairo_font_options_destroy:
* @options: a #cairo_font_options_t
- *
+ *
* Destroys a #cairo_font_options_t object created with with
* cairo_font_options_create() or cairo_font_options_copy().
**/
@@ -141,10 +141,10 @@ cairo_font_options_destroy (cairo_font_o
/**
* cairo_font_options_status:
* @options: a #cairo_font_options_t
- *
+ *
* Checks whether an error has previously occurred for this
* font options object
- *
+ *
* Return value: %CAIRO_STATUS_SUCCESS or %CAIRO_STATUS_NO_MEMORY
**/
cairo_status_t
@@ -160,7 +160,7 @@ cairo_font_options_status (cairo_font_op
* cairo_font_options_merge:
* @options: a #cairo_font_options_t
* @other: another #cairo_font_options_t
- *
+ *
* Merges non-default options from @other into @options, replacing
* existing values. This operation can be thought of as somewhat
* similar to compositing @other onto @options with the operation
@@ -187,9 +187,9 @@ cairo_font_options_merge (cairo_font_opt
* cairo_font_options_equal:
* @options: a #cairo_font_options_t
* @other: another #cairo_font_options_t
- *
+ *
* Compares two font options objects for equality.
- *
+ *
* Return value: %TRUE if all fields of the two font options objects match
**/
cairo_bool_t
@@ -205,11 +205,11 @@ cairo_font_options_equal (const cairo_fo
/**
* cairo_font_options_hash:
* @options: a #cairo_font_options_t
- *
+ *
* Compute a hash for the font options object; this value will
* be useful when storing an object containing a cairo_font_options_t
* in a hash table.
- *
+ *
* Return value: the hash value for the font options object.
* The return value can be cast to a 32-bit type if a
* 32-bit hash value is needed.
@@ -227,7 +227,7 @@ cairo_font_options_hash (const cairo_fon
* cairo_font_options_set_antialias:
* @options: a #cairo_font_options_t
* @antialias: the new antialiasing mode
- *
+ *
* Sets the antiliasing mode for the font options object. This
* specifies the type of antialiasing to do when rendering text.
**/
@@ -244,9 +244,9 @@ cairo_font_options_set_antialias (cairo_
/**
* cairo_font_options_get_antialias:
* @options: a #cairo_font_options_t
- *
+ *
* Gets the antialising mode for the font options object.
- *
+ *
* Return value: the antialiasing mode
**/
cairo_antialias_t
@@ -259,7 +259,7 @@ cairo_font_options_get_antialias (const
* cairo_font_options_set_subpixel_order:
* @options: a #cairo_font_options_t
* @subpixel_order: the new subpixel order
- *
+ *
* Sets the subpixel order for the font options object. The subpixel
* order specifies the order of color elements within each pixel on
* the display device when rendering with an antialiasing mode of
@@ -279,10 +279,10 @@ cairo_font_options_set_subpixel_order (c
/**
* cairo_font_options_get_subpixel_order:
* @options: a #cairo_font_options_t
- *
+ *
* Gets the subpixel order for the font options object.
* See the documentation for #cairo_subpixel_order_t for full details.
- *
+ *
* Return value: the subpixel order for the font options object
**/
cairo_subpixel_order_t
@@ -295,7 +295,7 @@ cairo_font_options_get_subpixel_order (c
* cairo_font_options_set_hint_style:
* @options: a #cairo_font_options_t
* @hint_style: the new hint style
- *
+ *
* Sets the hint style for font outlines for the font options object.
* This controls whether to fit font outlines to the pixel grid,
* and if so, whether to optimize for fidelity or contrast.
@@ -314,10 +314,10 @@ cairo_font_options_set_hint_style (cairo
/**
* cairo_font_options_get_hint_style:
* @options: a #cairo_font_options_t
- *
+ *
* Gets the hint style for font outlines for the font options object.
* See the documentation for #cairo_hint_style_t for full details.
- *
+ *
* Return value: the hint style for the font options object
**/
cairo_hint_style_t
@@ -330,7 +330,7 @@ cairo_font_options_get_hint_style (const
* cairo_font_options_set_hint_metrics:
* @options: a #cairo_font_options_t
* @hint_metrics: the new metrics hinting mode
- *
+ *
* Sets the metrics hinting mode for the font options object. This
* controls whether metrics are quantized to integer values in
* device units.
@@ -349,10 +349,10 @@ cairo_font_options_set_hint_metrics (cai
/**
* cairo_font_options_get_hint_metrics:
* @options: a #cairo_font_options_t
- *
+ *
* Gets the metrics hinting mode for the font options object.
* See the documentation for #cairo_hint_metrics_t for full details.
- *
+ *
* Return value: the metrics hinting mode for the font options object
**/
cairo_hint_metrics_t
diff --git a/src/cairo-font.c b/src/cairo-font.c
index 40020a0..f3b1c9d 100644
--- a/src/cairo-font.c
+++ b/src/cairo-font.c
@@ -69,7 +69,7 @@ _cairo_font_face_init (cairo_font_face_t
* cairo_font_face_reference:
* @font_face: a #cairo_font_face_t, (may be NULL in which case this
* function does nothing).
- *
+ *
* Increases the reference count on @font_face by one. This prevents
* @font_face from being destroyed until a matching call to
* cairo_font_face_destroy() is made.
@@ -97,7 +97,7 @@ cairo_font_face_reference (cairo_font_fa
/**
* cairo_font_face_destroy:
* @font_face: a #cairo_font_face_t
- *
+ *
* Decreases the reference count on @font_face by one. If the result
* is zero, then @font_face and all associated resources are freed.
* See cairo_font_face_reference().
@@ -133,7 +133,7 @@ cairo_font_face_destroy (cairo_font_face
/**
* cairo_font_face_get_type:
* @font_face: a #cairo_font_face_t
- *
+ *
* Return value: The type of @font_face. See #cairo_font_type_t.
**/
cairo_font_type_t
@@ -145,10 +145,10 @@ cairo_font_face_get_type (cairo_font_fac
/**
* cairo_font_face_status:
* @font_face: a #cairo_font_face_t
- *
+ *
* Checks whether an error has previously occurred for this
* font face
- *
+ *
* Return value: %CAIRO_STATUS_SUCCESS or another error such as
* %CAIRO_STATUS_NO_MEMORY.
**/
@@ -163,11 +163,11 @@ cairo_font_face_status (cairo_font_face_
* @font_face: a #cairo_font_face_t
* @key: the address of the #cairo_user_data_key_t the user data was
* attached to
- *
+ *
* Return user data previously attached to @font_face using the specified
* key. If no user data has been attached with the given key this
* function returns %NULL.
- *
+ *
* Return value: the user data previously attached or %NULL.
**/
void *
@@ -186,7 +186,7 @@ cairo_font_face_get_user_data (cairo_fon
* @destroy: a #cairo_destroy_func_t which will be called when the
* font face is destroyed or when new user data is attached using the
* same key.
- *
+ *
* Attach user data to @font_face. To remove user data from a font face,
* call this function with the key that was used to set it and %NULL
* for @data.
@@ -252,7 +252,7 @@ _cairo_toy_font_face_hash_table_unlock (
/**
* _cairo_toy_font_face_init_key:
- *
+ *
* Initialize those portions of cairo_toy_font_face_t needed to use
* it as a hash table key, including the hash code buried away in
* font_face->base.hash_entry. No memory allocation is performed here
@@ -328,11 +328,11 @@ _cairo_toy_font_face_keys_equal (const v
* @family: a font family name, encoded in UTF-8
* @slant: the slant for the font
* @weight: the weight for the font
- *
+ *
* Creates a font face from a triplet of family, slant, and weight.
* These font faces are used in implementation of the the #cairo_t "toy"
* font API.
- *
+ *
* Return value: a newly created #cairo_font_face_t, destroy with
* cairo_font_face_destroy()
**/
diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index 2a06eeb..4bc8aec 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -71,7 +71,7 @@ typedef struct _cairo_ft_font_transform
double shape[2][2];
} cairo_ft_font_transform_t;
-/*
+/*
* We create an object that corresponds to a single font on the disk;
* (identified by a filename/id pair) these are shared between all
* fonts using that file. For cairo_ft_font_face_create_for_ft_face(), we
@@ -282,7 +282,7 @@ _cairo_ft_unscaled_font_init_key (cairo_
/**
* _cairo_ft_unscaled_font_init:
- *
+ *
* Initialize a cairo_ft_unscaled_font_t.
*
* There are two basic flavors of cairo_ft_unscaled_font_t, one
@@ -344,7 +344,7 @@ _cairo_unscaled_font_is_ft (cairo_unscal
/**
* _cairo_ft_unscaled_font_fini:
- *
+ *
* Free all data associated with a cairo_ft_unscaled_font_t.
*
* CAUTION: The unscaled->face field must be NULL before calling this
@@ -898,7 +898,7 @@ _get_bitmap_surface (FT_Bitmap *bi
}
/* Converts an outline FT_GlyphSlot into an image
- *
+ *
* This could go through _render_glyph_bitmap as well, letting
* FreeType convert the outline to a bitmap, but doing it ourselves
* has two minor advantages: first, we save a copy of the bitmap
@@ -1033,7 +1033,7 @@ _render_glyph_outline (FT_Face
}
/* Converts a bitmap (or other) FT_GlyphSlot into an image
- *
+ *
* This could go through _render_glyph_bitmap as well, letting
* FreeType convert the outline to a bitmap, but doing it ourselves
* has two minor advantages: first, we save a copy of the bitmap
@@ -2068,7 +2068,7 @@ _cairo_ft_font_face_create (cairo_ft_uns
* cairo_ft_font_options_substitute:
* @options: a #cairo_font_options_t object
* @pattern: an existing #FcPattern
- *
+ *
* Add options to a #FcPattern based on a #cairo_font_options_t font
* options object. Options that are already in the pattern, are not overriden,
* so you should call this function after calling FcConfigSubstitute() (the
@@ -2160,7 +2160,7 @@ cairo_ft_font_options_substitute (const
* pattern, so you should not further modify the pattern, but you can
* release your reference to the pattern with FcPatternDestroy() if
* you no longer need to access it.
- *
+ *
* Creates a new font face for the FreeType font backend based on a
* fontconfig pattern. This font can then be used with
* cairo_set_font_face() or cairo_scaled_font_create(). The
@@ -2216,14 +2216,14 @@ cairo_ft_font_face_create_for_pattern (F
* as %FT_LOAD_VERTICAL_LAYOUT, and %FT_LOAD_FORCE_AUTOHINT
* are useful. You should not pass any of the flags affecting
* the load target, such as %FT_LOAD_TARGET_LIGHT.
- *
+ *
* Creates a new font face for the FreeType font backend from a
* pre-opened FreeType face. This font can then be used with
* cairo_set_font_face() or cairo_scaled_font_create(). The
* #cairo_scaled_font_t returned from cairo_scaled_font_create() is
* also for the FreeType backend and can be used with functions such
* as cairo_ft_font_lock_face().
- *
+ *
* Return value: a newly created #cairo_font_face_t. Free with
* cairo_font_face_destroy() when you are done using it.
**/
@@ -2261,7 +2261,7 @@ cairo_ft_font_face_create_for_ft_face (F
* object can be created by calling cairo_scaled_font_create() on a
* FreeType backend font face (see cairo_ft_font_face_create_for_pattern(),
* cairo_ft_font_face_create_for_face()).
- *
+ *
* cairo_ft_font_lock_face() gets the #FT_Face object from a FreeType
* backend font and scales it appropriately for the font. You must
* release the face with cairo_ft_font_unlock_face()
@@ -2311,7 +2311,7 @@ cairo_ft_scaled_font_lock_face (cairo_sc
* object can be created by calling cairo_scaled_font_create() on a
* FreeType backend font face (see cairo_ft_font_face_create_for_pattern(),
* cairo_ft_font_face_create_for_ft_face()).
- *
+ *
* Releases a face obtained with cairo_ft_scaled_font_lock_face().
**/
void
diff --git a/src/cairo-gstate.c b/src/cairo-gstate.c
index 68af94f..8095f3b 100644
--- a/src/cairo-gstate.c
+++ b/src/cairo-gstate.c
@@ -704,7 +704,7 @@ _cairo_gstate_backend_to_user (cairo_gst
cairo_matrix_transform_point (&gstate->ctm_inverse, x, y);
}
-/* XXX: NYI
+/* XXX: NYI
cairo_status_t
_cairo_gstate_stroke_to_path (cairo_gstate_t *gstate)
{
@@ -787,7 +787,7 @@ _cairo_gstate_paint (cairo_gstate_t *gst
/**
* _cairo_operator_bounded_by_mask:
* @op: a #cairo_operator_t
- *
+ *
* A bounded operator is one where mask pixel
* of zero results in no effect on the destination image.
*
@@ -826,7 +826,7 @@ _cairo_operator_bounded_by_mask (cairo_o
/**
* _cairo_operator_bounded_by_source:
* @op: a #cairo_operator_t
- *
+ *
* A bounded operator is one where source pixels of zero
* (in all four components, r, g, b and a) effect no change
* in the resulting destination image.
@@ -1219,7 +1219,7 @@ _cairo_gstate_get_font_face (cairo_gstat
return CAIRO_STATUS_SUCCESS;
}
-/*
+/*
* Like everything else in this file, fonts involve Too Many Coordinate Spaces;
* it is easy to get confused about what's going on.
*
@@ -1236,7 +1236,7 @@ _cairo_gstate_get_font_face (cairo_gstat
* Metrics are returned in user space, whether they are obtained from
* the currently selected font in a #cairo_t or from a #cairo_scaled_font_t
* which is a font specialized to a particular scale matrix, CTM, and target
- * surface.
+ * surface.
*
* The font's view
* ---------------
@@ -1270,9 +1270,9 @@ _cairo_gstate_get_font_face (cairo_gstat
* around.
*
* In order to perform any action on a font, we must build an object
- * called a cairo_font_scale_t; this contains the central 2x2 matrix
+ * called a cairo_font_scale_t; this contains the central 2x2 matrix
* resulting from "font matrix * CTM".
- *
+ *
* We pass this to the font when making requests of it, which causes it to
* reply for a particular [user request, device] combination, under the CTM
* (to accomodate the "zoom in" == "bigger fonts" issue above).
diff --git a/src/cairo-hash.c b/src/cairo-hash.c
index 72b20b1..e649412 100644
--- a/src/cairo-hash.c
+++ b/src/cairo-hash.c
@@ -47,7 +47,7 @@
* DEAD: Entry had been live in the past. A dead entry can be reused
* but does not terminate a search for an exact entry.
* Appears in the table as a pointer to DEAD_ENTRY.
- *
+ *
* LIVE: Entry is currently being used.
* Appears in the table as any non-NULL, non-DEAD_ENTRY pointer.
*/
@@ -130,7 +130,7 @@ struct _cairo_hash_table {
/**
* _cairo_hash_table_create:
* @keys_equal: a function to return TRUE if two keys are equal
- *
+ *
* Creates a new hash table which will use the keys_equal() function
* to compare hash keys. Data is provided to the hash table in the
* form of user-derived versions of cairo_hash_entry_t. A hash entry
@@ -140,7 +140,7 @@ struct _cairo_hash_table {
* will be necessary, (as in _cairo_hash_table_insert).
*
* See #cairo_hash_entry_t for more details.
- *
+ *
* Return value: the new hash table or NULL if out of memory.
**/
cairo_hash_table_t *
@@ -172,7 +172,7 @@ _cairo_hash_table_create (cairo_hash_key
/**
* _cairo_hash_table_destroy:
* @hash_table: an empty hash table to destroy
- *
+ *
* Immediately destroys the given hash table, freeing all resources
* associated with it.
*
@@ -212,7 +212,7 @@ _cairo_hash_table_destroy (cairo_hash_ta
* @key_unique: If TRUE, then caller asserts that no key already
* exists that will compare equal to #key, so search can be
* optimized. If unsure, set to FALSE and the code will always work.
- *
+ *
* Search the hashtable for a live entry for which
* hash_table->keys_equal returns true. If no such entry exists then
* return the first available (free or dead entry).
@@ -275,7 +275,7 @@ _cairo_hash_table_lookup_internal (cairo
idx -= table_size;
}
- /*
+ /*
* The table should not have permitted you to get here if you were just
* looking for a free slot: there should have been room.
*/
@@ -287,11 +287,11 @@ _cairo_hash_table_lookup_internal (cairo
/**
* _cairo_hash_table_resize:
* @hash_table: a hash table
- *
+ *
* Resize the hash table if the number of entries has gotten much
* bigger or smaller than the ideal number of entries for the current
* size.
- *
+ *
* Return value: CAIRO_STATUS_SUCCESS if successful or
* CAIRO_STATUS_NO_MEMORY if out of memory.
**/
@@ -353,11 +353,11 @@ _cairo_hash_table_resize (cairo_hash_ta
* @hash_table: a hash table
* @key: the key of interest
* @entry_return: pointer for return value.
- *
+ *
* Performs a lookup in @hash_table looking for an entry which has a
* key that matches @key, (as determined by the keys_equal() function
* passed to _cairo_hash_table_create).
- *
+ *
* Return value: TRUE if there is an entry in the hash table that
* matches the given key, (which will now be in *entry_return). FALSE
* otherwise, (in which case *entry_return will be NULL).
@@ -384,7 +384,7 @@ _cairo_hash_table_lookup (cairo_hash_tab
* _cairo_hash_table_random_entry:
* @hash_table: a hash table
* @predicate: a predicate function, or NULL for any entry.
- *
+ *
* Find a random entry in the hash table satisfying the given
* @predicate. A NULL @predicate is taken as equivalent to a function
* which always returns TRUE, (eg. any entry in the table will do).
@@ -442,7 +442,7 @@ _cairo_hash_table_random_entry (cairo_ha
* _cairo_hash_table_insert:
* @hash_table: a hash table
* @key_and_value: an entry to be inserted
- *
+ *
* Insert the entry #key_and_value into the hash table.
*
* WARNING: It is a fatal error if an entry exists in the hash table
@@ -454,7 +454,7 @@ _cairo_hash_table_random_entry (cairo_ha
* Instead of using insert to replace an entry, consider just editing
* the entry obtained with _cairo_hash_table_lookup. Or if absolutely
* necessary, use _cairo_hash_table_remove first.
- *
+ *
* Return value: CAIRO_STATUS_SUCCESS if successful or
* CAIRO_STATUS_NO_MEMORY if insufficient memory is available.
**/
@@ -491,7 +491,7 @@ _cairo_hash_table_insert (cairo_hash_tab
* _cairo_hash_table_remove:
* @hash_table: a hash table
* @key: key of entry to be removed
- *
+ *
* Remove an entry from the hash table which has a key that matches
* @key, if any (as determined by the keys_equal() function passed to
* _cairo_hash_table_create).
@@ -529,7 +529,7 @@ _cairo_hash_table_remove (cairo_hash_tab
* @hash_table: a hash table
* @hash_callback: function to be called for each live entry
* @closure: additional argument to be passed to @hash_callback
- *
+ *
* Call @hash_callback for each live entry in the hash table, in a
* non-specified order.
*
diff --git a/src/cairo-hull.c b/src/cairo-hull.c
index 7fff0a0..e9d0a15 100644
--- a/src/cairo-hull.c
+++ b/src/cairo-hull.c
@@ -105,7 +105,7 @@ _cairo_hull_vertex_compare (const void *
/*
* Use the point's ids to ensure a total ordering.
* a well-defined ordering, and avoid setting discard on
- * both points.
+ * both points.
*/
if (a_dist < b_dist || (a_dist == b_dist && a->id < b->id)) {
a->discard = 1;
diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
index 82a2227..75f9234 100644
--- a/src/cairo-image-surface.c
+++ b/src/cairo-image-surface.c
@@ -184,10 +184,10 @@ _create_pixman_format (cairo_format_t fo
/**
* cairo_image_surface_create:
- * @format: format of pixels in the surface to create
+ * @format: format of pixels in the surface to create
* @width: width of the surface, in pixels
* @height: height of the surface, in pixels
- *
+ *
* Creates an image surface of the specified format and
* dimensions. Initially the surface contents are all
* 0. (Specifically, within each pixel, each color or alpha channel
@@ -257,7 +257,7 @@ _cairo_image_surface_create_with_content
* in the buffer. Having this be specified separate from @width
* allows for padding at the end of rows, or for writing
* to a subportion of a larger image.
- *
+ *
* Creates an image surface for the provided pixel data. The output
* buffer must be kept around until the #cairo_surface_t is destroyed
* or cairo_surface_finish() is called on the surface. The initial
@@ -331,10 +331,10 @@ _cairo_image_surface_create_for_data_wit
/**
* cairo_image_surface_get_data:
* @surface: a #cairo_image_surface_t
- *
+ *
* Get a pointer to the data of the image surface, for direct
* inspection or modification.
- *
+ *
* Return value: a pointer to the image data of this surface or NULL
* if @surface is not an image surface.
**/
@@ -354,9 +354,9 @@ cairo_image_surface_get_data (cairo_surf
/**
* cairo_image_surface_get_format:
* @surface: a #cairo_image_surface_t
- *
+ *
* Get the format of the surface.
- *
+ *
* Return value: the format of the surface
**/
cairo_format_t
@@ -375,9 +375,9 @@ cairo_image_surface_get_format (cairo_su
/**
* cairo_image_surface_get_width:
* @surface: a #cairo_image_surface_t
- *
+ *
* Get the width of the image surface in pixels.
- *
+ *
* Return value: the width of the surface in pixels.
**/
int
@@ -396,9 +396,9 @@ cairo_image_surface_get_width (cairo_sur
/**
* cairo_image_surface_get_height:
* @surface: a #cairo_image_surface_t
- *
+ *
* Get the height of the image surface in pixels.
- *
+ *
* Return value: the height of the surface in pixels.
**/
int
@@ -417,9 +417,9 @@ cairo_image_surface_get_height (cairo_su
/**
* cairo_image_surface_get_stride:
* @surface: a #cairo_image_surface_t
- *
+ *
* Get the stride of the image surface in bytes
- *
+ *
* Return value: the stride of the image surface in bytes (or 0 if
* @surface is not an image surface). The stride is the distance in
* bytes from the beginning of one row of the image data to the
@@ -965,9 +965,9 @@ _cairo_image_surface_get_extents (void
/**
* _cairo_surface_is_image:
* @surface: a #cairo_surface_t
- *
+ *
* Checks if a surface is an #cairo_image_surface_t
- *
+ *
* Return value: TRUE if the surface is an image surface
**/
cairo_bool_t
diff --git a/src/cairo-matrix.c b/src/cairo-matrix.c
index eda62e7..39b2523 100644
--- a/src/cairo-matrix.c
+++ b/src/cairo-matrix.c
@@ -48,7 +48,7 @@ _cairo_matrix_compute_adjoint (cairo_mat
/**
* cairo_matrix_init_identity:
* @matrix: a #cairo_matrix_t
- *
+ *
* Modifies @matrix to be an identity transformation.
**/
void
@@ -70,7 +70,7 @@ slim_hidden_def(cairo_matrix_init_identi
* @yy: yy component of the affine transformation
* @x0: X translation component of the affine transformation
* @y0: Y translation component of the affine transformation
- *
+ *
* Sets @matrix to be the affine transformation given by
* @xx, @yx, @xy, @yy, @x0, @y0. The transformation is given
* by:
@@ -101,7 +101,7 @@ slim_hidden_def(cairo_matrix_init);
* @yy: location to store yy component of matrix
* @x0: location to store x0 (X-translation component) of matrix, or %NULL
* @y0: location to store y0 (Y-translation component) of matrix, or %NULL
- *
+ *
* Gets the matrix values for the affine tranformation that @matrix represents.
* See cairo_matrix_init().
*
@@ -135,7 +135,7 @@ _cairo_matrix_get_affine (const cairo_ma
* @matrix: a cairo_matrix_t
* @tx: amount to translate in the X direction
* @ty: amount to translate in the Y direction
- *
+ *
* Initializes @matrix to a transformation that translates by @tx and
* @ty in the X and Y dimensions, respectively.
**/
@@ -155,7 +155,7 @@ slim_hidden_def(cairo_matrix_init_transl
* @matrix: a cairo_matrix_t
* @tx: amount to translate in the X direction
* @ty: amount to translate in the Y direction
- *
+ *
* Applies a translation by @tx, @ty to the transformation in
* @matrix. The effect of the new transformation is to first translate
* the coordinates by @tx and @ty, then apply the original transformation
@@ -176,7 +176,7 @@ cairo_matrix_translate (cairo_matrix_t *
* @matrix: a cairo_matrix_t
* @sx: scale factor in the X direction
* @sy: scale factor in the Y direction
- *
+ *
* Initializes @matrix to a transformation that scales by @sx and @sy
* in the X and Y dimensions, respectively.
**/
@@ -196,7 +196,7 @@ slim_hidden_def(cairo_matrix_init_scale)
* @matrix: a #cairo_matrix_t
* @sx: scale factor in the X direction
* @sy: scale factor in the Y direction
- *
+ *
* Applies scaling by @tx, @ty to the transformation in @matrix. The
* effect of the new transformation is to first scale the coordinates
* by @sx and @sy, then apply the original transformation to the coordinates.
@@ -220,7 +220,7 @@ slim_hidden_def(cairo_matrix_scale);
* the positive X axis toward the positive Y axis. With the default
* axis orientation of cairo, positive angles rotate in a clockwise
* direction.
- *
+ *
* Initialized @matrix to a transformation that rotates by @radians.
**/
void
@@ -248,7 +248,7 @@ slim_hidden_def(cairo_matrix_init_rotate
* the positive X axis toward the positive Y axis. With the default
* axis orientation of cairo, positive angles rotate in a clockwise
* direction.
- *
+ *
* Applies rotation by @radians to the transformation in
* @matrix. The effect of the new transformation is to first rotate the
* coordinates by @radians, then apply the original transformation
@@ -269,7 +269,7 @@ cairo_matrix_rotate (cairo_matrix_t *mat
* @result: a @cairo_matrix_t in which to store the result
* @a: a @cairo_matrix_t
* @b: a @cairo_matrix_t
- *
+ *
* Multiplies the affine transformations in @a and @b together
* and stores the result in @result. The effect of the resulting
* transformation is to first apply the transformation in @a to the
@@ -307,7 +307,7 @@ slim_hidden_def(cairo_matrix_multiply);
* @matrix: a @cairo_matrix_t
* @dx: X component of a distance vector. An in/out parameter
* @dy: Y component of a distance vector. An in/out parameter
- *
+ *
* Transforms the distance vector (@dx, at dy) by @matrix. This is
* similar to cairo_matrix_transform() except that the translation
* components of the transformation are ignored. The calculation of
@@ -341,7 +341,7 @@ slim_hidden_def(cairo_matrix_transform_d
* @matrix: a @cairo_matrix_t
* @x: X position. An in/out parameter
* @y: Y position. An in/out parameter
- *
+ *
* Transforms the point (@x, @y) by @matrix.
**/
void
@@ -443,12 +443,12 @@ _cairo_matrix_compute_adjoint (cairo_mat
/**
* cairo_matrix_invert:
* @matrix: a @cairo_matrix_t
- *
+ *
* Changes @matrix to be the inverse of it's original value. Not
* all transformation matrices have inverses; if the matrix
* collapses points together (it is <firstterm>degenerate</firstterm>),
* then it has no inverse and this function will fail.
- *
+ *
* Returns: If @matrix has an inverse, modifies @matrix to
* be the inverse matrix and returns %CAIRO_STATUS_SUCCESS. Otherwise,
* returns %CAIRO_STATUS_INVALID_MATRIX.
diff --git a/src/cairo-meta-surface.c b/src/cairo-meta-surface.c
index 26fc6a6..92fd448 100644
--- a/src/cairo-meta-surface.c
+++ b/src/cairo-meta-surface.c
@@ -231,7 +231,7 @@ _cairo_meta_surface_paint (void *abstr
cairo_command_paint_t *command;
/* An optimisation that takes care to not replay what was done
- * before surface is cleared. We don't erase recorded commands
+ * before surface is cleared. We don't erase recorded commands
* since we may have earlier snapshots of this surface. */
if (op == CAIRO_OPERATOR_CLEAR && !meta->is_clipped)
meta->replay_start_idx = meta->commands.num_elements;
@@ -560,9 +560,9 @@ _cairo_meta_surface_get_extents (void
/**
* _cairo_surface_is_meta:
* @surface: a #cairo_surface_t
- *
+ *
* Checks if a surface is a #cairo_meta_surface_t
- *
+ *
* Return value: TRUE if the surface is a meta surface
**/
cairo_bool_t
diff --git a/src/cairo-output-stream.c b/src/cairo-output-stream.c
index b27c943..077de9c 100644
--- a/src/cairo-output-stream.c
+++ b/src/cairo-output-stream.c
@@ -1,5 +1,5 @@
/* cairo_output_stream.c: Output stream abstraction
- *
+ *
* Copyright © 2005 Red Hat, Inc
*
* This library is free software; you can redistribute it and/or
diff --git a/src/cairo-path-data.c b/src/cairo-path-data.c
index cbb23b9..2407e72 100644
--- a/src/cairo-path-data.c
+++ b/src/cairo-path-data.c
@@ -369,7 +369,7 @@ _cairo_path_data_create_real (cairo_path
* cairo_path_destroy:
* @path: a path previously returned by either cairo_copy_path() or
* cairo_copy_path_flat().
- *
+ *
* Immediately releases all memory associated with @path. After a call
* to cairo_path_destroy() the @path pointer is no longer valid and
* should not be used further.
@@ -394,11 +394,11 @@ cairo_path_destroy (cairo_path_t *path)
* _cairo_path_data_create:
* @path: a fixed-point, device-space path to be converted and copied
* @gstate: the current graphics state
- *
+ *
* Creates a user-space #cairo_path_t copy of the given device-space
* @path. The @gstate parameter provides the inverse CTM for the
* conversion.
- *
+ *
* Return value: the new copy of the path. If there is insufficient
* memory a pointer to a special static cairo_path_nil will be
* returned instead with status==CAIRO_STATUS_NO_MEMORY and
@@ -415,12 +415,12 @@ _cairo_path_data_create (cairo_path_fixe
* _cairo_path_data_create_flat:
* @path: a fixed-point, device-space path to be flattened, converted and copied
* @gstate: the current graphics state
- *
+ *
* Creates a flattened, user-space #cairo_path_t copy of the given
* device-space @path. The @gstate parameter provide the inverse CTM
* for the conversion, as well as the tolerance value to control the
* accuracy of the flattening.
- *
+ *
* Return value: the flattened copy of the path. If there is insufficient
* memory a pointer to a special static cairo_path_nil will be
* returned instead with status==CAIRO_STATUS_NO_MEMORY and
@@ -437,9 +437,9 @@ _cairo_path_data_create_flat (cairo_path
* _cairo_path_data_append_to_context:
* @path: the path data to be appended
* @cr: a cairo context
- *
+ *
* Append @path to the current path within @cr.
- *
+ *
* Return value: CAIRO_STATUS_INVALID_PATH_DATA if the data in @path
* is invalid, and CAIRO_STATUS_SUCCESS otherwise.
**/
diff --git a/src/cairo-path-stroke.c b/src/cairo-path-stroke.c
index 80302f0..2f89314 100644
--- a/src/cairo-path-stroke.c
+++ b/src/cairo-path-stroke.c
@@ -286,7 +286,7 @@ _cairo_stroker_join (cairo_stroker_t *st
* in · out = cos (psi)
*
* 2 <= ml² (1 - in · out)
- *
+ *
*/
if (2 <= ml * ml * (1 - in_dot_out)) {
double x1, y1, x2, y2;
@@ -295,7 +295,7 @@ _cairo_stroker_join (cairo_stroker_t *st
cairo_polygon_t polygon;
cairo_point_t outer;
- /*
+ /*
* we've got the points already transformed to device
* space, but need to do some computation with them and
* also need to transform the slope from user space to
@@ -507,7 +507,7 @@ _compute_face (cairo_point_t *point, cai
usr_vector.x = line_dx;
usr_vector.y = line_dy;
- /*
+ /*
* rotate to get a line_width/2 vector along the face, note that
* the vector must be rotated the right direction in device space,
* but by 90° in user space. So, the rotation depends on
diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c
index 6e98be1..f5e468c 100644
--- a/src/cairo-pattern.c
+++ b/src/cairo-pattern.c
@@ -86,7 +86,7 @@ _cairo_pattern_nil_for_status (cairo_sta
* @pattern: a pattern
* @status: a status value indicating an error, (eg. not
* CAIRO_STATUS_SUCCESS)
- *
+ *
* Sets pattern->status to @status and calls _cairo_error;
*
* All assignments of an error status to pattern->status should happen
@@ -298,12 +298,12 @@ _cairo_pattern_create_solid (const cairo
* @red: red component of the color
* @green: green component of the color
* @blue: blue component of the color
- *
+ *
* Creates a new cairo_pattern_t corresponding to an opaque color. The
* color components are floating point numbers in the range 0 to 1.
* If the values passed in are outside that range, they will be
* clamped.
- *
+ *
* Return value: the newly created #cairo_pattern_t if succesful, or
* an error pattern in case of no memory. The caller owns the
* returned object and should call cairo_pattern_destroy() when
@@ -338,12 +338,12 @@ cairo_pattern_create_rgb (double red, do
* @green: green component of the color
* @blue: blue component of the color
* @alpha: alpha component of the color
- *
+ *
* Creates a new cairo_pattern_t corresponding to a translucent color.
* The color components are floating point numbers in the range 0 to
* 1. If the values passed in are outside that range, they will be
* clamped.
- *
+ *
* Return value: the newly created #cairo_pattern_t if succesful, or
* an error pattern in case of no memory. The caller owns the
* returned object and should call cairo_pattern_destroy() when
@@ -376,10 +376,10 @@ cairo_pattern_create_rgba (double red, d
/**
* cairo_pattern_create_for_surface:
- * @surface: the surface
- *
+ * @surface: the surface
+ *
* Create a new cairo_pattern_t for the given surface.
- *
+ *
* Return value: the newly created #cairo_pattern_t if succesful, or
* an error pattern in case of no memory. The caller owns the
* returned object and should call cairo_pattern_destroy() when
@@ -413,11 +413,11 @@ cairo_pattern_create_for_surface (cairo_
/**
* cairo_pattern_create_linear:
- * @x0: x coordinate of the start point
- * @y0: y coordinate of the start point
- * @x1: x coordinate of the end point
- * @y1: y coordinate of the end point
- *
+ * @x0: x coordinate of the start point
+ * @y0: y coordinate of the start point
+ * @x1: x coordinate of the end point
+ * @y1: y coordinate of the end point
+ *
* Create a new linear gradient cairo_pattern_t along the line defined
* by (x0, y0) and (x1, y1). Before using the gradient pattern, a
* number of color stops should be defined using
@@ -427,7 +427,7 @@ cairo_pattern_create_for_surface (cairo_
* Note: The coordinates here are in pattern space. For a new pattern,
* pattern space is identical to user space, but the relationship
* between the spaces can be changed with cairo_pattern_set_matrix().
- *
+ *
* Return value: the newly created #cairo_pattern_t if succesful, or
* an error pattern in case of no memory. The caller owns the
* returned object and should call cairo_pattern_destroy() when
@@ -461,7 +461,7 @@ cairo_pattern_create_linear (double x0,
* @cx1: x coordinate for the center of the end circle
* @cy1: y coordinate for the center of the end circle
* @radius1: radius of the end cirle
- *
+ *
* Creates a new radial gradient cairo_pattern_t between the two
* circles defined by (x0, y0, c0) and (x1, y1, c0). Before using the
* gradient pattern, a number of color stops should be defined using
@@ -471,7 +471,7 @@ cairo_pattern_create_linear (double x0,
* Note: The coordinates here are in pattern space. For a new pattern,
* pattern space is identical to user space, but the relationship
* between the spaces can be changed with cairo_pattern_set_matrix().
- *
+ *
* Return value: the newly created #cairo_pattern_t if succesful, or
* an error pattern in case of no memory. The caller owns the
* returned object and should call cairo_pattern_destroy() when
@@ -501,7 +501,7 @@ cairo_pattern_create_radial (double cx0,
/**
* cairo_pattern_reference:
* @pattern: a #cairo_pattern_t
- *
+ *
* Increases the reference count on @pattern by one. This prevents
* @pattern from being destroyed until a matching call to
* cairo_pattern_destroy() is made.
@@ -527,7 +527,7 @@ cairo_pattern_reference (cairo_pattern_t
/**
* cairo_pattern_get_type:
* @pattern: a #cairo_pattern_t
- *
+ *
* Return value: The type of @pattern. See #cairo_pattern_type_t.
**/
cairo_pattern_type_t
@@ -539,10 +539,10 @@ cairo_pattern_get_type (cairo_pattern_t
/**
* cairo_pattern_status:
* @pattern: a #cairo_pattern_t
- *
+ *
* Checks whether an error has previously occurred for this
* pattern.
- *
+ *
* Return value: %CAIRO_STATUS_SUCCESS, %CAIRO_STATUS_NO_MEMORY, or
* %CAIRO_STATUS_PATTERN_TYPE_MISMATCH.
**/
@@ -555,7 +555,7 @@ cairo_pattern_status (cairo_pattern_t *p
/**
* cairo_pattern_destroy:
* @pattern: a #cairo_pattern_t
- *
+ *
* Decreases the reference count on @pattern by one. If the result is
* zero, then @pattern and all associated resources are freed. See
* cairo_pattern_reference().
@@ -630,7 +630,7 @@ _cairo_pattern_add_color_stop (cairo_gra
* @red: red component of color
* @green: green component of color
* @blue: blue component of color
- *
+ *
* Adds an opaque color stop to a gradient pattern. The offset
* specifies the location along the gradient's control vector. For
* example, a linear gradient's control vector is from (x0,y0) to
@@ -677,7 +677,7 @@ cairo_pattern_add_color_stop_rgb (cairo_
* @green: green component of color
* @blue: blue component of color
* @alpha: alpha component of color
- *
+ *
* Adds a translucent color stop to a gradient pattern. The offset
* specifies the location along the gradient's control vector. For
* example, a linear gradient's control vector is from (x0,y0) to
@@ -722,7 +722,7 @@ cairo_pattern_add_color_stop_rgba (cairo
* cairo_pattern_set_matrix:
* @pattern: a #cairo_pattern_t
* @matrix: a #cairo_matrix_t
- *
+ *
* Sets the pattern's transformation matrix to @matrix. This matrix is
* a transformation from user space to pattern space.
*
@@ -764,7 +764,7 @@ cairo_pattern_set_matrix (cairo_pattern_
* cairo_pattern_get_matrix:
* @pattern: a #cairo_pattern_t
* @matrix: return value for the matrix
- *
+ *
* Stores the pattern's transformation matrix into @matrix.
**/
void
@@ -813,7 +813,7 @@ cairo_pattern_set_extend (cairo_pattern_
*
* Gets the current extend mode for a pattern. See #cairo_extend_t
* for details on the semantics of each extend strategy.
- *
+ *
* Return value: the current extend strategy used for drawing the
* pattern.
**/
@@ -1178,10 +1178,10 @@ _cairo_pattern_acquire_surface_for_surfa
* @surface_out: location to store a pointer to a surface
* @attributes: surface attributes that destination backend should apply to
* the returned surface
- *
+ *
* A convenience function to obtain a surface to use as the source for
* drawing on @dst.
- *
+ *
* Return value: %CAIRO_STATUS_SUCCESS if a surface was stored in @surface_out.
**/
cairo_int_status_t
@@ -1275,7 +1275,7 @@ _cairo_pattern_acquire_surface (cairo_pa
* @pattern: a #cairo_pattern_t
* @surface: a surface obtained by _cairo_pattern_acquire_surface
* @attributes: attributes obtained by _cairo_pattern_acquire_surface
- *
+ *
* Releases resources obtained by _cairo_pattern_acquire_surface.
**/
void
@@ -1383,7 +1383,7 @@ _cairo_pattern_acquire_surfaces (cairo_p
/**
* _cairo_pattern_get_extents:
- *
+ *
* Return the "target-space" extents of @pattern in @extents.
*
* For unbounded patterns, the @extents will be initialized with
diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c
index 2803e35..9c5dea1 100644
--- a/src/cairo-pdf-surface.c
+++ b/src/cairo-pdf-surface.c
@@ -2031,7 +2031,7 @@ static cairo_bool_t cairo_pdf_force_fall
*
* Force the PDF surface backend to use image fallbacks for every
* operation.
- *
+ *
* <note>
* This function is <emphasis>only</emphasis> intended for internal
* testing use within the cairo distribution. It is not installed in
diff --git a/src/cairo-pen.c b/src/cairo-pen.c
index 91a6f44..bb4adff 100644
--- a/src/cairo-pen.c
+++ b/src/cairo-pen.c
@@ -247,7 +247,7 @@ _cairo_pen_vertices_needed (double t
double radius,
cairo_matrix_t *matrix)
{
- /*
+ /*
* the pen is a circle that gets transformed to an ellipse by matrix.
* compute major axis length for a pen with the specified radius.
* we don't need the minor axis length.
diff --git a/src/cairo-png.c b/src/cairo-png.c
index 1c3caef..a4fcd4e 100644
--- a/src/cairo-png.c
+++ b/src/cairo-png.c
@@ -214,10 +214,10 @@ stdio_write_func (png_structp png, png_b
* cairo_surface_write_to_png:
* @surface: a #cairo_surface_t with pixel contents
* @filename: the name of a file to write to
- *
+ *
* Writes the contents of @surface to a new file @filename as a PNG
* image.
- *
+ *
* Return value: CAIRO_STATUS_SUCCESS if the PNG file was written
* successfully. Otherwise, CAIRO_STATUS_NO_MEMORY if memory could not
* be allocated for the operation or
@@ -266,9 +266,9 @@ stream_write_func (png_structp png, png_
* @surface: a #cairo_surface_t with pixel contents
* @write_func: a #cairo_write_func_t
* @closure: closure data for the write function
- *
+ *
* Writes the image surface to the write function.
- *
+ *
* Return value: CAIRO_STATUS_SUCCESS if the PNG file was written
* successfully. Otherwise, CAIRO_STATUS_NO_MEMORY is returned if
* memory could not be allocated for the operation,
@@ -447,15 +447,15 @@ stdio_read_func (png_structp png, png_by
/**
* cairo_image_surface_create_from_png:
- * @filename: name of PNG file to load
- *
+ * @filename: name of PNG file to load
+ *
* Creates a new image surface and initializes the contents to the
* given PNG file.
- *
+ *
* Return value: a new #cairo_surface_t initialized with the contents
* of the PNG file, or a "nil" surface if any error occurred. A nil
* surface can be checked for with cairo_surface_status(surface) which
- * may return one of the following values:
+ * may return one of the following values:
*
* CAIRO_STATUS_NO_MEMORY
* CAIRO_STATUS_FILE_NOT_FOUND
@@ -510,10 +510,10 @@ stream_read_func (png_structp png, png_b
* cairo_image_surface_create_from_png_stream:
* @read_func: function called to read the data of the file
* @closure: data to pass to @read_func.
- *
+ *
* Creates a new image surface from PNG data read incrementally
* via the @read_func function.
- *
+ *
* Return value: a new #cairo_surface_t initialized with the contents
* of the PNG file or %NULL if the data read is not a valid PNG image or
* memory could not be allocated for the operation.
diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 418e2a5..d291a94 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -410,7 +410,7 @@ _cairo_ps_surface_create_for_stream_inte
* @filename: a filename for the PS output (must be writable)
* @width_in_points: width of the surface, in points (1 point == 1/72.0 inch)
* @height_in_points: height of the surface, in points (1 point == 1/72.0 inch)
- *
+ *
* Creates a PostScript surface of the specified size in points to be
* written to @filename. See cairo_ps_surface_create_for_stream() for
* a more flexible mechanism for handling the PostScript output than
@@ -453,7 +453,7 @@ cairo_ps_surface_create (const char *fi
* @closure: the closure argument for @write
* @width_in_points: width of the surface, in points (1 point == 1/72.0 inch)
* @height_in_points: height of the surface, in points (1 point == 1/72.0 inch)
- *
+ *
* Creates a PostScript surface of the specified size in points to be
* written incrementally to the stream represented by @write and
* @closure. See cairo_ps_surface_create() for a more convenient way
@@ -525,7 +525,7 @@ _extract_ps_surface (cairo_surface_t *s
* @surface: a PostScript cairo_surface_t
* @x_dpi: horizontal dpi
* @y_dpi: vertical dpi
- *
+ *
* Set the horizontal and vertical resolution for image fallbacks.
* When the ps backend needs to fall back to image overlays, it will
* use this resolution. These DPI values are not used for any other
@@ -555,7 +555,7 @@ cairo_ps_surface_set_dpi (cairo_surface_
* @surface: a PostScript cairo_surface_t
* @width_in_points: new surface width, in points (1 point == 1/72.0 inch)
* @height_in_points: new surface height, in points (1 point == 1/72.0 inch)
- *
+ *
* Changes the size of a PostScript surface for the current (and
* subsequent) pages.
*
@@ -587,7 +587,7 @@ cairo_ps_surface_set_size (cairo_surface
* cairo_ps_surface_dsc_comment:
* @surface: a PostScript cairo_surface_t
* @comment: a comment string to be emitted into the PostScript output
- *
+ *
* Emit a comment into the PostScript output for the given surface.
*
* The comment is expected to conform to the PostScript Language
@@ -714,13 +714,13 @@ cairo_ps_surface_dsc_comment (cairo_surf
/**
* cairo_ps_surface_dsc_begin_setup:
* @surface: a PostScript cairo_surface_t
- *
+ *
* This function indicates that subsequent calls to
* cairo_ps_surface_dsc_comment() should direct comments to the Setup
* section of the PostScript output.
*
* This function should be called at most once per surface, and must
- * be called before any call to cairo_ps_surface_dsc_begin_page_setup()
+ * be called before any call to cairo_ps_surface_dsc_begin_page_setup()
* and before any drawing is performed to the surface.
*
* See cairo_ps_surface_dsc_comment() for more details.
@@ -746,7 +746,7 @@ cairo_ps_surface_dsc_begin_setup (cairo_
/**
* cairo_ps_surface_dsc_begin_setup:
* @surface: a PostScript cairo_surface_t
- *
+ *
* This function indicates that subsequent calls to
* cairo_ps_surface_dsc_comment() should direct comments to the
* PageSetup section of the PostScript output.
diff --git a/src/cairo-region.c b/src/cairo-region.c
index dcbcffe..be73741 100644
--- a/src/cairo-region.c
+++ b/src/cairo-region.c
@@ -38,10 +38,10 @@
/**
* _cairo_region_create_from_rectangle:
* @rect: a #cairo_rectangle_fixed_t
- *
+ *
* Creates a region with extents initialized from the given
* rectangle.
- *
+ *
* Return value: a newly created #pixman_region16_t or %NULL if
* memory couldn't a allocated.
**/
@@ -66,7 +66,7 @@ _cairo_region_create_from_rectangle (cai
* _cairo_region_extents_rectangle:
* @region: a #pixman_region16_t
* @rect: rectangle into which to store the extents
- *
+ *
* Gets the bounding box of a region as a cairo_rectangle_fixed_t
**/
void
diff --git a/src/cairo-scaled-font-subsets-private.h b/src/cairo-scaled-font-subsets-private.h
index aed01a3..f8b5ac8 100644
--- a/src/cairo-scaled-font-subsets-private.h
+++ b/src/cairo-scaled-font-subsets-private.h
@@ -58,14 +58,14 @@ typedef struct _cairo_scaled_font_subset
* @max_glyphs_per_subset: the maximum number of glyphs that should
* appear in any subset. A value of 0 indicates that there is no limit
* to the number of glyphs per subset.
- *
+ *
* Create a new #cairo_scaled_font_subsets_t object which can be used
* to create subsets of any number of cairo_scaled_font_t
* objects. This allows the (arbitrarily large and sparse) glyph
* indices of a cairo_scaled_font to be mapped to one or more font
* subsets with glyph indices packed into the range
* [0 .. max_glyphs_per_subset).
- *
+ *
* Return value: a pointer to the newly creates font subsets. The
* caller owns this object and should call
* _cairo_scaled_font_subsets_destroy() when done with it.
@@ -76,7 +76,7 @@ _cairo_scaled_font_subsets_create (int m
/**
* _cairo_scaled_font_subsets_destroy:
* @font_subsets: a #cairo_scaled_font_subsets_t object to be destroyed
- *
+ *
* Destroys @font_subsets and all resources associated with it.
**/
cairo_private void
@@ -90,7 +90,7 @@ _cairo_scaled_font_subsets_destroy (cair
* @font_id_ret: return value giving the font ID of the mapped glyph
* @subset_id_ret: return value giving the subset ID of the mapped glyph within the @font_id_ret
* @subset_glyph_index_ret: return value giving the index of the mapped glyph within the @subset_id_ret subset
- *
+ *
* Map a glyph from a #cairo_scaled_font to a new index within a
* subset of that font. The mapping performed is from the tuple:
*
@@ -149,7 +149,7 @@ typedef void
* @font_subsets: a #cairo_scaled_font_subsets_t
* @font_subset_callback: a function to be called for each font subset
* @closure: closure data for the callback function
- *
+ *
* Iterate over each unique font subset as created by calls to
* _cairo_scaled_font_subsets_map_glyph(). A subset is determined by
* unique pairs of (font_id, subset_id) as returned by
@@ -169,7 +169,7 @@ typedef void
* returned by _cairo_scaled_font_subsets_map_glyph() while the
* values of the array correspond to the scaled_font_glyph_index
* values passed as input to the same function.
- *
+ *
* Return value: CAIRO_STATUS_SUCCESS if successful, or a non-zero
* value indicating an error. Possible errors include
* CAIRO_STATUS_NO_MEMORY.
diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index 8cb979f..5893f8f 100644
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -94,7 +94,7 @@ static const cairo_scaled_font_t _cairo_
* @scaled_font: a scaled_font
* @status: a status value indicating an error, (eg. not
* CAIRO_STATUS_SUCCESS)
- *
+ *
* Sets scaled_font->status to @status and calls _cairo_error;
*
* All assignments of an error status to scaled_font->status should happen
@@ -121,7 +121,7 @@ _cairo_scaled_font_set_error (cairo_scal
/**
* cairo_scaled_font_get_type:
* @scaled_font: a #cairo_scaled_font_t
- *
+ *
* Return value: The type of @scaled_font. See #cairo_font_type_t.
**/
cairo_font_type_t
@@ -133,10 +133,10 @@ cairo_scaled_font_get_type (cairo_scaled
/**
* cairo_scaled_font_status:
* @scaled_font: a #cairo_scaled_font_t
- *
+ *
* Checks whether an error has previously occurred for this
* scaled_font.
- *
+ *
* Return value: %CAIRO_STATUS_SUCCESS or another error such as
* %CAIRO_STATUS_NO_MEMORY.
**/
@@ -247,7 +247,7 @@ _cairo_scaled_font_map_destroy (void)
}
/* Fowler / Noll / Vo (FNV) Hash (http://www.isthe.com/chongo/tech/comp/fnv/)
- *
+ *
* Not necessarily better than a lot of other hashes, but should be OK, and
* well tested with binary data.
*/
@@ -358,7 +358,7 @@ _cairo_scaled_font_set_metrics (cairo_sc
&font_scale_x, &font_scale_y,
/* XXX */ 1);
- /*
+ /*
* The font responded in unscaled units, scale by the font
* matrix scale factors to get to user space
*/
@@ -399,11 +399,11 @@ _cairo_scaled_font_fini (cairo_scaled_fo
* be used.
* @options: options to use when getting metrics for the font and
* rendering with it.
- *
+ *
* Creates a #cairo_scaled_font_t object from a font face and matrices that
* describe the size of the font and the environment in which it will
* be used.
- *
+ *
* Return value: a newly created #cairo_scaled_font_t. Destroy with
* cairo_scaled_font_destroy()
**/
@@ -466,7 +466,7 @@ UNWIND:
* cairo_scaled_font_reference:
* @scaled_font: a #cairo_scaled_font_t, (may be NULL in which case
* this function does nothing)
- *
+ *
* Increases the reference count on @scaled_font by one. This prevents
* @scaled_font from being destroyed until a matching call to
* cairo_scaled_font_destroy() is made.
@@ -523,7 +523,7 @@ cairo_scaled_font_reference (cairo_scale
/**
* cairo_scaled_font_destroy:
* @scaled_font: a #cairo_scaled_font_t
- *
+ *
* Decreases the reference count on @font by one. If the result
* is zero, then @font and all associated resources are freed.
* See cairo_scaled_font_reference().
@@ -586,8 +586,8 @@ cairo_scaled_font_destroy (cairo_scaled_
* cairo_scaled_font_extents:
* @scaled_font: a #cairo_scaled_font_t
* @extents: a #cairo_font_extents_t which to store the retrieved extents.
- *
- * Gets the metrics for a #cairo_scaled_font_t.
+ *
+ * Gets the metrics for a #cairo_scaled_font_t.
**/
void
cairo_scaled_font_extents (cairo_scaled_font_t *scaled_font,
@@ -1062,9 +1062,9 @@ _cairo_scaled_font_glyph_path (cairo_sca
* @scaled_glyph: a #cairo_scaled_glyph_t
* @scaled_font: a #cairo_scaled_font_t
* @fs_metrics: a #cairo_text_extents_t in font space
- *
+ *
* _cairo_scaled_glyph_set_metrics() stores user space metrics
- * for the specified glyph given font space metrics. It is
+ * for the specified glyph given font space metrics. It is
* called by the font backend when initializing a glyph with
* CAIRO_SCALED_GLYPH_INFO_METRICS.
**/
@@ -1159,7 +1159,7 @@ _cairo_scaled_glyph_set_path (cairo_scal
* the glyph should be filled in.
* @scaled_glyph_ret: a #cairo_scaled_glyph_t * where the glyph
* is returned.
- *
+ *
* Returns a glyph with the requested portions filled in. Glyph
* lookup is cached and glyph will be automatically freed along
* with the scaled_font so no explicit free is required.
@@ -1260,7 +1260,7 @@ _cairo_scaled_glyph_lookup (cairo_scaled
/**
* cairo_scaled_font_get_font_face:
* @scaled_font: a #cairo_scaled_font_t
- *
+ *
* Return value: The #cairo_font_face_t with which @scaled_font was
* created.
**/
@@ -1277,7 +1277,7 @@ cairo_scaled_font_get_font_face (cairo_s
* cairo_scaled_font_get_font_matrix:
* @scaled_font: a #cairo_scaled_font_t
* @font_matrix: return value for the matrix
- *
+ *
* Stores the font matrix with which @scaled_font was created into
* @matrix.
**/
@@ -1297,7 +1297,7 @@ cairo_scaled_font_get_font_matrix (cairo
* cairo_scaled_font_get_ctm:
* @scaled_font: a #cairo_scaled_font_t
* @ctm: return value for the CTM
- *
+ *
* Stores the CTM with which @scaled_font was created into @ctm.
**/
void
@@ -1316,7 +1316,7 @@ cairo_scaled_font_get_ctm (cairo_scaled_
* cairo_scaled_font_get_font_options:
* @scaled_font: a #cairo_scaled_font_t
* @options: return value for the font options
- *
+ *
* Stores the font options with which @scaled_font was created into
* @ctm.
**/
diff --git a/src/cairo-surface-fallback.c b/src/cairo-surface-fallback.c
index 5c62196..934d361 100644
--- a/src/cairo-surface-fallback.c
+++ b/src/cairo-surface-fallback.c
@@ -48,10 +48,10 @@ typedef struct {
/**
* _fallback_init:
- *
+ *
* Acquire destination image surface needed for an image-based
* fallback.
- *
+ *
* Return value: CAIRO_INT_STATUS_NOTHING_TO_DO if the extents are not
* visible, CAIRO_STATUS_SUCCESS if some portion is visible and all
* went well, or some error status otherwise.
@@ -343,7 +343,7 @@ _cairo_rectangle_empty (const cairo_rect
*
* @draw_func is to called to draw the mask; it will be called no more
* than once.
- *
+ *
* Return value: %CAIRO_STATUS_SUCCESS if the drawing succeeded.
**/
static cairo_status_t
diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index c7809d7..e7f203b 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -108,7 +108,7 @@ static void _cairo_surface_copy_pattern_
* @surface: a surface
* @status: a status value indicating an error, (eg. not
* CAIRO_STATUS_SUCCESS)
- *
+ *
* Sets surface->status to @status and calls _cairo_error;
*
* All assignments of an error status to surface->status should happen
@@ -135,7 +135,7 @@ _cairo_surface_set_error (cairo_surface_
/**
* cairo_surface_get_type:
* @surface: a #cairo_surface_t
- *
+ *
* Return value: The type of @surface. See #cairo_surface_type_t.
**/
cairo_surface_type_t
@@ -151,7 +151,7 @@ cairo_surface_get_type (cairo_surface_t
/**
* cairo_surface_get_content:
* @surface: a #cairo_surface_t
- *
+ *
* Return value: The content type of @surface which indicates whether
* the surface contains color and/or alpha information. See
* #cairo_content_t.
@@ -165,10 +165,10 @@ cairo_surface_get_content (cairo_surface
/**
* cairo_surface_status:
* @surface: a #cairo_surface_t
- *
+ *
* Checks whether an error has previously occurred for this
* surface.
- *
+ *
* Return value: %CAIRO_STATUS_SUCCESS, %CAIRO_STATUS_NULL_POINTER,
* %CAIRO_STATUS_NO_MEMORY, %CAIRO_STATUS_READ_ERROR,
* %CAIRO_STATUS_INVALID_CONTENT, %CAIRO_STATUS_INVALUE_FORMAT, or
@@ -230,12 +230,12 @@ _cairo_surface_create_similar_scratch (c
* @content: the content for the new surface
* @width: width of the new surface, (in device-space units)
* @height: height of the new surface (in device-space units)
- *
+ *
* Create a new surface that is as compatible as possible with an
* existing surface. The new surface will use the same backend as
* @other unless that is not possible for some reason. The type of the
* returned surface may be examined with cairo_surface_get_type().
- *
+ *
* Return value: a pointer to the newly allocated surface. The caller
* owns the surface and should call cairo_surface_destroy when done
* with it.
@@ -318,7 +318,7 @@ _cairo_surface_get_clip_mode (cairo_surf
/**
* cairo_surface_reference:
* @surface: a #cairo_surface_t
- *
+ *
* Increases the reference count on @surface by one. This prevents
* @surface from being destroyed until a matching call to
* cairo_surface_destroy() is made.
@@ -344,7 +344,7 @@ cairo_surface_reference (cairo_surface_t
/**
* cairo_surface_destroy:
* @surface: a #cairo_t
- *
+ *
* Decreases the reference count on @surface by one. If the result is
* zero, then @surface and all associated resources are freed. See
* cairo_surface_reference().
@@ -375,7 +375,7 @@ slim_hidden_def(cairo_surface_destroy);
/**
* cairo_surface_finish:
* @surface: the #cairo_surface_t to finish
- *
+ *
* This function finishes the surface and drops all references to
* external resources. For example, for the Xlib backend it means
* that cairo will no longer access the drawable, which can be freed.
@@ -427,11 +427,11 @@ cairo_surface_finish (cairo_surface_t *s
* @surface: a #cairo_surface_t
* @key: the address of the #cairo_user_data_key_t the user data was
* attached to
- *
+ *
* Return user data previously attached to @surface using the specified
* key. If no user data has been attached with the given key this
* function returns %NULL.
- *
+ *
* Return value: the user data previously attached or %NULL.
**/
void *
@@ -450,7 +450,7 @@ cairo_surface_get_user_data (cairo_surfa
* @destroy: a #cairo_destroy_func_t which will be called when the
* surface is destroyed or when new user data is attached using the
* same key.
- *
+ *
* Attach user data to @surface. To remove user data from a surface,
* call this function with the key that was used to set it and %NULL
* for @data.
@@ -476,7 +476,7 @@ cairo_surface_set_user_data (cairo_surfa
* @surface: a #cairo_surface_t
* @options: a #cairo_font_options_t object into which to store
* the retrieved options. All existing values are overwritten
- *
+ *
* Retrieves the default font rendering options for the surface.
* This allows display surfaces to report the correct subpixel order
* for rendering on them, print surfaces to disable hinting of
@@ -497,7 +497,7 @@ cairo_surface_get_font_options (cairo_su
/**
* cairo_surface_flush:
* @surface: a #cairo_surface_t
- *
+ *
* Do any pending drawing for the surface and also restore any
* temporary modification's cairo has made to the surface's
* state. This function must be called before switching from
@@ -600,7 +600,7 @@ cairo_surface_mark_dirty_rectangle (cair
* @surface: a #cairo_surface_t
* @x_offset: the offset in the X direction, in device units
* @y_offset: the offset in the Y direction, in device units
- *
+ *
* Sets an offset that is added to the device coordinates determined
* by the CTM when drawing to @surface. One use case for this function
* is when we want to create a #cairo_surface_t that redirects drawing
@@ -666,11 +666,11 @@ _cairo_surface_has_device_offset_or_scal
* itself, a surface held internal to @surface, or it could be a new
* surface with a copy of the relevant portion of @surface.
* @image_extra: location to store image specific backend data
- *
+ *
* Gets an image surface to use when drawing as a fallback when drawing with
* @surface as a source. _cairo_surface_release_source_image() must be called
* when finished.
- *
+ *
* Return value: %CAIRO_STATUS_SUCCESS if a an image was stored in @image_out.
* %CAIRO_INT_STATUS_UNSUPPORTED if an image cannot be retrieved for the specified
* surface. Or %CAIRO_STATUS_NO_MEMORY.
@@ -690,7 +690,7 @@ _cairo_surface_acquire_source_image (cai
* _cairo_surface_release_source_image:
* @surface: a #cairo_surface_t
* @image_extra: same as return from the matching _cairo_surface_acquire_source_image()
- *
+ *
* Releases any resources obtained with _cairo_surface_acquire_source_image()
**/
void
@@ -716,10 +716,10 @@ _cairo_surface_release_source_image (cai
* or it could be a new surface with a copy of the relevant portion of @surface.
* If a new surface is created, it should have the same channels and depth
* as @surface so that copying to and from it is exact.
- * @image_rect: location to store area of the original surface occupied
+ * @image_rect: location to store area of the original surface occupied
* by the surface stored in @image.
* @image_extra: location to store image specific backend data
- *
+ *
* Retrieves a local image for a surface for implementing a fallback drawing
* operation. After calling this function, the implementation of the fallback
* drawing operation draws the primitive to the surface stored in @image_out
@@ -756,7 +756,7 @@ _cairo_surface_acquire_dest_image (cairo
* @image: same as returned from the matching _cairo_surface_acquire_dest_image()
* @image_rect: same as returned from the matching _cairo_surface_acquire_dest_image()
* @image_extra: same as return from the matching _cairo_surface_acquire_dest_image()
- *
+ *
* Finishes the operation started with _cairo_surface_acquire_dest_image(), by, if
* necessary, copying the image from @image back to @surface and freeing any
* resources that were allocated.
@@ -782,11 +782,11 @@ _cairo_surface_release_dest_image (cairo
* @clone_out: location to store a surface compatible with @surface
* and with contents identical to @src. The caller must call
* cairo_surface_destroy() on the result.
- *
+ *
* Creates a surface with contents identical to @src but that
* can be used efficiently with @surface. If @surface and @src are
* already compatible then it may return a new reference to @src.
- *
+ *
* Return value: %CAIRO_STATUS_SUCCESS if a surface was created and stored
* in @clone_out. Otherwise %CAIRO_INT_STATUS_UNSUPPORTED or another
* error like %CAIRO_STATUS_NO_MEMORY.
@@ -923,10 +923,10 @@ _cairo_surface_composite (cairo_operator
* @y: Y coordinate of rectangle, in backend coordinates
* @width: width of rectangle, in backend coordinates
* @height: height of rectangle, in backend coordinates
- *
+ *
* Applies an operator to a rectangle using a solid color as the source.
* See _cairo_surface_fill_rectangles() for full details.
- *
+ *
* Return value: %CAIRO_STATUS_SUCCESS or the error that occurred
**/
cairo_status_t
@@ -962,11 +962,11 @@ _cairo_surface_fill_rectangle (cairo_sur
* @op: the operator to apply to the region
* @color: the source color
* @region: the region to modify, in backend coordinates
- *
+ *
* Applies an operator to a set of rectangles specified as a
* #pixman_region16_t using a solid color as the source.
* See _cairo_surface_fill_rectangles() for full details.
- *
+ *
* Return value: %CAIRO_STATUS_SUCCESS or the error that occurred
**/
cairo_status_t
@@ -1012,13 +1012,13 @@ _cairo_surface_fill_region (cairo_surfac
* @color: the source color
* @rects: the rectangles to modify, in backend coordinates
* @num_rects: the number of rectangles in @rects
- *
+ *
* Applies an operator to a set of rectangles using a solid color
* as the source. Note that even if the operator is an unbounded operator
* such as %CAIRO_OPERATOR_IN, only the given set of rectangles
* is affected. This differs from _cairo_surface_composite_trapezoids()
* where the entire destination rectangle is cleared.
- *
+ *
* Return value: %CAIRO_STATUS_SUCCESS or the error that occurred
**/
cairo_status_t
@@ -1460,7 +1460,7 @@ _cairo_surface_set_clip_path_recursive (
* @surface: the #cairo_surface_t to set the clip on
* @clip_path: the clip path to set
* @serial: the clip serial number associated with the clip path
- *
+ *
* Sets the given clipping path for the surface and assigns the
* clipping serial to the surface.
**/
@@ -1542,7 +1542,7 @@ _cairo_surface_set_clip (cairo_surface_t
*
* This function returns a bounding box for the surface. The
* surface bounds are defined as a region beyond which no
- * rendering will possibly be recorded, in otherwords,
+ * rendering will possibly be recorded, in otherwords,
* it is the maximum extent of potentially usable
* coordinates. For simple pixel-based surfaces,
* it can be a close bound on the retained pixel
@@ -1743,7 +1743,7 @@ _cairo_surface_composite_fixup_unbounded
* @dst_y: @dst_y from _cairo_surface_composite()
* @width: @width from _cairo_surface_composite()
* @height: @height_x from _cairo_surface_composite()
- *
+ *
* Eeek! Too many parameters! This is a helper function to take care of fixing
* up for bugs in libpixman and RENDER where, when asked to composite an
* untransformed surface with an unbounded operator (like CLEAR or SOURCE)
@@ -1819,7 +1819,7 @@ _cairo_surface_composite_fixup_unbounded
* @dst_y: @dst_y from _cairo_surface_composite()
* @width: @width from _cairo_surface_composite()
* @height: @height_x from _cairo_surface_composite()
- *
+ *
* Like _cairo_surface_composite_fixup_unbounded(), but instead of
* handling the case where we have a source pattern and a mask
* pattern, handle the case where we are compositing a source pattern
diff --git a/src/cairo-svg-surface.c b/src/cairo-svg-surface.c
index 2827b57..4019639 100644
--- a/src/cairo-svg-surface.c
+++ b/src/cairo-svg-surface.c
@@ -169,7 +169,7 @@ static const cairo_paginated_surface_bac
* @closure: the closure argument for @write
* @width_in_points: width of the surface, in points (1 point == 1/72.0 inch)
* @height_in_points: height of the surface, in points (1 point == 1/72.0 inch)
- *
+ *
* Creates a SVG surface of the specified size in points to be written
* incrementally to the stream represented by @write and @closure.
*
@@ -205,10 +205,10 @@ cairo_svg_surface_create_for_stream (cai
* @filename: a filename for the SVG output (must be writable)
* @width_in_points: width of the surface, in points (1 point == 1/72.0 inch)
* @height_in_points: height of the surface, in points (1 point == 1/72.0 inch)
- *
+ *
* Creates a SVG surface of the specified size in points to be written
* to @filename.
- *
+ *
* Return value: a pointer to the newly created surface. The caller
* owns the surface and should call cairo_surface_destroy when done
* with it.
@@ -270,7 +270,7 @@ _extract_svg_surface (cairo_surface_t
* @surface: a svg cairo_surface_t
* @x_dpi: horizontal dpi
* @y_dpi: vertical dpi
- *
+ *
* Set the horizontal and vertical resolution for image fallbacks.
* When the svg backend needs to fall back to image overlays, it will
* use this resolution. These DPI values are not used for any other
@@ -334,7 +334,7 @@ cairo_svg_surface_restrict_to_version (c
* @version: supported version list
* @num_versions: list length
*
- * Returns the list of supported versions. See
+ * Returns the list of supported versions. See
* cairo_svg_surface_restrict_to_version().
**/
@@ -349,7 +349,7 @@ cairo_svg_get_versions (cairo_svg_versio
*num_versions = CAIRO_SVG_VERSION_LAST;
}
-/**
+/**
* cairo_svg_version_to_string:
* @version: a version id
*
@@ -406,7 +406,7 @@ _cairo_svg_surface_create_for_document (
_cairo_dtostr (buffer, sizeof buffer, height);
xmlSetProp (rect, CC2XML ("height"), C2XML (buffer));
- /* Use of xlink namespace requires node to be linked to tree.
+ /* Use of xlink namespace requires node to be linked to tree.
* So by default we link surface main node to document svg node.
* For surfaces that don't own document, their main node will be
* unlinked and freed in surface finish. */
@@ -1453,12 +1453,12 @@ _cairo_svg_surface_paint (void *abs
/* Emulation of clear and source operators, when no clipping region
* is defined. We just delete existing content of surface root node,
- * and exit early if operator is clear.
+ * and exit early if operator is clear.
* XXX: optimization of SOURCE operator doesn't work, since analyze
* above always return FALSE. In order to make it work, we need a way
* to know if there's an active clipping path.
* Optimization of CLEAR works because of a test in paginated surface,
- * and an optimiszation in meta surface. */
+ * and an optimiszation in meta surface. */
if (surface->clip_level == 0 &&
(op == CAIRO_OPERATOR_CLEAR ||
op == CAIRO_OPERATOR_SOURCE)) {
diff --git a/src/cairo-svg.h b/src/cairo-svg.h
index 9053ff0..637231b 100644
--- a/src/cairo-svg.h
+++ b/src/cairo-svg.h
@@ -1,7 +1,7 @@
/* cairo - a vector graphics library with display and print output
*
* cairo-svg.h
- *
+ *
* Copyright © 2005 Emmanuel Pacaud <emmanuel.pacaud at univ-poitiers.fr>
*
* This library is free software; you can redistribute it and/or
diff --git a/src/cairo-traps.c b/src/cairo-traps.c
index a3f1fca..93f4ead 100644
--- a/src/cairo-traps.c
+++ b/src/cairo-traps.c
@@ -93,7 +93,7 @@ _cairo_traps_fini (cairo_traps_t *traps)
* @traps: a #cairo_traps_t
* @box: a box that will be converted to a single trapezoid
* to store in @traps.
- *
+ *
* Initializes a cairo_traps_t to contain a single rectangular
* trapezoid.
**/
@@ -577,7 +577,7 @@ _line_segs_intersect_ceil (cairo_line_t
_cairo_int32_to_int64 (1));
}
- /*
+ /*
* Now convert from 32.32 to 48.16 and take the ceiling;
* this requires adding in 15 1 bits and shifting the result
*/
@@ -860,10 +860,10 @@ _cairo_traps_extents (cairo_traps_t *tra
* exactly representable as a pixman region, otherwise a
* a pointer to such a region, newly allocated.
* (free with pixman region destroy)
- *
+ *
* Determines if a set of trapezoids are exactly representable as a
* pixman region, and if so creates such a region.
- *
+ *
* Return value: %CAIRO_STATUS_SUCCESS or %CAIRO_STATUS_NO_MEMORY
**/
cairo_status_t
diff --git a/src/cairo-unicode.c b/src/cairo-unicode.c
index 0c0dff2..cf7c373 100644
--- a/src/cairo-unicode.c
+++ b/src/cairo-unicode.c
@@ -1,5 +1,5 @@
/* cairo_unicode.c: Unicode conversion routines
- *
+ *
* The code in this file is derived from GLib's gutf8.c and
* ultimately from libunicode. It is relicensed under the
* dual LGPL/MPL with permission of the original authors.
@@ -208,13 +208,13 @@ _utf8_get_char_extended (const unsigned
* @result: location to store a pointer to a newly allocated UTF-32
* string (always native endian). Free with free(). A 0
* word will be written after the last character.
- * @items_written: location to store number of 32-bit words
+ * @items_written: location to store number of 32-bit words
* written. (Not including the trailing 0)
*
* Converts a UTF-8 string to UCS-4. UCS-4 is an encoding of Unicode
* with 1 32-bit word per character. The string is validated to
* consist entirely of valid Unicode characters.
- *
+ *
* Return value: %CAIRO_STATUS_SUCCESS if the entire string was
* succesfully converted. %CAIRO_STATUS_INVALID_STRING if an
* an invalid sequence was found.
@@ -271,14 +271,14 @@ _cairo_utf8_to_ucs4 (const unsigned char
* @result: location to store a pointer to a newly allocated UTF-16
* string (always native endian). Free with free(). A 0
* word will be written after the last character.
- * @items_written: location to store number of 16-bit words
+ * @items_written: location to store number of 16-bit words
* written. (Not including the trailing 0)
*
* Converts a UTF-8 string to UTF-16. UTF-16 is an encoding of Unicode
* where characters are represented either as a single 16-bit word, or
* as a pair of 16-bit "surrogates". The string is validated to
* consist entirely of valid Unicode characters.
- *
+ *
* Return value: %CAIRO_STATUS_SUCCESS if the entire string was
* succesfully converted. %CAIRO_STATUS_INVALID_STRING if an
* an invalid sequence was found.
diff --git a/src/cairo-win32-font.c b/src/cairo-win32-font.c
index 81aadae..94163ce 100644
--- a/src/cairo-win32-font.c
+++ b/src/cairo-win32-font.c
@@ -244,7 +244,7 @@ _win32_scaled_font_create (LOGFONTW
* order in the Win32 font API, so we ignore those parts of
* cairo_font_options_t. We use the 'antialias' field to set
* the 'quality'.
- *
+ *
* XXX: The other option we could pay attention to, but don't
* here is the hint_metrics options.
*/
@@ -1151,7 +1151,7 @@ _cairo_win32_scaled_font_show_glyphs (vo
return status;
} else {
- /* Otherwise, we need to draw using software fallbacks. We create a mask
+ /* Otherwise, we need to draw using software fallbacks. We create a mask
* surface by drawing the the glyphs onto a DIB, black-on-white then
* inverting. GDI outputs gamma-corrected images so inverted black-on-white
* is very different from white-on-black. We favor the more common
@@ -1414,7 +1414,7 @@ static const cairo_font_face_backend_t _
* @logfont: A #LOGFONTW structure specifying the font to use.
* The lfHeight, lfWidth, lfOrientation and lfEscapement
* fields of this structure are ignored.
- *
+ *
* Creates a new font for the Win32 font backend based on a
* #LOGFONT. This font can then be used with
* cairo_set_font_face() or cairo_font_create(). The #cairo_scaled_font_t
@@ -1481,7 +1481,7 @@ cairo_win32_font_face_create_for_hfont (
*
* Normally, calls to SaveDC() and RestoreDC() would be made around
* the use of this function to preserve the original graphics state.
- *
+ *
* Return value: %CAIRO_STATUS_SUCCESS if the operation succeeded.
* otherwise an error such as %CAIRO_STATUS_NO_MEMORY and
* the device context is unchanged.
@@ -1528,7 +1528,7 @@ cairo_win32_scaled_font_select_font (cai
/**
* cairo_win32_scaled_font_done_font:
* @scaled_font: A #cairo_scaled_font_t from the Win32 font backend.
- *
+ *
* Releases any resources allocated by cairo_win32_scaled_font_select_font()
**/
void
@@ -1539,12 +1539,12 @@ cairo_win32_scaled_font_done_font (cairo
/**
* cairo_win32_scaled_font_get_metrics_factor:
* @scaled_font: a #cairo_scaled_font_t from the Win32 font backend
- *
+ *
* Gets a scale factor between logical coordinates in the coordinate
* space used by cairo_win32_scaled_font_select_font() (that is, the
* coordinate system used by the Windows functions to return metrics) and
* font space coordinates.
- *
+ *
* Return value: factor to multiply logical units by to get font space
* coordinates.
**/
diff --git a/src/cairo-win32-surface.c b/src/cairo-win32-surface.c
index d6d109c..e931a80 100644
--- a/src/cairo-win32-surface.c
+++ b/src/cairo-win32-surface.c
@@ -53,7 +53,7 @@ static const cairo_surface_backend_t cai
/**
* _cairo_win32_print_gdi_error:
* @context: context string to display along with the error
- *
+ *
* Helper function to dump out a human readable form of the
* current error code.
*
@@ -1088,13 +1088,13 @@ FAIL:
/**
* cairo_win32_surface_create:
* @hdc: the DC to create a surface for
- *
+ *
* Creates a cairo surface that targets the given DC. The DC will be
* queried for its initial clip extents, and this will be used as the
* size of the cairo surface. Also, if the DC is a raster DC, it will
* be queried for its pixel format and the cairo surface format will
* be set appropriately.
- *
+ *
* Return value: the newly created surface
**/
cairo_surface_t *
@@ -1175,14 +1175,14 @@ cairo_win32_surface_create (HDC hdc)
/**
* cairo_win32_surface_create_with_dib:
- * @format: format of pixels in the surface to create
+ * @format: format of pixels in the surface to create
* @width: width of the surface, in pixels
* @height: height of the surface, in pixels
- *
+ *
* Creates a device-independent-bitmap surface not associated with
* any particular existing surface or device context. The created
* bitmap will be unititialized.
- *
+ *
* Return value: the newly created surface
*
**/
@@ -1198,9 +1198,9 @@ cairo_win32_surface_create_with_dib (cai
/**
* _cairo_surface_is_win32:
* @surface: a #cairo_surface_t
- *
+ *
* Checks if a surface is an #cairo_win32_surface_t
- *
+ *
* Return value: True if the surface is an win32 surface
**/
int
diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c
index 648cdb6..5d05e24 100644
--- a/src/cairo-xcb-surface.c
+++ b/src/cairo-xcb-surface.c
@@ -588,7 +588,7 @@ _draw_image_surface (cairo_xcb_surface_t
image->width,
image->height,
dst_x, dst_y,
- /* left_pad */ 0, image->depth,
+ /* left_pad */ 0, image->depth,
data_len, image->data);
return CAIRO_STATUS_SUCCESS;
@@ -1078,9 +1078,9 @@ static const cairo_surface_backend_t cai
/**
* _cairo_surface_is_xcb:
* @surface: a #cairo_surface_t
- *
+ *
* Checks if a surface is a #cairo_xcb_surface_t
- *
+ *
* Return value: True if the surface is an xcb surface
**/
static cairo_bool_t
@@ -1216,7 +1216,7 @@ _cairo_xcb_surface_create_internal (XCBC
* Currently, only TrueColor visuals are fully supported.
* @width: the current width of @drawable.
* @height: the current height of @drawable.
- *
+ *
* Creates an XCB surface that draws to the given drawable.
* The way that colors are represented in the drawable is specified
* by the provided visual.
@@ -1224,7 +1224,7 @@ _cairo_xcb_surface_create_internal (XCBC
* NOTE: If @drawable is a window, then the function
* cairo_xcb_surface_set_size must be called whenever the size of the
* window changes.
- *
+ *
* Return value: the newly created surface
**/
cairo_surface_t *
@@ -1248,7 +1248,7 @@ cairo_xcb_surface_create (XCBConnection
*
* Creates an XCB surface that draws to the given bitmap.
* This will be drawn to as a CAIRO_FORMAT_A1 object.
- *
+ *
* Return value: the newly created surface
**/
cairo_surface_t *
@@ -1272,7 +1272,7 @@ cairo_xcb_surface_create_for_bitmap (XCB
* depth of @format mush match the depth of the drawable.
* @width: the current width of @drawable
* @height: the current height of @drawable
- *
+ *
* Creates an XCB surface that draws to the given drawable.
* The way that colors are represented in the drawable is specified
* by the provided picture format.
@@ -1280,8 +1280,8 @@ cairo_xcb_surface_create_for_bitmap (XCB
* NOTE: If @drawable is a Window, then the function
* cairo_xlib_surface_set_size must be called whenever the size of the
* window changes.
- *
- * Return value: the newly created surface.
+ *
+ * Return value: the newly created surface.
**/
cairo_surface_t *
cairo_xcb_surface_create_with_xrender_format (XCBConnection *c,
@@ -1300,7 +1300,7 @@ cairo_xcb_surface_create_with_xrender_fo
* @surface: a #cairo_surface_t for the XCB backend
* @width: the new width of the surface
* @height: the new height of the surface
- *
+ *
* Informs cairo of the new size of the XCB drawable underlying the
* surface. For a surface created for a window (rather than a pixmap),
* this function must be called each time the size of the window
diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
index 5d22ae8..38bf1bc 100644
--- a/src/cairo-xlib-surface.c
+++ b/src/cairo-xlib-surface.c
@@ -112,7 +112,7 @@ struct _cairo_xlib_surface {
*
* Both are fixed in xorg >= 6.9 and hopefully in > 6.8.2, so
* we can reuse the test for now.
- */
+ */
cairo_bool_t buggy_repeat;
int width;
@@ -157,7 +157,7 @@ static cairo_bool_t cairo_xlib_render_di
* cairo_xlib_test_disable_render:
*
* Disables the use of the RENDER extension.
- *
+ *
* <note>
* This function is <emphasis>only</emphasis> intended for internal
* testing use within the cairo distribution. It is not installed in
@@ -609,7 +609,7 @@ _get_image_surface (cairo_xlib_surface_t
_swap_ximage_to_native (ximage);
/*
- * Compute the pixel format masks from either a visual or a
+ * Compute the pixel format masks from either a visual or a
* XRenderFormat, failing we assume the drawable is an
* alpha-only pixmap as it could only have been created
* that way through the cairo_xlib_surface_create_for_bitmap
@@ -655,8 +655,8 @@ _get_image_surface (cairo_xlib_surface_t
}
else
{
- /*
- * XXX This can't work. We must convert the data to one of the
+ /*
+ * XXX This can't work. We must convert the data to one of the
* supported pixman formats. Pixman needs another function
* which takes data in an arbitrary format and converts it
* to something supported by that library.
@@ -1775,9 +1775,9 @@ static const cairo_surface_backend_t cai
/**
* _cairo_surface_is_xlib:
* @surface: a #cairo_surface_t
- *
+ *
* Checks if a surface is a #cairo_xlib_surface_t
- *
+ *
* Return value: True if the surface is an xlib surface
**/
static cairo_bool_t
@@ -1954,7 +1954,7 @@ cairo_xlib_surface_create (Display *
* @screen: the X Screen associated with @bitmap
* @width: the current width of @bitmap.
* @height: the current height of @bitmap.
- *
+ *
* Creates an Xlib surface that draws to the given bitmap.
* This will be drawn to as a CAIRO_FORMAT_A1 object.
*
@@ -2008,7 +2008,7 @@ cairo_xlib_surface_create_with_xrender_f
* @surface: a #cairo_surface_t for the XLib backend
* @width: the new width of the surface
* @height: the new height of the surface
- *
+ *
* Informs cairo of the new size of the X Drawable underlying the
* surface. For a surface created for a Window (rather than a Pixmap),
* this function must be called each time the size of the window
@@ -2041,7 +2041,7 @@ cairo_xlib_surface_set_size (cairo_surfa
* @drawable: the new drawable for the surface
* @width: the width of the new drawable
* @height: the height of the new drawable
- *
+ *
* Informs cairo of a new X Drawable underlying the
* surface. The drawable must match the display, screen
* and format of the existing drawable or the application
@@ -2258,7 +2258,7 @@ _cairo_xlib_surface_add_glyph (Display *
* an origin at (0,0) and an x and y bounding box "offset" which
* extends possibly off into negative coordinates, like so:
*
- *
+ *
* (x,y) <-- probably negative numbers
* +----------------+
* | . |
@@ -2286,7 +2286,7 @@ _cairo_xlib_surface_add_glyph (Display *
* (width,height)
*
* Luckily, this is just the negation of the numbers we already have
- * sitting around for x and y.
+ * sitting around for x and y.
*/
glyph_info.x = - (int) floor(glyph_surface->base.device_x_offset + 0.5);
diff --git a/src/cairo.c b/src/cairo.c
index 05f3ee9..98308c3 100644
--- a/src/cairo.c
+++ b/src/cairo.c
@@ -68,7 +68,7 @@ static const cairo_t cairo_nil = {
* _cairo_error:
* @status: a status value indicating an error, (eg. not
* CAIRO_STATUS_SUCCESS)
- *
+ *
* Checks that status is an error status, but does nothing else.
*
* All assignments of an error status to any user-visible object
@@ -91,7 +91,7 @@ _cairo_error (cairo_status_t status)
* @cr: a cairo context
* @status: a status value indicating an error, (eg. not
* CAIRO_STATUS_SUCCESS)
- *
+ *
* Sets cr->status to @status and calls _cairo_error;
*
* All assignments of an error status to cr->status should happen
@@ -116,7 +116,7 @@ _cairo_set_error (cairo_t *cr, cairo_sta
/**
* cairo_version:
- *
+ *
* Returns the version of the cairo library encoded in a single
* integer as per CAIRO_VERSION_ENCODE. The encoding ensures that
* later versions compare greater than earlier versions.
@@ -130,7 +130,7 @@ _cairo_set_error (cairo_t *cr, cairo_sta
*
* See also cairo_version_string() as well as the compile-time
* equivalents %CAIRO_VERSION and %CAIRO_VERSION_STRING.
- *
+ *
* Return value: the encoded version.
**/
int
@@ -141,13 +141,13 @@ cairo_version (void)
/**
* cairo_version_string:
- *
+ *
* Returns the version of the cairo library as a human-readable string
* of the form "X.Y.Z".
*
* See also cairo_version() as well as the compile-time equivalents
* %CAIRO_VERSION_STRING and %CAIRO_VERSION.
- *
+ *
* Return value: a string containing the version.
**/
const char*
@@ -159,7 +159,7 @@ cairo_version_string (void)
/**
* cairo_create:
* @target: target surface for the context
- *
+ *
* Creates a new #cairo_t with all graphics state parameters set to
* default values and with @target as a target surface. The target
* surface should be constructed with a backend-specific function such
@@ -169,7 +169,7 @@ cairo_version_string (void)
* This function references @target, so you can immediately
* call cairo_surface_destroy() on it if you don't need to
* maintain a separate reference to it.
- *
+ *
* Return value: a newly allocated #cairo_t with a reference
* count of 1. The initial reference count should be released
* with cairo_destroy() when you are done using the #cairo_t.
@@ -210,9 +210,9 @@ cairo_create (cairo_surface_t *target)
/**
* cairo_reference:
* @cr: a #cairo_t
- *
+ *
* Increases the reference count on @cr by one. This prevents
- * @cr from being destroyed until a matching call to cairo_destroy()
+ * @cr from being destroyed until a matching call to cairo_destroy()
* is made.
*
* Return value: the referenced #cairo_t.
@@ -236,7 +236,7 @@ cairo_reference (cairo_t *cr)
/**
* cairo_destroy:
* @cr: a #cairo_t
- *
+ *
* Decreases the reference count on @cr by one. If the result
* is zero, then @cr and all associated resources are freed.
* See cairo_reference().
@@ -271,7 +271,7 @@ cairo_destroy (cairo_t *cr)
/**
* cairo_save:
* @cr: a #cairo_t
- *
+ *
* Makes a copy of the current state of @cr and saves it
* on an internal stack of saved states for @cr. When
* cairo_restore() is called, @cr will be restored to
@@ -307,7 +307,7 @@ slim_hidden_def(cairo_save);
/**
* cairo_restore:
* @cr: a #cairo_t
- *
+ *
* Restores @cr to the state saved by a preceding call to
* cairo_save() and removes that state from the stack of
* saved states.
@@ -545,7 +545,7 @@ slim_hidden_def(cairo_pop_group_to_sourc
* cairo_set_operator:
* @cr: a #cairo_t
* @op: a compositing operator, specified as a #cairo_operator_t
- *
+ *
* Sets the compositing operator to be used for all drawing
* operations. See #cairo_operator_t for details on the semantics of
* each available compositing operator.
@@ -571,7 +571,7 @@ cairo_set_operator (cairo_t *cr, cairo_o
* @red: red component of color
* @green: green component of color
* @blue: blue component of color
- *
+ *
* Sets the source pattern within @cr to an opaque color. This opaque
* color will then be used for any subsequent drawing operation until
* a new source pattern is set.
@@ -600,7 +600,7 @@ cairo_set_source_rgb (cairo_t *cr, doubl
* @green: green component of color
* @blue: blue component of color
* @alpha: alpha component of color
- *
+ *
* Sets the source pattern within @cr to a translucent color. This
* color will then be used for any subsequent drawing operation until
* a new source pattern is set.
@@ -630,7 +630,7 @@ cairo_set_source_rgba (cairo_t *cr,
* @surface: a surface to be used to set the source pattern
* @x: User-space X coordinate for surface origin
* @y: User-space Y coordinate for surface origin
- *
+ *
* This is a convenience function for creating a pattern from @surface
* and setting it as the source in @cr with cairo_set_source().
*
@@ -673,7 +673,7 @@ cairo_set_source_surface (cairo_t *cr,
* @cr: a cairo context
* @source: a #cairo_pattern_t to be used as the source for
* subsequent drawing operations.
- *
+ *
* Sets the source pattern within @cr to @source. This pattern
* will then be used for any subsequent drawing operation until a new
* source pattern is set.
@@ -711,9 +711,9 @@ cairo_set_source (cairo_t *cr, cairo_pat
/**
* cairo_get_source:
* @cr: a cairo context
- *
+ *
* Gets the current source pattern for @cr.
- *
+ *
* Return value: the current source pattern. This object is owned by
* cairo. To keep a reference to it, you must call
* cairo_pattern_reference().
@@ -731,7 +731,7 @@ cairo_get_source (cairo_t *cr)
* cairo_set_tolerance:
* @cr: a #cairo_t
* @tolerance: the tolerance, in device units (typically pixels)
- *
+ *
* Sets the tolerance used when converting paths into trapezoids.
* Curved segments of the path will be subdivided until the maximum
* deviation between the original path and the polygonal approximation
@@ -757,7 +757,7 @@ cairo_set_tolerance (cairo_t *cr, double
* cairo_set_antialias:
* @cr: a #cairo_t
* @antialias: the new antialiasing mode
- *
+ *
* Set the antialiasing mode of the rasterizer used for drawing shapes.
* This value is a hint, and a particular backend may or may not support
* a particular value. At the current time, no backend supports
@@ -781,7 +781,7 @@ cairo_set_antialias (cairo_t *cr, cairo_
* cairo_set_fill_rule:
* @cr: a #cairo_t
* @fill_rule: a fill rule, specified as a #cairo_fill_rule_t
- *
+ *
* Set the current fill rule within the cairo context. The fill rule
* is used to determine which regions are inside or outside a complex
* (potentially self-intersecting) path. The current fill rule affects
@@ -803,7 +803,7 @@ cairo_set_fill_rule (cairo_t *cr, cairo_
* cairo_set_line_width:
* @cr: a #cairo_t
* @width: a line width
- *
+ *
* Sets the current line width within the cairo context. The line
* width value specifies the diameter of a pen that is circular in
* user space, (though device-space pen may be an ellipse in general
@@ -842,7 +842,7 @@ cairo_set_line_width (cairo_t *cr, doubl
* cairo_set_line_cap:
* @cr: a cairo context, as a #cairo_t
* @line_cap: a line cap style, as a #cairo_line_cap_t
- *
+ *
* Sets the current line cap style within the cairo context. See
* #cairo_line_cap_t for details about how the available line cap
* styles are drawn.
@@ -894,7 +894,7 @@ cairo_set_line_join (cairo_t *cr, cairo_
* @dashes: an array specifying alternate lengths of on and off stroke portions
* @num_dashes: the length of the dashes array
* @offset: an offset into the dash pattern at which the stroke should start
- *
+ *
* Sets the dash pattern to be used by cairo_stroke(). A dash pattern
* is specified by @dashes, an array of positive values. Each value
* provides the length of alternate "on" and "off" portions of the
@@ -947,7 +947,7 @@ cairo_set_miter_limit (cairo_t *cr, doub
* @cr: a cairo context
* @tx: amount to translate in the X direction
* @ty: amount to translate in the Y direction
- *
+ *
* Modifies the current transformation matrix (CTM) by translating the
* user-space origin by (@tx, @ty). This offset is interpreted as a
* user-space coordinate according to the CTM in place before the new
@@ -970,7 +970,7 @@ cairo_translate (cairo_t *cr, double tx,
* @cr: a cairo context
* @sx: scale factor for the X dimension
* @sy: scale factor for the Y dimension
- *
+ *
* Modifies the current transformation matrix (CTM) by scaling the X
* and Y user-space axes by @sx and @sy respectively. The scaling of
* the axes takes place after any existing transformation of user
@@ -993,7 +993,7 @@ cairo_scale (cairo_t *cr, double sx, dou
* @cr: a cairo context
* @angle: angle (in radians) by which the user-space axes will be
* rotated
- *
+ *
* Modifies the current transformation matrix (CTM) by rotating the
* user-space axes by @angle radians. The rotation of the axes takes
* places after any existing transformation of user space. The
@@ -1015,7 +1015,7 @@ cairo_rotate (cairo_t *cr, double angle)
* cairo_transform:
* @cr: a cairo context
* @matrix: a transformation to be applied to the user-space axes
- *
+ *
* Modifies the current transformation matrix (CTM) by applying
* @matrix as an additional transformation. The new transformation of
* user space takes place after any existing transformation.
@@ -1036,7 +1036,7 @@ cairo_transform (cairo_t *cr,
* cairo_set_matrix:
* @cr: a cairo context
* @matrix: a transformation matrix from user space to device space
- *
+ *
* Modifies the current transformation matrix (CTM) by setting it
* equal to @matrix.
**/
@@ -1055,7 +1055,7 @@ cairo_set_matrix (cairo_t *cr,
/**
* cairo_identity_matrix:
* @cr: a cairo context
- *
+ *
* Resets the current transformation matrix (CTM) by setting it equal
* to the identity matrix. That is, the user-space and device-space
* axes will be aligned and one user-space unit will transform to one
@@ -1077,7 +1077,7 @@ cairo_identity_matrix (cairo_t *cr)
* @cr: a cairo context
* @x: X value of coordinate (in/out parameter)
* @y: Y value of coordinate (in/out parameter)
- *
+ *
* Transform a coordinate from user space to device space by
* multiplying the given point by the current transformation matrix
* (CTM).
@@ -1098,7 +1098,7 @@ cairo_user_to_device (cairo_t *cr, doubl
* @cr: a cairo context
* @dx: X component of a distance vector (in/out parameter)
* @dy: Y component of a distance vector (in/out parameter)
- *
+ *
* Transform a distance vector from user space to device space. This
* function is similar to cairo_user_to_device() except that the
* translation components of the CTM will be ignored when transforming
@@ -1120,7 +1120,7 @@ cairo_user_to_device_distance (cairo_t *
* @cr: a cairo
* @x: X value of coordinate (in/out parameter)
* @y: Y value of coordinate (in/out parameter)
- *
+ *
* Transform a coordinate from device space to user space by
* multiplying the given point by the inverse of the current
* transformation matrix (CTM).
@@ -1141,7 +1141,7 @@ cairo_device_to_user (cairo_t *cr, doubl
* @cr: a cairo context
* @dx: X component of a distance vector (in/out parameter)
* @dy: Y component of a distance vector (in/out parameter)
- *
+ *
* Transform a distance vector from device space to user space. This
* function is similar to cairo_device_to_user() except that the
* translation components of the inverse CTM will be ignored when
@@ -1205,7 +1205,7 @@ slim_hidden_def(cairo_move_to);
/**
* cairo_new_sub_path:
* @cr: a cairo context
- *
+ *
* Begin a new subpath. Note that the existing path is not
* affected. After this call there will be no current point.
*
@@ -1318,7 +1318,7 @@ cairo_curve_to (cairo_t *cr,
* @radius: the radius of the arc
* @angle1: the start angle, in radians
* @angle2: the end angle, in radians
- *
+ *
* Adds a circular arc of the given @radius to the current path. The
* arc is centered at (@xc, @yc), begins at @angle1 and proceeds in
* the direction of increasing angles to end at @angle2. If @angle2 is
@@ -1388,7 +1388,7 @@ cairo_arc (cairo_t *cr,
* @radius: the radius of the arc
* @angle1: the start angle, in radians
* @angle2: the end angle, in radians
- *
+ *
* Adds a circular arc of the given @radius to the current path. The
* arc is centered at (@xc, @yc), begins at @angle1 and proceeds in
* the direction of decreasing angles to end at @angle2. If @angle2 is
@@ -1619,7 +1619,7 @@ cairo_stroke_to_path (cairo_t *cr)
/**
* cairo_close_path:
* @cr: a cairo context
- *
+ *
* Adds a line segment to the path from the current point to the
* beginning of the current subpath, (the most recent point passed to
* cairo_move_to()), and closes this subpath. After this call the
@@ -1649,7 +1649,7 @@ slim_hidden_def(cairo_close_path);
/**
* cairo_paint:
* @cr: a cairo context
- *
+ *
* A drawing operator that paints the current source everywhere within
* the current clip region.
**/
@@ -1668,7 +1668,7 @@ cairo_paint (cairo_t *cr)
* cairo_paint_with_alpha:
* @cr: a cairo context
* @alpha: alpha value, between 0 (transparent) and 1 (opaque)
- *
+ *
* A drawing operator that paints the current source everywhere within
* the current clip region using a mask of constant alpha value
* @alpha. The effect is similar to cairo_paint(), but the drawing
@@ -1745,7 +1745,7 @@ cairo_mask (cairo_t *cr,
* A drawing operator that paints the current source
* using the alpha channel of @surface as a mask. (Opaque
* areas of @surface are painted with the source, transparent
- * areas are not painted.)
+ * areas are not painted.)
*/
void
cairo_mask_surface (cairo_t *cr,
@@ -1772,7 +1772,7 @@ cairo_mask_surface (cairo_t *cr,
/**
* cairo_stroke:
* @cr: a cairo context
- *
+ *
* A drawing operator that strokes the current path according to the
* current line width, line join, line cap, and dash settings. After
* cairo_stroke, the current path will be cleared from the cairo
@@ -1791,7 +1791,7 @@ cairo_stroke (cairo_t *cr)
/**
* cairo_stroke_preserve:
* @cr: a cairo context
- *
+ *
* A drawing operator that strokes the current path according to the
* current line width, line join, line cap, and dash settings. Unlike
* cairo_stroke(), cairo_stroke_preserve preserves the path within the
@@ -1816,7 +1816,7 @@ slim_hidden_def(cairo_stroke_preserve);
/**
* cairo_fill:
* @cr: a cairo context
- *
+ *
* A drawing operator that fills the current path according to the
* current fill rule, (each sub-path is implicitly closed before being
* filled). After cairo_fill, the current path will be cleared from
@@ -1834,7 +1834,7 @@ cairo_fill (cairo_t *cr)
/**
* cairo_fill_preserve:
* @cr: a cairo context
- *
+ *
* A drawing operator that fills the current path according to the
* current fill rule, (each sub-path is implicitly closed before being
* filled). Unlike cairo_fill(), cairo_fill_preserve preserves the
@@ -1943,7 +1943,7 @@ cairo_fill_extents (cairo_t *cr,
/**
* cairo_clip:
* @cr: a cairo context
- *
+ *
* Establishes a new clip region by intersecting the current clip
* region with the current path as it would be filled by cairo_fill()
* and according to the current fill rule (see cairo_set_fill_rule()).
@@ -1973,7 +1973,7 @@ cairo_clip (cairo_t *cr)
/**
* cairo_clip_preserve:
* @cr: a cairo context
- *
+ *
* Establishes a new clip region by intersecting the current clip
* region with the current path as it would be filled by cairo_fill()
* and according to the current fill rule (see cairo_set_fill_rule()).
@@ -2007,7 +2007,7 @@ slim_hidden_def(cairo_clip_preserve);
/**
* cairo_reset_clip:
* @cr: a cairo context
- *
+ *
* Reset the current clip region to its original, unrestricted
* state. That is, set the clip region to an infinitely large shape
* containing the target surface. Equivalently, if infinity is too
@@ -2037,7 +2037,7 @@ cairo_reset_clip (cairo_t *cr)
* @family: a font family name, encoded in UTF-8
* @slant: the slant for the font
* @weight: the weight for the font
- *
+ *
* Selects a family and style of font from a simplified description as
* a family name, slant and weight. This function is meant to be used
* only for applications with simple font needs: Cairo doesn't provide
@@ -2063,7 +2063,7 @@ cairo_select_font_face (cairo_t
/**
* cairo_get_font_face:
* @cr: a #cairo_t
- *
+ *
* Gets the current font face for a #cairo_t.
*
* Return value: the current font object. Can return %NULL
@@ -2093,7 +2093,7 @@ cairo_get_font_face (cairo_t *cr)
* @cr: a #cairo_t
* @extents: a #cairo_font_extents_t object into which the results
* will be stored.
- *
+ *
* Gets the font extents for the currently selected font.
**/
void
@@ -2133,7 +2133,7 @@ cairo_set_font_face (cairo_t *
* cairo_set_font_size:
* @cr: a #cairo_t
* @size: the new font size, in user space units
- *
+ *
* Sets the current font matrix to a scale by a factor of @size, replacing
* any font matrix previously set with cairo_set_font_size() or
* cairo_set_font_matrix(). This results in a font size of @size user space
@@ -2194,7 +2194,7 @@ cairo_get_font_matrix (cairo_t *cr, cair
* cairo_set_font_options:
* @cr: a #cairo_t
* @options: font options to use
- *
+ *
* Sets a set of custom font rendering options for the #cairo_t.
* Rendering options are derived by merging these options with the
* options derived from underlying surface; if the value in @options
@@ -2218,7 +2218,7 @@ cairo_set_font_options (cairo_t
* @cr: a #cairo_t
* @options: a #cairo_font_options_t object into which to store
* the retrieved options. All existing values are overwritten
- *
+ *
* Retrieves font rendering options set via #cairo_set_font_options.
* Note that the returned options do not include any options derived
* from the underlying surface; they are literally the options
@@ -2277,7 +2277,7 @@ BAIL:
* @utf8: a string of text, encoded in UTF-8
* @extents: a #cairo_text_extents_t object into which the results
* will be stored
- *
+ *
* Gets the extents for a string of text. The extents describe a
* user-space rectangle that encloses the "inked" portion of the text,
* (as it would be drawn by cairo_show_text()). Additionally, the
@@ -2341,14 +2341,14 @@ cairo_text_extents (cairo_t
* @num_glyphs: the number of elements in @glyphs
* @extents: a #cairo_text_extents_t object into which the results
* will be stored
- *
+ *
* Gets the extents for an array of glyphs. The extents describe a
* user-space rectangle that encloses the "inked" portion of the
* glyphs, (as they would be drawn by cairo_show_glyphs()).
* Additionally, the x_advance and y_advance values indicate the
* amount by which the current point would be advanced by
* cairo_show_glyphs.
- *
+ *
* Note that whitespace glyphs do not contribute to the size of the
* rectangle (extents.width and extents.height).
**/
@@ -2371,7 +2371,7 @@ cairo_glyph_extents (cairo_t
* cairo_show_text:
* @cr: a cairo context
* @utf8: a string of text encoded in UTF-8
- *
+ *
* A drawing operator that generates the shape from a string of UTF-8
* characters, rendered according to the current font_face, font_size
* (font_matrix), and font_options.
@@ -2505,9 +2505,9 @@ cairo_glyph_path (cairo_t *cr, cairo_gly
/**
* cairo_get_operator:
* @cr: a cairo context
- *
+ *
* Gets the current compositing operator for a cairo context.
- *
+ *
* Return value: the current compositing operator.
**/
cairo_operator_t
@@ -2519,9 +2519,9 @@ cairo_get_operator (cairo_t *cr)
/**
* cairo_get_tolerance:
* @cr: a cairo context
- *
+ *
* Gets the current tolerance value, as set by cairo_set_tolerance().
- *
+ *
* Return value: the current tolerance value.
**/
double
@@ -2533,9 +2533,9 @@ cairo_get_tolerance (cairo_t *cr)
/**
* cairo_get_antialias:
* @cr: a cairo context
- *
+ *
* Gets the current shape antialiasing mode, as set by cairo_set_shape_antialias().
- *
+ *
* Return value: the current shape antialiasing mode.
**/
cairo_antialias_t
@@ -2549,7 +2549,7 @@ cairo_get_antialias (cairo_t *cr)
* @cr: a cairo context
* @x: return value for X coordinate of the current point
* @y: return value for Y coordinate of the current point
- *
+ *
* Gets the current point of the current path, which is
* conceptually the final point reached by the path so far.
*
@@ -2592,9 +2592,9 @@ slim_hidden_def(cairo_get_current_point)
/**
* cairo_get_fill_rule:
* @cr: a cairo context
- *
+ *
* Gets the current fill rule, as set by cairo_set_fill_rule().
- *
+ *
* Return value: the current fill rule.
**/
cairo_fill_rule_t
@@ -2606,7 +2606,7 @@ cairo_get_fill_rule (cairo_t *cr)
/**
* cairo_get_line_width:
* @cr: a cairo context
- *
+ *
* Return value: the current line width value exactly as set by
* cairo_set_line_width(). Note that the value is unchanged even if
* the CTM has changed between the calls to cairo_set_line_width() and
@@ -2621,9 +2621,9 @@ cairo_get_line_width (cairo_t *cr)
/**
* cairo_get_line_cap:
* @cr: a cairo context
- *
+ *
* Gets the current line cap style, as set by cairo_set_line_cap().
- *
+ *
* Return value: the current line cap style.
**/
cairo_line_cap_t
@@ -2635,9 +2635,9 @@ cairo_get_line_cap (cairo_t *cr)
/**
* cairo_get_line_join:
* @cr: a cairo context
- *
+ *
* Gets the current line join style, as set by cairo_set_line_join().
- *
+ *
* Return value: the current line join style.
**/
cairo_line_join_t
@@ -2649,9 +2649,9 @@ cairo_get_line_join (cairo_t *cr)
/**
* cairo_get_miter_limit:
* @cr: a cairo context
- *
+ *
* Gets the current miter limit, as set by cairo_set_miter_limit().
- *
+ *
* Return value: the current miter limit.
**/
double
@@ -2676,7 +2676,7 @@ cairo_get_matrix (cairo_t *cr, cairo_mat
/**
* cairo_get_target:
* @cr: a cairo context
- *
+ *
* Gets the target surface for the cairo context as passed to
* cairo_create().
*
@@ -2685,7 +2685,7 @@ cairo_get_matrix (cairo_t *cr, cairo_mat
* (ie. cairo_status() <literal>!=</literal> %CAIRO_STATUS_SUCCESS).
* A nil surface is indicated by cairo_surface_status()
* <literal>!=</literal> %CAIRO_STATUS_SUCCESS.
- *
+ *
* Return value: the target surface. This object is owned by cairo. To
* keep a reference to it, you must call cairo_surface_reference().
**/
@@ -2726,11 +2726,11 @@ cairo_get_group_target (cairo_t *cr)
/**
* cairo_copy_path:
* @cr: a cairo context
- *
+ *
* Creates a copy of the current path and returns it to the user as a
* #cairo_path_t. See #cairo_path_data_t for hints on how to iterate
* over the returned data structure.
- *
+ *
* This function will always return a valid pointer, but the result
* will have no data (<literal>data==NULL</literal> and
* <literal>num_data==0</literal>), if either of the following
@@ -2761,7 +2761,7 @@ cairo_copy_path (cairo_t *cr)
/**
* cairo_copy_path_flat:
* @cr: a cairo context
- *
+ *
* Gets a flattened copy of the current path and returns it to the
* user as a #cairo_path_t. See #cairo_path_data_t for hints on
* how to iterate over the returned data structure.
@@ -2786,7 +2786,7 @@ cairo_copy_path (cairo_t *cr)
* <literal>path->status</literal> will contain the same status that
* would be returned by cairo_status().</listitem>
* </orderedlist>
- *
+ *
* Return value: the copy of the current path. The caller owns the
* returned object and should call cairo_path_destroy() when finished
* with it.
@@ -2804,7 +2804,7 @@ cairo_copy_path_flat (cairo_t *cr)
* cairo_append_path:
* @cr: a cairo context
* @path: path to be appended
- *
+ *
* Append the @path onto the current path. The @path may be either the
* return value from one of cairo_copy_path() or
* cairo_copy_path_flat() or it may be constructed manually. See
diff --git a/src/cairo.h b/src/cairo.h
index 9fa44dc..1edc88f 100644
--- a/src/cairo.h
+++ b/src/cairo.h
@@ -341,7 +341,7 @@ cairo_set_tolerance (cairo_t *cr, double
* @CAIRO_ANTIALIAS_SUBPIXEL: Perform antialiasing by taking
* advantage of the order of subpixel elements on devices
* such as LCD panels
- *
+ *
* Specifies the type of antialiasing to do when rendering text or shapes.
**/
typedef enum _cairo_antialias {
@@ -693,7 +693,7 @@ typedef struct {
* or <firstterm>external leading</firstterm>. When space
* is at a premium, most fonts can be set with only
* a distance of @ascent+ at descent between lines.
- * @max_x_advance: the maximum distance in the X direction that
+ * @max_x_advance: the maximum distance in the X direction that
* the the origin is advanced for any glyph in the font.
* @max_y_advance: the maximum distance in the Y direction that
* the the origin is advanced for any glyph in the font.
@@ -744,7 +744,7 @@ typedef enum _cairo_font_weight {
* with red at the top
* @CAIRO_SUBPIXEL_ORDER_VBGR: Subpixel elements are arranged vertically
* with blue at the top
- *
+ *
* The subpixel order specifies the order of color elements within
* each pixel on the display device when rendering with an
* antialiasing mode of %CAIRO_ANTIALIAS_SUBPIXEL.
diff --git a/src/cairoint.h b/src/cairoint.h
index 4d69178..700e418 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -339,7 +339,7 @@ cairo_private void
_cairo_rectangle_intersect (cairo_rectangle_fixed_t *dest, cairo_rectangle_fixed_t *src);
-/* cairo_array.c structures and functions */
+/* cairo_array.c structures and functions */
typedef struct _cairo_array cairo_array_t;
struct _cairo_array {
@@ -751,11 +751,11 @@ struct _cairo_surface_backend {
(*get_extents) (void *surface,
cairo_rectangle_fixed_t *rectangle);
- /*
+ /*
* This is an optional entry to let the surface manage its own glyph
* resources. If null, render against this surface, using image
- * surfaces as glyphs.
- */
+ * surfaces as glyphs.
+ */
cairo_int_status_t
(*old_show_glyphs) (cairo_scaled_font_t *font,
cairo_operator_t op,
diff --git a/test/buffer-diff.c b/test/buffer-diff.c
index 89af811..e0f42da 100644
--- a/test/buffer-diff.c
+++ b/test/buffer-diff.c
@@ -12,7 +12,7 @@
* Richard Worth makes no representations about the suitability of this
* software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
* RICHARD WORTH DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
* NO EVENT SHALL RICHARD WORTH BE LIABLE FOR ANY SPECIAL, INDIRECT OR
diff --git a/test/buffer-diff.h b/test/buffer-diff.h
index fd9662e..7394a2f 100644
--- a/test/buffer-diff.h
+++ b/test/buffer-diff.h
@@ -12,7 +12,7 @@
* Richard Worth makes no representations about the suitability of this
* software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
* RICHARD WORTH DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
* NO EVENT SHALL RICHARD WORTH BE LIABLE FOR ANY SPECIAL, INDIRECT OR
diff --git a/test/cairo-test.c b/test/cairo-test.c
index fa9a0b0..09e8012 100644
--- a/test/cairo-test.c
+++ b/test/cairo-test.c
@@ -1326,7 +1326,7 @@ cleanup_pdf (void *closure)
#include "cairo-svg.h"
static const char *svg_ignored_tests[] = {
- /* rectangle-rounding-error uses CAIRO_ANTIALIAS_NONE,
+ /* rectangle-rounding-error uses CAIRO_ANTIALIAS_NONE,
* which is not supported */
"rectangle-rounding-error",
NULL
@@ -1859,7 +1859,7 @@ cairo_test_create_surface_from_png (cons
image = cairo_image_surface_create_from_png (filename);
if (cairo_surface_status(image)) {
- /* expect not found when running with srcdir != builddir
+ /* expect not found when running with srcdir != builddir
* such as when 'make distcheck' is run
*/
if (srcdir) {
diff --git a/test/cairo-test.h b/test/cairo-test.h
index 7327182..c5e122d 100644
--- a/test/cairo-test.h
+++ b/test/cairo-test.h
@@ -83,7 +83,7 @@ typedef cairo_test_status_t (*cairo_tes
*
* cairo_test() accepts a draw function which will be called once for
* each testable backend. The following checks will be performed for
- * each backend:
+ * each backend:
*
* 1) If draw() does not return CAIRO_TEST_SUCCESS then this backend
* fails.
diff --git a/test/imagediff.c b/test/imagediff.c
index 41d065c..90126ed 100644
--- a/test/imagediff.c
+++ b/test/imagediff.c
@@ -12,7 +12,7 @@
* Richard Worth makes no representations about the suitability of this
* software for any purpose. It is provided "as is" without express
* or implied warranty.
- *
+ *
* RICHARD WORTH DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
* NO EVENT SHALL RICHARD WORTH BE LIABLE FOR ANY SPECIAL, INDIRECT OR
diff --git a/test/rectangle-rounding-error.c b/test/rectangle-rounding-error.c
index 7ce22d5..c183634 100644
--- a/test/rectangle-rounding-error.c
+++ b/test/rectangle-rounding-error.c
@@ -25,10 +25,10 @@
#include "cairo-test.h"
-/* Test case for:
- *
- * https://bugs.freedesktop.org/show_bug.cgi?id=4137
- */
+/* Test case for:
+ *
+ * https://bugs.freedesktop.org/show_bug.cgi?id=4137
+ */
cairo_test_t test = {
"rectangle-rounding-error",
diff-tree 80b8deb1e4f9d0b856106031c6a7a629cca7552c (from 28d47d332aafa81bcbc669603357298cb0a14322)
Author: Carl Worth <cworth at cworth.org>
Date: Tue Jun 6 15:25:49 2006 -0700
Remove extraneous whitespace from "blank" lines.
This patch was produced with the following (GNU) sed script:
sed -i -r -e 's/^[ \t]+$//'
run on all *.[ch] files within cairo.
diff --git a/doc/tutorial/src/include/cairo-tutorial-gtk.h b/doc/tutorial/src/include/cairo-tutorial-gtk.h
index cdf96e2..8a820f3 100644
--- a/doc/tutorial/src/include/cairo-tutorial-gtk.h
+++ b/doc/tutorial/src/include/cairo-tutorial-gtk.h
@@ -128,6 +128,6 @@ main (int argc, char **argv)
gtk_widget_show_all (window);
gtk_main ();
-
+
return 0;
}
diff --git a/doc/tutorial/src/include/cairo-tutorial-pdf.h b/doc/tutorial/src/include/cairo-tutorial-pdf.h
index ac2341d..c65b7e4 100644
--- a/doc/tutorial/src/include/cairo-tutorial-pdf.h
+++ b/doc/tutorial/src/include/cairo-tutorial-pdf.h
@@ -58,7 +58,7 @@ main (int argc, char **argv)
}
surface = cairo_pdf_surface_create (filename, WIDTH, HEIGHT);
-
+
cr = cairo_create (surface);
draw (cr, WIDTH, HEIGHT);
diff --git a/doc/tutorial/src/include/cairo-tutorial-png.h b/doc/tutorial/src/include/cairo-tutorial-png.h
index a78551d..837dc37 100644
--- a/doc/tutorial/src/include/cairo-tutorial-png.h
+++ b/doc/tutorial/src/include/cairo-tutorial-png.h
@@ -43,7 +43,7 @@ main (int argc, char **argv)
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
WIDTH, HEIGHT);
-
+
cr = cairo_create (surface);
draw (cr, WIDTH, HEIGHT);
diff --git a/doc/tutorial/src/lca.c b/doc/tutorial/src/lca.c
index 9aa2c13..0b131af 100644
--- a/doc/tutorial/src/lca.c
+++ b/doc/tutorial/src/lca.c
@@ -19,14 +19,14 @@ draw (cairo_t *cr, int width, int height
cairo_move_to (cr, 0, 0);
cairo_line_to (cr, 0, 80);
cairo_line_to (cr, 50, 80);
-
+
/* C */
cairo_move_to (cr, 110 + 40 * cos (M_PI / 3), 40 + 40 * sin(M_PI / 3));
cairo_arc (cr, 110, 40, 40, M_PI / 3, -M_PI / 3);
-
+
/* A */
cairo_move_to (cr, 160, 80);
cairo_curve_to (cr, 160, -30, 210, -30, 210, 80);
-
+
cairo_stroke (cr);
}
diff --git a/pixman/src/fbcompose.c b/pixman/src/fbcompose.c
index e316c6d..f8aa3a3 100644
--- a/pixman/src/fbcompose.c
+++ b/pixman/src/fbcompose.c
@@ -3548,10 +3548,10 @@ static void fbFetchExternalAlpha(Picture
fbFetchTransformed(pict, x, y, width, buffer, mask, maskBits);
return;
}
-
+
if (width > SCANLINE_BUFFER_LENGTH)
alpha_buffer = (CARD32 *) malloc(width*sizeof(CARD32));
-
+
fbFetchTransformed(pict, x, y, width, buffer, mask, maskBits);
fbFetchTransformed(pict->alphaMap, x - pict->alphaOrigin.x,
y - pict->alphaOrigin.y, width, alpha_buffer,
@@ -3930,7 +3930,7 @@ pixman_compositeGeneral (pixman_operator
CARD32 _scanline_buffer[SCANLINE_BUFFER_LENGTH*3];
CARD32 *scanline_buffer = _scanline_buffer;
FbComposeData compose_data;
-
+
if (pSrc->pDrawable)
srcRepeat = pSrc->repeat == RepeatNormal && !pSrc->transform
&& (pSrc->pDrawable->width != 1 || pSrc->pDrawable->height != 1);
diff --git a/pixman/src/fbedge.c b/pixman/src/fbedge.c
index f1289b3..5846158 100644
--- a/pixman/src/fbedge.c
+++ b/pixman/src/fbedge.c
@@ -127,7 +127,7 @@ fbRasterizeEdges8 (FbBits *buf,
CARD8 *ap = (CARD8 *) line;
xFixed lx, rx;
int lxi, rxi;
-
+
/* clip X */
lx = l->x;
if (lx < 0)
@@ -135,7 +135,7 @@ fbRasterizeEdges8 (FbBits *buf,
rx = r->x;
if (xFixedToInt (rx) >= width)
rx = IntToxFixed (width);
-
+
/* Skip empty (or backwards) sections */
if (rx > lx)
{
diff --git a/pixman/src/fbedgeimp.h b/pixman/src/fbedgeimp.h
index aa9ca90..121c2d7 100644
--- a/pixman/src/fbedgeimp.h
+++ b/pixman/src/fbedgeimp.h
@@ -34,14 +34,14 @@ rasterizeEdges (FbBits *buf,
{
xFixed y = t;
FbBits *line;
-
+
line = buf + xFixedToInt (y) * stride;
-
+
for (;;)
{
xFixed lx, rx;
int lxi, rxi;
-
+
/* clip X */
lx = l->x;
if (lx < 0)
@@ -49,7 +49,7 @@ rasterizeEdges (FbBits *buf,
rx = r->x;
if (xFixedToInt (rx) >= width)
rx = IntToxFixed (width);
-
+
/* Skip empty (or backwards) sections */
if (rx > lx)
{
diff --git a/pixman/src/fbmmx.c b/pixman/src/fbmmx.c
index 2ba7d8b..1d3f759 100644
--- a/pixman/src/fbmmx.c
+++ b/pixman/src/fbmmx.c
@@ -144,12 +144,12 @@ static __inline__ __m64
pix_multiply (__m64 a, __m64 b)
{
__m64 res;
-
+
res = _mm_mullo_pi16 (a, b);
res = _mm_adds_pu16 (res, MC(4x0080));
res = _mm_adds_pu16 (res, _mm_srli_pi16 (res, 8));
res = _mm_srli_pi16 (res, 8);
-
+
return res;
}
@@ -185,7 +185,7 @@ static __inline__ __m64
expand_alpha (__m64 pixel)
{
__m64 t1, t2;
-
+
t1 = shift (pixel, -48);
t2 = shift (t1, 16);
t1 = _mm_or_si64 (t1, t2);
@@ -245,7 +245,7 @@ over_rev_non_pre (__m64 src, __m64 dest)
{
__m64 srca = expand_alpha (src);
__m64 srcfaaa = _mm_or_si64 (srca, MC(full_alpha));
-
+
return over(pix_multiply(invert_colors(src), srcfaaa), srca, dest);
}
@@ -302,17 +302,17 @@ expand565 (__m64 pixel, int pos)
{
__m64 p = pixel;
__m64 t1, t2;
-
+
/* move pixel to low 16 bit and zero the rest */
p = shift (shift (p, (3 - pos) * 16), -48);
-
+
t1 = shift (p, 36 - 11);
t2 = shift (p, 16 - 5);
-
+
p = _mm_or_si64 (t1, p);
p = _mm_or_si64 (t2, p);
p = _mm_and_si64 (p, MC(565_rgb));
-
+
pixel = _mm_mullo_pi16 (p, MC(565_unpack_multiplier));
return _mm_srli_pi16 (pixel, 8);
}
@@ -332,15 +332,15 @@ pack565 (__m64 pixel, __m64 target, int
__m64 p = pixel;
__m64 t = target;
__m64 r, g, b;
-
+
r = _mm_and_si64 (p, MC(565_r));
g = _mm_and_si64 (p, MC(565_g));
b = _mm_and_si64 (p, MC(565_b));
-
+
r = shift (r, - (32 - 8) + pos * 16);
g = shift (g, - (16 - 3) + pos * 16);
b = shift (b, - (0 + 3) + pos * 16);
-
+
if (pos == 0)
t = _mm_and_si64 (t, MC(mask_0));
else if (pos == 1)
@@ -349,10 +349,10 @@ pack565 (__m64 pixel, __m64 target, int
t = _mm_and_si64 (t, MC(mask_2));
else if (pos == 3)
t = _mm_and_si64 (t, MC(mask_3));
-
+
p = _mm_or_si64 (r, t);
p = _mm_or_si64 (g, p);
-
+
return _mm_or_si64 (b, p);
}
@@ -636,9 +636,9 @@ mmxCombineOverC (CARD32 *dest, CARD32 *s
__m64 s = load8888(*src);
__m64 d = load8888(*dest);
__m64 sa = expand_alpha(s);
-
+
*dest = store8888(in_over (s, sa, a, d));
-
+
++src;
++dest;
++mask;
@@ -657,7 +657,7 @@ mmxCombineOverReverseC (CARD32 *dest, CA
__m64 da = expand_alpha(d);
*dest = store8888(over (d, da, in (s, a)));
-
+
++src;
++dest;
++mask;
@@ -885,62 +885,62 @@ fbCompositeSolid_nx8888mmx (pixman_opera
CARD16 w;
FbStride dstStride;
__m64 vsrc, vsrca;
-
+
CHECKPOINT();
-
+
fbComposeGetSolid(pSrc, pDst, src);
-
+
if (src >> 24 == 0)
return;
-
+
fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1);
-
+
vsrc = load8888 (src);
vsrca = expand_alpha (vsrc);
-
+
while (height--)
{
dst = dstLine;
dstLine += dstStride;
w = width;
-
+
CHECKPOINT();
-
+
while (w && (unsigned long)dst & 7)
{
*dst = store8888(over(vsrc, vsrca, load8888(*dst)));
-
+
w--;
dst++;
}
-
+
while (w >= 2)
{
__m64 vdest;
__m64 dest0, dest1;
-
+
vdest = *(__m64 *)dst;
-
+
dest0 = over(vsrc, vsrca, expand8888(vdest, 0));
dest1 = over(vsrc, vsrca, expand8888(vdest, 1));
-
+
*(__m64 *)dst = pack8888(dest0, dest1);
-
+
dst += 2;
w -= 2;
}
-
+
CHECKPOINT();
-
+
while (w)
{
*dst = store8888(over(vsrc, vsrca, load8888(*dst)));
-
+
w--;
dst++;
}
}
-
+
_mm_empty();
}
@@ -963,69 +963,69 @@ fbCompositeSolid_nx0565mmx (pixman_opera
CARD16 w;
FbStride dstStride;
__m64 vsrc, vsrca;
-
+
CHECKPOINT();
-
+
fbComposeGetSolid(pSrc, pDst, src);
-
+
if (src >> 24 == 0)
return;
-
+
fbComposeGetStart (pDst, xDst, yDst, CARD16, dstStride, dstLine, 1);
-
+
vsrc = load8888 (src);
vsrca = expand_alpha (vsrc);
-
+
while (height--)
{
dst = dstLine;
dstLine += dstStride;
w = width;
-
+
CHECKPOINT();
-
+
while (w && (unsigned long)dst & 7)
{
ullong d = *dst;
__m64 vdest = expand565 ((__m64)d, 0);
vdest = pack565(over(vsrc, vsrca, vdest), vdest, 0);
*dst = (ullong)vdest;
-
+
w--;
dst++;
}
-
+
while (w >= 4)
{
__m64 vdest;
-
+
vdest = *(__m64 *)dst;
-
+
vdest = pack565 (over(vsrc, vsrca, expand565(vdest, 0)), vdest, 0);
vdest = pack565 (over(vsrc, vsrca, expand565(vdest, 1)), vdest, 1);
vdest = pack565 (over(vsrc, vsrca, expand565(vdest, 2)), vdest, 2);
vdest = pack565 (over(vsrc, vsrca, expand565(vdest, 3)), vdest, 3);
-
+
*(__m64 *)dst = vdest;
-
+
dst += 4;
w -= 4;
}
-
+
CHECKPOINT();
-
+
while (w)
{
ullong d = *dst;
__m64 vdest = expand565 ((__m64)d, 0);
vdest = pack565(over(vsrc, vsrca, vdest), vdest, 0);
*dst = (ullong)vdest;
-
+
w--;
dst++;
}
}
-
+
_mm_empty();
}
@@ -1048,87 +1048,87 @@ fbCompositeSolidMask_nx8888x8888Cmmx (pi
CARD32 *maskLine;
FbStride dstStride, maskStride;
__m64 vsrc, vsrca;
-
+
CHECKPOINT();
-
+
fbComposeGetSolid(pSrc, pDst, src);
-
+
srca = src >> 24;
if (srca == 0)
return;
-
+
fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1);
fbComposeGetStart (pMask, xMask, yMask, CARD32, maskStride, maskLine, 1);
-
+
vsrc = load8888(src);
vsrca = expand_alpha(vsrc);
-
+
while (height--)
{
int twidth = width;
CARD32 *p = (CARD32 *)maskLine;
CARD32 *q = (CARD32 *)dstLine;
-
+
while (twidth && (unsigned long)q & 7)
{
CARD32 m = *(CARD32 *)p;
-
+
if (m)
{
__m64 vdest = load8888(*q);
vdest = in_over(vsrc, vsrca, load8888(m), vdest);
*q = store8888(vdest);
}
-
+
twidth--;
p++;
q++;
}
-
+
while (twidth >= 2)
{
CARD32 m0, m1;
m0 = *p;
m1 = *(p + 1);
-
+
if (m0 | m1)
{
__m64 dest0, dest1;
__m64 vdest = *(__m64 *)q;
-
+
dest0 = in_over(vsrc, vsrca, load8888(m0),
expand8888 (vdest, 0));
dest1 = in_over(vsrc, vsrca, load8888(m1),
expand8888 (vdest, 1));
-
+
*(__m64 *)q = pack8888(dest0, dest1);
}
-
+
p += 2;
q += 2;
twidth -= 2;
}
-
+
while (twidth)
{
CARD32 m = *(CARD32 *)p;
-
+
if (m)
{
__m64 vdest = load8888(*q);
vdest = in_over(vsrc, vsrca, load8888(m), vdest);
*q = store8888(vdest);
}
-
+
twidth--;
p++;
q++;
}
-
+
dstLine += dstStride;
maskLine += maskStride;
}
-
+
_mm_empty();
}
@@ -1154,9 +1154,9 @@ fbCompositeSrc_8888x8x8888mmx (pixman_op
FbStride dstStride, srcStride, maskStride;
CARD16 w;
__m64 srca;
-
+
CHECKPOINT();
-
+
fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1);
fbComposeGetStart (pSrc, xSrc, ySrc, CARD32, srcStride, srcLine, 1);
fbComposeGetStart (pMask, xMask, yMask, CARD8, maskStride, maskLine, 1);
@@ -1164,7 +1164,7 @@ fbCompositeSrc_8888x8x8888mmx (pixman_op
mask = *maskLine << 24 | *maskLine << 16 | *maskLine << 8 | *maskLine;
vmask = load8888 (mask);
srca = MC(4x00ff);
-
+
while (height--)
{
dst = dstLine;
@@ -1177,9 +1177,9 @@ fbCompositeSrc_8888x8x8888mmx (pixman_op
{
__m64 s = load8888 (*src);
__m64 d = load8888 (*dst);
-
+
*dst = store8888 (over (s, expand_alpha (s), d));
-
+
w--;
dst++;
src++;
@@ -1195,19 +1195,19 @@ fbCompositeSrc_8888x8x8888mmx (pixman_op
*(__m64 *)dst = (__m64)pack8888 (
in_over (vsrc0, expand_alpha (vsrc0), vmask, expand8888 (vd, 0)),
in_over (vsrc1, expand_alpha (vsrc1), vmask, expand8888 (vd, 1)));
-
+
w -= 2;
dst += 2;
src += 2;
}
-
+
while (w)
{
__m64 s = load8888 (*src);
__m64 d = load8888 (*dst);
-
+
*dst = store8888 (in_over (s, expand_alpha (s), vmask, d));
-
+
w--;
dst++;
src++;
@@ -1239,9 +1239,9 @@ fbCompositeSrc_x888x8x8888mmx (pixman_op
FbStride dstStride, srcStride, maskStride;
CARD16 w;
__m64 srca;
-
+
CHECKPOINT();
-
+
fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1);
fbComposeGetStart (pSrc, xSrc, ySrc, CARD32, srcStride, srcLine, 1);
fbComposeGetStart (pMask, xMask, yMask, CARD8, maskStride, maskLine, 1);
@@ -1249,7 +1249,7 @@ fbCompositeSrc_x888x8x8888mmx (pixman_op
mask = *maskLine << 24 | *maskLine << 16 | *maskLine << 8 | *maskLine;
vmask = load8888 (mask);
srca = MC(4x00ff);
-
+
while (height--)
{
dst = dstLine;
@@ -1262,9 +1262,9 @@ fbCompositeSrc_x888x8x8888mmx (pixman_op
{
__m64 s = load8888 (*src);
__m64 d = load8888 (*dst);
-
+
*dst = store8888 (in_over (s, srca, vmask, d));
-
+
w--;
dst++;
src++;
@@ -1293,35 +1293,35 @@ fbCompositeSrc_x888x8x8888mmx (pixman_op
vd0 = (__m64)pack8888 (
in_over (expand8888 (vs0, 0), srca, vmask, expand8888 (vd0, 0)),
in_over (expand8888 (vs0, 1), srca, vmask, expand8888 (vd0, 1)));
-
+
vd1 = (__m64)pack8888 (
in_over (expand8888 (vs1, 0), srca, vmask, expand8888 (vd1, 0)),
in_over (expand8888 (vs1, 1), srca, vmask, expand8888 (vd1, 1)));
-
+
vd2 = (__m64)pack8888 (
in_over (expand8888 (vs2, 0), srca, vmask, expand8888 (vd2, 0)),
in_over (expand8888 (vs2, 1), srca, vmask, expand8888 (vd2, 1)));
-
+
vd3 = (__m64)pack8888 (
in_over (expand8888 (vs3, 0), srca, vmask, expand8888 (vd3, 0)),
in_over (expand8888 (vs3, 1), srca, vmask, expand8888 (vd3, 1)));
-
+
vd4 = (__m64)pack8888 (
in_over (expand8888 (vs4, 0), srca, vmask, expand8888 (vd4, 0)),
in_over (expand8888 (vs4, 1), srca, vmask, expand8888 (vd4, 1)));
-
+
vd5 = (__m64)pack8888 (
in_over (expand8888 (vs5, 0), srca, vmask, expand8888 (vd5, 0)),
in_over (expand8888 (vs5, 1), srca, vmask, expand8888 (vd5, 1)));
-
+
vd6 = (__m64)pack8888 (
in_over (expand8888 (vs6, 0), srca, vmask, expand8888 (vd6, 0)),
in_over (expand8888 (vs6, 1), srca, vmask, expand8888 (vd6, 1)));
-
+
vd7 = (__m64)pack8888 (
in_over (expand8888 (vs7, 0), srca, vmask, expand8888 (vd7, 0)),
in_over (expand8888 (vs7, 1), srca, vmask, expand8888 (vd7, 1)));
-
+
*(__m64 *)(dst + 0) = vd0;
*(__m64 *)(dst + 2) = vd1;
*(__m64 *)(dst + 4) = vd2;
@@ -1335,14 +1335,14 @@ fbCompositeSrc_x888x8x8888mmx (pixman_op
dst += 16;
src += 16;
}
-
+
while (w)
{
__m64 s = load8888 (*src);
__m64 d = load8888 (*dst);
-
+
*dst = store8888 (in_over (s, srca, vmask, d));
-
+
w--;
dst++;
src++;
@@ -1423,23 +1423,23 @@ fbCompositeSolidMask_nx8x8888mmx (pixman
CARD16 w;
__m64 vsrc, vsrca;
ullong srcsrc;
-
+
CHECKPOINT();
-
+
fbComposeGetSolid(pSrc, pDst, src);
-
+
srca = src >> 24;
if (srca == 0)
return;
-
+
srcsrc = (unsigned long long)src << 32 | src;
-
+
fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1);
fbComposeGetStart (pMask, xMask, yMask, CARD8, maskStride, maskLine, 1);
-
+
vsrc = load8888 (src);
vsrca = expand_alpha (vsrc);
-
+
while (height--)
{
dst = dstLine;
@@ -1447,32 +1447,32 @@ fbCompositeSolidMask_nx8x8888mmx (pixman
mask = maskLine;
maskLine += maskStride;
w = width;
-
+
CHECKPOINT();
-
+
while (w && (unsigned long)dst & 7)
{
ullong m = *mask;
-
+
if (m)
{
__m64 vdest = in_over(vsrc, vsrca, expand_alpha_rev ((__m64)m), load8888(*dst));
*dst = store8888(vdest);
}
-
+
w--;
mask++;
dst++;
}
-
+
CHECKPOINT();
-
+
while (w >= 2)
{
ullong m0, m1;
m0 = *mask;
m1 = *(mask + 1);
-
+
if (srca == 0xff && (m0 & m1) == 0xff)
{
*(unsigned long long *)dst = srcsrc;
@@ -1481,39 +1481,39 @@ fbCompositeSolidMask_nx8x8888mmx (pixman
{
__m64 vdest;
__m64 dest0, dest1;
-
+
vdest = *(__m64 *)dst;
-
+
dest0 = in_over(vsrc, vsrca, expand_alpha_rev ((__m64)m0), expand8888(vdest, 0));
dest1 = in_over(vsrc, vsrca, expand_alpha_rev ((__m64)m1), expand8888(vdest, 1));
-
+
*(__m64 *)dst = pack8888(dest0, dest1);
}
-
+
mask += 2;
dst += 2;
w -= 2;
}
-
+
CHECKPOINT();
-
+
while (w)
{
ullong m = *mask;
-
+
if (m)
{
__m64 vdest = load8888(*dst);
vdest = in_over(vsrc, vsrca, expand_alpha_rev ((__m64)m), vdest);
*dst = store8888(vdest);
}
-
+
w--;
mask++;
dst++;
}
}
-
+
_mm_empty();
}
@@ -1538,26 +1538,26 @@ fbCompositeSolidMaskSrc_nx8x8888mmx (pix
CARD16 w;
__m64 vsrc, vsrca;
ullong srcsrc;
-
+
CHECKPOINT();
-
+
fbComposeGetSolid(pSrc, pDst, src);
-
+
srca = src >> 24;
if (srca == 0)
{
if (fbSolidFillmmx (pDst->pDrawable, xDst, yDst, width, height, 0))
return;
}
-
+
srcsrc = (unsigned long long)src << 32 | src;
-
+
fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1);
fbComposeGetStart (pMask, xMask, yMask, CARD8, maskStride, maskLine, 1);
-
+
vsrc = load8888 (src);
vsrca = expand_alpha (vsrc);
-
+
while (height--)
{
dst = dstLine;
@@ -1565,13 +1565,13 @@ fbCompositeSolidMaskSrc_nx8x8888mmx (pix
mask = maskLine;
maskLine += maskStride;
w = width;
-
+
CHECKPOINT();
-
+
while (w && (unsigned long)dst & 7)
{
ullong m = *mask;
-
+
if (m)
{
__m64 vdest = in(vsrc, expand_alpha_rev ((__m64)m));
@@ -1581,20 +1581,20 @@ fbCompositeSolidMaskSrc_nx8x8888mmx (pix
{
*dst = 0;
}
-
+
w--;
mask++;
dst++;
}
-
+
CHECKPOINT();
-
+
while (w >= 2)
{
ullong m0, m1;
m0 = *mask;
m1 = *(mask + 1);
-
+
if (srca == 0xff && (m0 & m1) == 0xff)
{
*(unsigned long long *)dst = srcsrc;
@@ -1603,30 +1603,30 @@ fbCompositeSolidMaskSrc_nx8x8888mmx (pix
{
__m64 vdest;
__m64 dest0, dest1;
-
+
vdest = *(__m64 *)dst;
-
+
dest0 = in(vsrc, expand_alpha_rev ((__m64)m0));
dest1 = in(vsrc, expand_alpha_rev ((__m64)m1));
-
+
*(__m64 *)dst = pack8888(dest0, dest1);
}
else
{
*dst = 0;
}
-
+
mask += 2;
dst += 2;
w -= 2;
}
-
+
CHECKPOINT();
-
+
while (w)
{
ullong m = *mask;
-
+
if (m)
{
__m64 vdest = load8888(*dst);
@@ -1637,13 +1637,13 @@ fbCompositeSolidMaskSrc_nx8x8888mmx (pix
{
*dst = 0;
}
-
+
w--;
mask++;
dst++;
}
}
-
+
_mm_empty();
}
@@ -1669,26 +1669,26 @@ fbCompositeSolidMask_nx8x0565mmx (pixman
CARD16 w;
__m64 vsrc, vsrca;
unsigned long long srcsrcsrcsrc, src16;
-
+
CHECKPOINT();
-
+
fbComposeGetSolid(pSrc, pDst, src);
-
+
srca = src >> 24;
if (srca == 0)
return;
-
+
fbComposeGetStart (pDst, xDst, yDst, CARD16, dstStride, dstLine, 1);
fbComposeGetStart (pMask, xMask, yMask, CARD8, maskStride, maskLine, 1);
-
+
vsrc = load8888 (src);
vsrca = expand_alpha (vsrc);
-
+
src16 = (ullong)pack565(vsrc, _mm_setzero_si64(), 0);
-
+
srcsrcsrcsrc = (ullong)src16 << 48 | (ullong)src16 << 32 |
(ullong)src16 << 16 | (ullong)src16;
-
+
while (height--)
{
dst = dstLine;
@@ -1696,13 +1696,13 @@ fbCompositeSolidMask_nx8x0565mmx (pixman
mask = maskLine;
maskLine += maskStride;
w = width;
-
+
CHECKPOINT();
-
+
while (w && (unsigned long)dst & 7)
{
ullong m = *mask;
-
+
if (m)
{
ullong d = *dst;
@@ -1710,14 +1710,14 @@ fbCompositeSolidMask_nx8x0565mmx (pixman
__m64 vdest = in_over(vsrc, vsrca, expand_alpha_rev ((__m64)m), expand565(vd, 0));
*dst = (ullong)pack565(vdest, _mm_setzero_si64(), 0);
}
-
+
w--;
mask++;
dst++;
}
-
+
CHECKPOINT();
-
+
while (w >= 4)
{
ullong m0, m1, m2, m3;
@@ -1725,7 +1725,7 @@ fbCompositeSolidMask_nx8x0565mmx (pixman
m1 = *(mask + 1);
m2 = *(mask + 2);
m3 = *(mask + 3);
-
+
if (srca == 0xff && (m0 & m1 & m2 & m3) == 0xff)
{
*(unsigned long long *)dst = srcsrcsrcsrc;
@@ -1734,9 +1734,9 @@ fbCompositeSolidMask_nx8x0565mmx (pixman
{
__m64 vdest;
__m64 vm0, vm1, vm2, vm3;
-
+
vdest = *(__m64 *)dst;
-
+
vm0 = (__m64)m0;
vdest = pack565(in_over(vsrc, vsrca, expand_alpha_rev(vm0), expand565(vdest, 0)), vdest, 0);
vm1 = (__m64)m1;
@@ -1745,21 +1745,21 @@ fbCompositeSolidMask_nx8x0565mmx (pixman
vdest = pack565(in_over(vsrc, vsrca, expand_alpha_rev(vm2), expand565(vdest, 2)), vdest, 2);
vm3 = (__m64)m3;
vdest = pack565(in_over(vsrc, vsrca, expand_alpha_rev(vm3), expand565(vdest, 3)), vdest, 3);
-
+
*(__m64 *)dst = vdest;
}
-
+
w -= 4;
mask += 4;
dst += 4;
}
-
+
CHECKPOINT();
-
+
while (w)
{
ullong m = *mask;
-
+
if (m)
{
ullong d = *dst;
@@ -1767,13 +1767,13 @@ fbCompositeSolidMask_nx8x0565mmx (pixman
__m64 vdest = in_over(vsrc, vsrca, expand_alpha_rev ((__m64)m), expand565(vd, 0));
*dst = (ullong)pack565(vdest, _mm_setzero_si64(), 0);
}
-
+
w--;
mask++;
dst++;
}
}
-
+
_mm_empty();
}
@@ -1795,14 +1795,14 @@ fbCompositeSrc_8888RevNPx0565mmx (pixman
CARD32 *srcLine, *src;
FbStride dstStride, srcStride;
CARD16 w;
-
+
CHECKPOINT();
-
+
fbComposeGetStart (pDst, xDst, yDst, CARD16, dstStride, dstLine, 1);
fbComposeGetStart (pSrc, xSrc, ySrc, CARD32, srcStride, srcLine, 1);
-
+
assert (pSrc->pDrawable == pMask->pDrawable);
-
+
while (height--)
{
dst = dstLine;
@@ -1810,41 +1810,41 @@ fbCompositeSrc_8888RevNPx0565mmx (pixman
src = srcLine;
srcLine += srcStride;
w = width;
-
+
CHECKPOINT();
-
+
while (w && (unsigned long)dst & 7)
{
__m64 vsrc = load8888 (*src);
ullong d = *dst;
__m64 vdest = expand565 ((__m64)d, 0);
-
+
vdest = pack565(over_rev_non_pre(vsrc, vdest), vdest, 0);
-
+
*dst = (ullong)vdest;
-
+
w--;
dst++;
src++;
}
-
+
CHECKPOINT();
-
+
while (w >= 4)
{
CARD32 s0, s1, s2, s3;
unsigned char a0, a1, a2, a3;
-
+
s0 = *src;
s1 = *(src + 1);
s2 = *(src + 2);
s3 = *(src + 3);
-
+
a0 = (s0 >> 24);
a1 = (s1 >> 24);
a2 = (s2 >> 24);
a3 = (s3 >> 24);
-
+
if ((a0 & a1 & a2 & a3) == 0xFF)
{
__m64 vdest;
@@ -1852,44 +1852,44 @@ fbCompositeSrc_8888RevNPx0565mmx (pixman
vdest = pack565(invert_colors(load8888(s1)), vdest, 1);
vdest = pack565(invert_colors(load8888(s2)), vdest, 2);
vdest = pack565(invert_colors(load8888(s3)), vdest, 3);
-
+
*(__m64 *)dst = vdest;
}
else if (a0 | a1 | a2 | a3)
{
__m64 vdest = *(__m64 *)dst;
-
+
vdest = pack565(over_rev_non_pre(load8888(s0), expand565(vdest, 0)), vdest, 0);
vdest = pack565(over_rev_non_pre(load8888(s1), expand565(vdest, 1)), vdest, 1);
vdest = pack565(over_rev_non_pre(load8888(s2), expand565(vdest, 2)), vdest, 2);
vdest = pack565(over_rev_non_pre(load8888(s3), expand565(vdest, 3)), vdest, 3);
-
+
*(__m64 *)dst = vdest;
}
-
+
w -= 4;
dst += 4;
src += 4;
}
-
+
CHECKPOINT();
-
+
while (w)
{
__m64 vsrc = load8888 (*src);
ullong d = *dst;
__m64 vdest = expand565 ((__m64)d, 0);
-
+
vdest = pack565(over_rev_non_pre(vsrc, vdest), vdest, 0);
-
+
*dst = (ullong)vdest;
-
+
w--;
dst++;
src++;
}
}
-
+
_mm_empty();
}
@@ -1913,14 +1913,14 @@ fbCompositeSrc_8888RevNPx8888mmx (pixman
CARD32 *srcLine, *src;
FbStride dstStride, srcStride;
CARD16 w;
-
+
CHECKPOINT();
-
+
fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1);
fbComposeGetStart (pSrc, xSrc, ySrc, CARD32, srcStride, srcLine, 1);
-
+
assert (pSrc->pDrawable == pMask->pDrawable);
-
+
while (height--)
{
dst = dstLine;
@@ -1928,66 +1928,66 @@ fbCompositeSrc_8888RevNPx8888mmx (pixman
src = srcLine;
srcLine += srcStride;
w = width;
-
+
while (w && (unsigned long)dst & 7)
{
__m64 s = load8888 (*src);
__m64 d = load8888 (*dst);
-
+
*dst = store8888 (over_rev_non_pre (s, d));
-
+
w--;
dst++;
src++;
}
-
+
while (w >= 2)
{
ullong s0, s1;
unsigned char a0, a1;
__m64 d0, d1;
-
+
s0 = *src;
s1 = *(src + 1);
-
+
a0 = (s0 >> 24);
a1 = (s1 >> 24);
-
+
if ((a0 & a1) == 0xFF)
{
d0 = invert_colors(load8888(s0));
d1 = invert_colors(load8888(s1));
-
+
*(__m64 *)dst = pack8888 (d0, d1);
}
else if (a0 | a1)
{
__m64 vdest = *(__m64 *)dst;
-
+
d0 = over_rev_non_pre (load8888(s0), expand8888 (vdest, 0));
d1 = over_rev_non_pre (load8888(s1), expand8888 (vdest, 1));
-
+
*(__m64 *)dst = pack8888 (d0, d1);
}
-
+
w -= 2;
dst += 2;
src += 2;
}
-
+
while (w)
{
__m64 s = load8888 (*src);
__m64 d = load8888 (*dst);
-
+
*dst = store8888 (over_rev_non_pre (s, d));
-
+
w--;
dst++;
src++;
}
}
-
+
_mm_empty();
}
@@ -2010,31 +2010,31 @@ fbCompositeSolidMask_nx8888x0565Cmmx (pi
CARD32 *maskLine;
FbStride dstStride, maskStride;
__m64 vsrc, vsrca;
-
+
CHECKPOINT();
-
+
fbComposeGetSolid(pSrc, pDst, src);
-
+
srca = src >> 24;
if (srca == 0)
return;
-
+
fbComposeGetStart (pDst, xDst, yDst, CARD16, dstStride, dstLine, 1);
fbComposeGetStart (pMask, xMask, yMask, CARD32, maskStride, maskLine, 1);
-
+
vsrc = load8888 (src);
vsrca = expand_alpha (vsrc);
-
+
while (height--)
{
int twidth = width;
CARD32 *p = (CARD32 *)maskLine;
CARD16 *q = (CARD16 *)dstLine;
-
+
while (twidth && ((unsigned long)q & 7))
{
CARD32 m = *(CARD32 *)p;
-
+
if (m)
{
ullong d = *q;
@@ -2042,41 +2042,41 @@ fbCompositeSolidMask_nx8888x0565Cmmx (pi
vdest = pack565 (in_over (vsrc, vsrca, load8888 (m), vdest), vdest, 0);
*q = (ullong)vdest;
}
-
+
twidth--;
p++;
q++;
}
-
+
while (twidth >= 4)
{
CARD32 m0, m1, m2, m3;
-
+
m0 = *p;
m1 = *(p + 1);
m2 = *(p + 2);
m3 = *(p + 3);
-
+
if ((m0 | m1 | m2 | m3))
{
__m64 vdest = *(__m64 *)q;
-
+
vdest = pack565(in_over(vsrc, vsrca, load8888(m0), expand565(vdest, 0)), vdest, 0);
vdest = pack565(in_over(vsrc, vsrca, load8888(m1), expand565(vdest, 1)), vdest, 1);
vdest = pack565(in_over(vsrc, vsrca, load8888(m2), expand565(vdest, 2)), vdest, 2);
vdest = pack565(in_over(vsrc, vsrca, load8888(m3), expand565(vdest, 3)), vdest, 3);
-
+
*(__m64 *)q = vdest;
}
twidth -= 4;
p += 4;
q += 4;
}
-
+
while (twidth)
{
CARD32 m;
-
+
m = *(CARD32 *)p;
if (m)
{
@@ -2085,16 +2085,16 @@ fbCompositeSolidMask_nx8888x0565Cmmx (pi
vdest = pack565 (in_over(vsrc, vsrca, load8888(m), vdest), vdest, 0);
*q = (ullong)vdest;
}
-
+
twidth--;
p++;
q++;
}
-
+
maskLine += maskStride;
dstLine += dstStride;
}
-
+
_mm_empty ();
}
@@ -2118,12 +2118,12 @@ fbCompositeSrcAdd_8000x8000mmx (pixman_o
CARD16 w;
CARD8 s, d;
CARD16 t;
-
+
CHECKPOINT();
-
+
fbComposeGetStart (pSrc, xSrc, ySrc, CARD8, srcStride, srcLine, 1);
fbComposeGetStart (pDst, xDst, yDst, CARD8, dstStride, dstLine, 1);
-
+
while (height--)
{
dst = dstLine;
@@ -2131,7 +2131,7 @@ fbCompositeSrcAdd_8000x8000mmx (pixman_o
src = srcLine;
srcLine += srcStride;
w = width;
-
+
while (w && (unsigned long)dst & 7)
{
s = *src;
@@ -2139,12 +2139,12 @@ fbCompositeSrcAdd_8000x8000mmx (pixman_o
t = d + s;
s = t | (0 - (t >> 8));
*dst = s;
-
+
dst++;
src++;
w--;
}
-
+
while (w >= 8)
{
*(__m64*)dst = _mm_adds_pu8(*(__m64*)src, *(__m64*)dst);
@@ -2152,7 +2152,7 @@ fbCompositeSrcAdd_8000x8000mmx (pixman_o
src += 8;
w -= 8;
}
-
+
while (w)
{
s = *src;
@@ -2160,13 +2160,13 @@ fbCompositeSrcAdd_8000x8000mmx (pixman_o
t = d + s;
s = t | (0 - (t >> 8));
*dst = s;
-
+
dst++;
src++;
w--;
}
}
-
+
_mm_empty();
}
@@ -2188,12 +2188,12 @@ fbCompositeSrcAdd_8888x8888mmx (pixman_o
CARD32 *srcLine, *src;
FbStride dstStride, srcStride;
CARD16 w;
-
+
CHECKPOINT();
-
+
fbComposeGetStart (pSrc, xSrc, ySrc, CARD32, srcStride, srcLine, 1);
fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1);
-
+
while (height--)
{
dst = dstLine;
@@ -2201,7 +2201,7 @@ fbCompositeSrcAdd_8888x8888mmx (pixman_o
src = srcLine;
srcLine += srcStride;
w = width;
-
+
while (w && (unsigned long)dst & 7)
{
*dst = _mm_cvtsi64_si32(_mm_adds_pu8(_mm_cvtsi32_si64(*src),
@@ -2210,7 +2210,7 @@ fbCompositeSrcAdd_8888x8888mmx (pixman_o
src++;
w--;
}
-
+
while (w >= 2)
{
*(ullong*)dst = (ullong) _mm_adds_pu8(*(__m64*)src, *(__m64*)dst);
@@ -2218,15 +2218,15 @@ fbCompositeSrcAdd_8888x8888mmx (pixman_o
src += 2;
w -= 2;
}
-
+
if (w)
{
*dst = _mm_cvtsi64_si32(_mm_adds_pu8(_mm_cvtsi32_si64(*src),
_mm_cvtsi32_si64(*dst)));
-
+
}
}
-
+
_mm_empty();
}
@@ -2246,17 +2246,17 @@ fbSolidFillmmx (FbPixels *pDraw,
CARD8 *byte_line;
FbBits *bits;
int xoff, yoff;
-
+
CHECKPOINT();
-
+
fbGetDrawable(pDraw, bits, stride, bpp, xoff, yoff);
-
+
if (bpp == 16 && (xor >> 16 != (xor & 0xffff)))
return FALSE;
-
+
if (bpp != 16 && bpp != 32)
return FALSE;
-
+
if (bpp == 16)
{
stride = stride * sizeof (FbBits) / 2;
@@ -2271,32 +2271,32 @@ fbSolidFillmmx (FbPixels *pDraw,
byte_width = 4 * width;
stride *= 4;
}
-
+
fill = ((ullong)xor << 32) | xor;
vfill = (__m64)fill;
-
+
while (height--)
{
int w;
CARD8 *d = byte_line;
byte_line += stride;
w = byte_width;
-
+
while (w >= 2 && ((unsigned long)d & 3))
{
*(CARD16 *)d = xor;
w -= 2;
d += 2;
}
-
+
while (w >= 4 && ((unsigned long)d & 7))
{
*(CARD32 *)d = xor;
-
+
w -= 4;
d += 4;
}
-
+
while (w >= 64)
{
*(__m64*) (d + 0) = vfill;
@@ -2307,14 +2307,14 @@ fbSolidFillmmx (FbPixels *pDraw,
*(__m64*) (d + 40) = vfill;
*(__m64*) (d + 48) = vfill;
*(__m64*) (d + 56) = vfill;
-
+
w -= 64;
d += 64;
}
while (w >= 4)
{
*(CARD32 *)d = xor;
-
+
w -= 4;
d += 4;
}
@@ -2325,7 +2325,7 @@ fbSolidFillmmx (FbPixels *pDraw,
d += 2;
}
}
-
+
_mm_empty();
return TRUE;
}
@@ -2369,7 +2369,7 @@ fbCopyAreammx (FbPixels *pSrc,
{
return FALSE;
}
-
+
if (src_bpp == 16)
{
src_stride = src_stride * sizeof (FbBits) / 2;
@@ -2399,7 +2399,7 @@ fbCopyAreammx (FbPixels *pSrc,
src_bytes += src_stride;
dst_bytes += dst_stride;
w = byte_width;
-
+
while (w >= 2 && ((unsigned long)d & 3))
{
*(CARD16 *)d = *(CARD16 *)s;
@@ -2407,16 +2407,16 @@ fbCopyAreammx (FbPixels *pSrc,
s += 2;
d += 2;
}
-
+
while (w >= 4 && ((unsigned int)d & 7))
{
*(CARD32 *)d = *(CARD32 *)s;
-
+
w -= 4;
s += 4;
d += 4;
}
-
+
while (w >= 64)
{
*(__m64 *)(d + 0) = *(__m64 *)(s + 0);
@@ -2447,7 +2447,7 @@ fbCopyAreammx (FbPixels *pSrc,
d += 2;
}
}
-
+
_mm_empty();
return TRUE;
}
diff --git a/pixman/src/fbpict.c b/pixman/src/fbpict.c
index bdf6a4c..2cfbeb8 100644
--- a/pixman/src/fbpict.c
+++ b/pixman/src/fbpict.c
@@ -1362,7 +1362,7 @@ pixman_composite (pixman_operator_t op,
mmx_setup = TRUE;
}
#endif
-
+
xDst += pDst->pDrawable->x;
yDst += pDst->pDrawable->y;
if (pSrc->pDrawable) {
@@ -1821,7 +1821,7 @@ pixman_composite (pixman_operator_t op,
region = pixman_region_create();
pixman_region_union_rect (region, region, xDst, yDst, width, height);
-
+
if (!FbComputeCompositeRegion (region,
pSrc,
pMask,
@@ -1835,7 +1835,7 @@ pixman_composite (pixman_operator_t op,
width,
height))
return;
-
+
n = pixman_region_num_rects (region);
pbox = pixman_region_rects (region);
while (n--)
@@ -2009,7 +2009,7 @@ fbHaveMMX (void)
mmx_present = (features & (MMX|MMX_Extensions)) == (MMX|MMX_Extensions);
initialized = TRUE;
}
-
+
return mmx_present;
}
#endif /* USE_MMX && !amd64 */
diff --git a/pixman/src/fbpict.h b/pixman/src/fbpict.h
index fbf00ed..99977b7 100644
--- a/pixman/src/fbpict.h
+++ b/pixman/src/fbpict.h
@@ -144,7 +144,7 @@
((*((CARD16 *) (a)) = (CARD16) (v)),\
(*((a)+2) = (CARD8) ((v) >> 16))))
#endif
-
+
/*
The methods below use some tricks to be able to do two color
components at the same time.
diff --git a/pixman/src/fbtrap.c b/pixman/src/fbtrap.c
index e23b97d..2fbfbe4 100644
--- a/pixman/src/fbtrap.c
+++ b/pixman/src/fbtrap.c
@@ -46,14 +46,14 @@ fbAddTraps (PicturePtr pPicture,
xFixed y_off_fixed;
RenderEdge l, r;
xFixed t, b;
-
+
fbGetDrawable (pPicture->pDrawable, buf, stride, bpp, pxoff, pyoff);
width = pPicture->pDrawable->width;
height = pPicture->pDrawable->height;
x_off += pxoff;
y_off += pyoff;
-
+
x_off_fixed = IntToxFixed(y_off);
y_off_fixed = IntToxFixed(y_off);
@@ -63,12 +63,12 @@ fbAddTraps (PicturePtr pPicture,
if (t < 0)
t = 0;
t = RenderSampleCeilY (t, bpp);
-
+
b = traps->bot.y + y_off_fixed;
if (xFixedToInt (b) >= height)
b = IntToxFixed (height) - 1;
b = RenderSampleFloorY (b, bpp);
-
+
if (b >= t)
{
/* initialize edge walkers */
@@ -77,13 +77,13 @@ fbAddTraps (PicturePtr pPicture,
traps->top.y + y_off_fixed,
traps->bot.l + x_off_fixed,
traps->bot.y + y_off_fixed);
-
+
RenderEdgeInit (&r, bpp, t,
traps->top.r + x_off_fixed,
traps->top.y + y_off_fixed,
traps->bot.r + x_off_fixed,
traps->bot.y + y_off_fixed);
-
+
fbRasterizeEdges (buf, bpp, width, stride, &l, &r, t, b);
}
traps++;
@@ -108,14 +108,14 @@ fbRasterizeTrapezoid (PicturePtr pPic
xFixed y_off_fixed;
RenderEdge l, r;
xFixed t, b;
-
+
fbGetDrawable (pPicture->pDrawable, buf, stride, bpp, pxoff, pyoff);
width = pPicture->pDrawable->width;
height = pPicture->pDrawable->height;
x_off += pxoff;
y_off += pyoff;
-
+
x_off_fixed = IntToxFixed(x_off);
y_off_fixed = IntToxFixed(y_off);
t = trap->top + y_off_fixed;
@@ -127,13 +127,13 @@ fbRasterizeTrapezoid (PicturePtr pPic
if (xFixedToInt (b) >= height)
b = IntToxFixed (height) - 1;
b = RenderSampleFloorY (b, bpp);
-
+
if (b >= t)
{
/* initialize edge walkers */
RenderLineFixedEdgeInit (&l, bpp, t, &trap->left, x_off, y_off);
RenderLineFixedEdgeInit (&r, bpp, t, &trap->right, x_off, y_off);
-
+
fbRasterizeEdges (buf, bpp, width, stride, &l, &r, t, b);
}
}
@@ -190,7 +190,7 @@ fbAddTriangles (PicturePtr pPicture,
if (_Clockwise (top, right, left)) {
tmp = right; right = left; left = tmp;
}
-
+
/*
* Two cases:
*
@@ -203,7 +203,7 @@ fbAddTriangles (PicturePtr pPicture,
* / --- --- \
* +-- --+
*/
-
+
trap.top = top->y;
trap.left.p1 = *top;
trap.left.p2 = *left;
diff --git a/pixman/src/icblt.c b/pixman/src/icblt.c
index ee92ba5..cbd33c3 100644
--- a/pixman/src/icblt.c
+++ b/pixman/src/icblt.c
@@ -40,18 +40,18 @@ void
fbBlt (FbBits *srcLine,
FbStride srcStride,
int srcX,
-
+
FbBits *dstLine,
FbStride dstStride,
int dstX,
-
+
int width,
int height,
-
+
int alu,
FbBits pm,
int bpp,
-
+
Bool reverse,
Bool upsidedown)
{
@@ -63,7 +63,7 @@ fbBlt (FbBits *srcLine,
Bool destInvarient;
int startbyte, endbyte;
FbDeclareMergeRop ();
-
+
/* are we just copying multiples of 8 bits? if so, run, forrest, run!
the memcpy()'s should be pluggable ala mplayer|xine - perhaps we can get
one of the above to give up their code for us.
@@ -84,10 +84,10 @@ fbBlt (FbBits *srcLine,
else
for(j=(height-1);j>=0;j--)
memcpy(idst+j*dstride, isrc+j*sstride, width);
-
+
return;
}
-
+
#ifdef FB_24BIT
if (bpp == 24 && !FbCheck24Pix (pm))
{
@@ -231,7 +231,7 @@ fbBlt (FbBits *srcLine,
srcLine += srcStride;
dst = dstLine;
dstLine += dstStride;
-
+
bits1 = 0;
if (reverse)
{
@@ -360,7 +360,7 @@ fbBlt24Line (FbBits *src,
int alu,
FbBits pm,
-
+
Bool reverse)
{
#ifdef DEBUG_BLT24
@@ -369,17 +369,17 @@ fbBlt24Line (FbBits *src,
int origNlw = ((width + FB_MASK) >> FB_SHIFT) + 3;
int origX = dstX / 24;
#endif
-
+
int leftShift, rightShift;
FbBits startmask, endmask;
int n;
-
+
FbBits bits, bits1;
FbBits mask;
int rot;
FbDeclareMergeRop ();
-
+
FbInitializeMergeRop (alu, FB_ALLONES);
FbMaskBits(dstX, width, startmask, n, endmask);
#ifdef DEBUG_BLT24
@@ -472,7 +472,7 @@ fbBlt24Line (FbBits *src,
rightShift = dstX - srcX;
leftShift = FB_UNIT - rightShift;
}
-
+
bits1 = 0;
if (reverse)
{
@@ -631,7 +631,7 @@ fbBltOdd (FbBits *srcLine,
int leftShiftEven, rightShiftEven;
FbBits startmaskEven, endmaskEven;
int nmiddleEven;
-
+
FbBits *dst;
int leftShiftOdd, rightShiftOdd;
FbBits startmaskOdd, endmaskOdd;
@@ -640,12 +640,12 @@ fbBltOdd (FbBits *srcLine,
int leftShift, rightShift;
FbBits startmask, endmask;
int nmiddle;
-
+
int srcX, dstX;
-
+
FbBits bits, bits1;
int n;
-
+
Bool destInvarient;
Bool even;
FbDeclareMergeRop ();
@@ -662,7 +662,7 @@ fbBltOdd (FbBits *srcLine,
FbMaskBits(dstXEven, width, startmaskEven, nmiddleEven, endmaskEven);
FbMaskBits(dstXOdd, width, startmaskOdd, nmiddleOdd, endmaskOdd);
-
+
even = TRUE;
InitializeShifts(srcXEven, dstXEven, leftShiftEven, rightShiftEven);
InitializeShifts(srcXOdd, dstXOdd, leftShiftOdd, rightShiftOdd);
@@ -800,7 +800,7 @@ fbBltOdd24 (FbBits *srcLine,
FbBits pm)
{
Bool even = TRUE;
-
+
while (height--)
{
if (even)
@@ -864,7 +864,7 @@ fbSetBltOdd (FbStip *stip,
{
*strideEven = FbStipStrideToBitsStride (stipStride);
*strideOdd = FbStipStrideToBitsStride (stipStride + 1);
-
+
*srcXEven = srcX;
*srcXOdd = srcX + (strideAdjust << FB_STIP_SHIFT);
}
@@ -875,7 +875,7 @@ void
fbBltStip (FbStip *src,
FbStride srcStride, /* in FbStip units, not FbBits units */
int srcX,
-
+
FbStip *dst,
FbStride dstStride, /* in FbStip units, not FbBits units */
int dstX,
@@ -897,22 +897,22 @@ fbBltStip (FbStip *src,
int dstXEven, dstXOdd;
FbBits *s, *d;
int sx, dx;
-
+
src += srcX >> FB_STIP_SHIFT;
srcX &= FB_STIP_MASK;
dst += dstX >> FB_STIP_SHIFT;
dstX &= FB_STIP_MASK;
-
+
fbSetBltOdd (src, srcStride, srcX,
&s,
&srcStrideEven, &srcStrideOdd,
&srcXEven, &srcXOdd);
-
+
fbSetBltOdd (dst, dstStride, dstX,
&d,
&dstStrideEven, &dstStrideOdd,
&dstXEven, &dstXOdd);
-
+
#ifdef FB_24BIT
if (bpp == 24 && !FbCheck24Pix (pm))
{
@@ -929,10 +929,10 @@ fbBltStip (FbStip *src,
{
fbBltOdd (s, srcStrideEven, srcStrideOdd,
srcXEven, srcXOdd,
-
+
d, dstStrideEven, dstStrideOdd,
dstXEven, dstXOdd,
-
+
width, height, alu, pm, bpp);
}
}
diff --git a/pixman/src/icbltone.c b/pixman/src/icbltone.c
index 30e6477..9f0a391 100644
--- a/pixman/src/icbltone.c
+++ b/pixman/src/icbltone.c
@@ -54,9 +54,9 @@
} else \
bits = *src++; \
}
-
+
#ifndef FBNOPIXADDR
-
+
#define LaneCases1(n,a) case n: (void)FbLaneCase(n,a); break
#define LaneCases2(n,a) LaneCases1(n,a); LaneCases1(n+1,a)
#define LaneCases4(n,a) LaneCases2(n,a); LaneCases2(n+2,a)
@@ -66,15 +66,15 @@
#define LaneCases64(n,a) LaneCases32(n,a); LaneCases32(n+32,a)
#define LaneCases128(n,a) LaneCases64(n,a); LaneCases64(n+64,a)
#define LaneCases256(n,a) LaneCases128(n,a); LaneCases128(n+128,a)
-
+
#if FB_SHIFT == 6
#define LaneCases(a) LaneCases256(0,a)
#endif
-
+
#if FB_SHIFT == 5
#define LaneCases(a) LaneCases16(0,a)
#endif
-
+
#if FB_SHIFT == 6
static uint8_t const fb8Lane[256] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
@@ -182,7 +182,7 @@ fbBltOne (FbStip *src,
return;
}
#endif
-
+
/*
* Number of destination units in FbBits == number of stipple pixels
* used each time
@@ -193,7 +193,7 @@ fbBltOne (FbStip *src,
* Number of source stipple patterns in FbStip
*/
unitsPerSrc = FB_STIP_UNIT / pixelsPerDst;
-
+
copy = FALSE;
transparent = FALSE;
if (bgand == 0 && fgand == 0)
@@ -241,7 +241,7 @@ fbBltOne (FbStip *src,
if (transparent && fgand == 0 && dstBpp >= 8)
fbLane = fbLaneTable(dstBpp);
#endif
-
+
/*
* Compute total number of destination words written, but
* don't count endmask
@@ -249,15 +249,15 @@ fbBltOne (FbStip *src,
nDst = nmiddle;
if (startmask)
nDst++;
-
+
dstStride -= nDst;
/*
* Compute total number of source words consumed
*/
-
+
srcinc = (nDst + unitsPerSrc - 1) / unitsPerSrc;
-
+
if (srcX > dstS)
srcinc++;
if (endmask)
@@ -268,7 +268,7 @@ fbBltOne (FbStip *src,
}
srcStride -= srcinc;
-
+
/*
* Copy rectangle
*/
@@ -278,7 +278,7 @@ fbBltOne (FbStip *src,
n = unitsPerSrc; /* units avail in single stipple */
if (n > w)
n = w;
-
+
bitsLeft = 0;
if (srcX > dstS)
bitsLeft = *src++;
@@ -549,7 +549,7 @@ static const FbBits fbStipple24Bits[3][1
fbFirstStipBits(len,stip); \
stip = FbMergeStip24Bits (0, stip, len); \
}
-
+
#define fbNextStipBits(rot,stip) {\
int __new = FbStip24New(rot); \
FbStip __right; \
@@ -593,23 +593,23 @@ fbBltOne24 (FbStip *srcLine,
int firstlen;
int rot0, rot;
int nDst;
-
+
srcLine += srcX >> FB_STIP_SHIFT;
dst += dstX >> FB_SHIFT;
srcX &= FB_STIP_MASK;
dstX &= FB_MASK;
rot0 = FbFirst24Rot (dstX);
-
+
FbMaskBits (dstX, width, leftMask, nlMiddle, rightMask);
-
+
dstS = (dstX + 23) / 24;
firstlen = FbStip24Len - dstS;
-
+
nDst = nlMiddle;
if (leftMask)
nDst++;
dstStride -= nDst;
-
+
/* opaque copy */
if (bgand == 0 && fgand == 0)
{
diff --git a/pixman/src/icformat.c b/pixman/src/icformat.c
index 37d9bc5..7837aea 100644
--- a/pixman/src/icformat.c
+++ b/pixman/src/icformat.c
@@ -94,7 +94,7 @@ void
pixman_format_init (pixman_format_t *format, int format_code)
{
memset (format, 0, sizeof (pixman_format_t));
-
+
/* XXX: What do we want to lodge in here?
format->id = FakeClientID (0);
*/
@@ -102,45 +102,45 @@ pixman_format_init (pixman_format_t *for
switch (PICT_FORMAT_TYPE(format_code)) {
case PICT_TYPE_ARGB:
-
+
format->alphaMask = Mask(PICT_FORMAT_A(format_code));
if (format->alphaMask)
format->alpha = (PICT_FORMAT_R(format_code) +
PICT_FORMAT_G(format_code) +
PICT_FORMAT_B(format_code));
-
+
format->redMask = Mask(PICT_FORMAT_R(format_code));
format->red = (PICT_FORMAT_G(format_code) +
PICT_FORMAT_B(format_code));
-
+
format->greenMask = Mask(PICT_FORMAT_G(format_code));
format->green = PICT_FORMAT_B(format_code);
-
+
format->blueMask = Mask(PICT_FORMAT_B(format_code));
format->blue = 0;
break;
-
+
case PICT_TYPE_ABGR:
-
+
format->alphaMask = Mask(PICT_FORMAT_A(format_code));
if (format->alphaMask)
format->alpha = (PICT_FORMAT_B(format_code) +
PICT_FORMAT_G(format_code) +
PICT_FORMAT_R(format_code));
-
+
format->blueMask = Mask(PICT_FORMAT_B(format_code));
format->blue = (PICT_FORMAT_G(format_code) +
PICT_FORMAT_R(format_code));
-
+
format->greenMask = Mask(PICT_FORMAT_G(format_code));
format->green = PICT_FORMAT_R(format_code);
-
+
format->redMask = Mask(PICT_FORMAT_R(format_code));
format->red = 0;
break;
-
+
case PICT_TYPE_A:
-
+
format->alpha = 0;
format->alphaMask = Mask(PICT_FORMAT_A(format_code));
diff --git a/pixman/src/icimage.c b/pixman/src/icimage.c
index c166cfb..f4fd516 100644
--- a/pixman/src/icimage.c
+++ b/pixman/src/icimage.c
@@ -34,7 +34,7 @@ pixman_image_create (pixman_format_t *fo
pixels = FbPixelsCreate (width, height, format->depth);
if (pixels == NULL)
return NULL;
-
+
image = pixman_image_createForPixels (pixels, format);
if (image == NULL) {
FbPixelsDestroy (pixels);
@@ -382,7 +382,7 @@ pixman_image_set_transform (pixman_image
if (transform && memcmp (transform, &identity, sizeof (pixman_transform_t)) == 0)
transform = NULL;
-
+
if (transform)
{
if (!image->transform)
@@ -481,7 +481,7 @@ pixman_image_destroy (pixman_image_t *im
pixman_region_destroy (image->pCompositeClip);
image->pCompositeClip = NULL;
}
-
+
if (image->freeSourceClip) {
pixman_region_destroy (image->pSourceClip);
image->pSourceClip = NULL;
@@ -537,7 +537,7 @@ pixman_image_set_clip_region (pixman_ima
image->stateChanges |= CPClipMask;
if (image->pSourcePict)
return 0;
-
+
if (image->freeCompClip)
pixman_region_destroy (image->pCompositeClip);
image->pCompositeClip = pixman_region_create();
@@ -555,7 +555,7 @@ pixman_image_set_clip_region (pixman_ima
image->clipOrigin.x,
image->clipOrigin.y);
}
-
+
return 0;
}
@@ -596,7 +596,7 @@ FbClipImageReg (pixman_region16_t *regio
}
return 1;
}
-
+
static __inline int
FbClipImageSrc (pixman_region16_t *region,
pixman_image_t *image,
@@ -654,7 +654,7 @@ pixman_image_change (pixman_image_t *im
BITS32 index2;
int error = 0;
BITS32 maskQ;
-
+
maskQ = vmask;
while (vmask && !error)
{
@@ -679,7 +679,7 @@ pixman_image_change (pixman_image_t *im
case CPAlphaMap:
{
pixman_image_t *iAlpha;
-
+
iAlpha = NEXT_PTR(pixman_image_t *);
if (iAlpha)
iAlpha->refcnt++;
@@ -917,7 +917,7 @@ int
miIsSolidAlpha (pixman_image_t *src)
{
char line[1];
-
+
/* Alpha-only */
if (PICT_FORMAT_TYPE (src->format_code) != PICT_TYPE_A)
return 0;
diff --git a/pixman/src/icimage.h b/pixman/src/icimage.h
index cf65c7b..0d50e1f 100644
--- a/pixman/src/icimage.h
+++ b/pixman/src/icimage.h
@@ -138,7 +138,7 @@ struct pixman_image {
pixman_format_t image_format;
int format_code;
int refcnt;
-
+
unsigned int repeat : 2;
unsigned int graphicsExposures : 1;
unsigned int subWindowMode : 1;
@@ -164,7 +164,7 @@ struct pixman_image {
pixman_region16_t *pCompositeClip;
pixman_region16_t *pSourceClip;
-
+
pixman_transform_t *transform;
pixman_filter_t filter;
@@ -306,7 +306,7 @@ struct _FbCompositeOperand {
struct {
pixman_bits_t *top_line;
int left_offset;
-
+
int start_offset;
pixman_bits_t *line;
uint32_t offset;
diff --git a/pixman/src/icint.h b/pixman/src/icint.h
index 81b2756..f65e26f 100644
--- a/pixman/src/icint.h
+++ b/pixman/src/icint.h
@@ -136,7 +136,7 @@ typedef pixman_triangle_t xTriangle;
#define FB_HALFUNIT (1 << (FB_SHIFT-1))
#define FB_MASK (FB_UNIT - 1)
#define FB_ALLONES ((pixman_bits_t) -1)
-
+
/* whether to bother to include 24bpp support */
#ifndef ICNO24BIT
#define FB_24BIT
@@ -157,13 +157,13 @@ typedef pixman_triangle_t xTriangle;
#define FB_STIP_UNIT (1 << FB_STIP_SHIFT)
#define FB_STIP_MASK (FB_STIP_UNIT - 1)
#define FB_STIP_ALLONES ((FbStip) -1)
-
+
#define FB_STIP_ODDSTRIDE(s) (((s) & (FB_MASK >> FB_STIP_SHIFT)) != 0)
#define FB_STIP_ODDPTR(p) ((((long) (p)) & (FB_MASK >> 3)) != 0)
-
+
#define FbStipStrideToBitsStride(s) (((s) >> (FB_SHIFT - FB_STIP_SHIFT)))
#define FbBitsStrideToStipStride(s) (((s) << (FB_SHIFT - FB_STIP_SHIFT)))
-
+
#define FbFullMask(n) ((n) == FB_UNIT ? FB_ALLONES : ((((FbBits) 1) << n) - 1))
@@ -593,18 +593,18 @@ pixman_private void
fbBlt (pixman_bits_t *src,
FbStride srcStride,
int srcX,
-
+
FbBits *dst,
FbStride dstStride,
int dstX,
-
+
int width,
int height,
-
+
int alu,
FbBits pm,
int bpp,
-
+
Bool reverse,
Bool upsidedown);
@@ -625,12 +625,12 @@ fbBlt24 (pixman_bits_t *srcLine,
Bool reverse,
Bool upsidedown);
-
+
pixman_private void
fbBltStip (FbStip *src,
FbStride srcStride, /* in FbStip units, not FbBits units */
int srcX,
-
+
FbStip *dst,
FbStride dstStride, /* in FbStip units, not FbBits units */
int dstX,
@@ -641,7 +641,7 @@ fbBltStip (FbStip *src,
int alu,
FbBits pm,
int bpp);
-
+
/*
* icbltone.c
*/
@@ -661,7 +661,7 @@ fbBltOne (FbStip *src,
FbBits fbxor,
FbBits bgand,
FbBits bgxor);
-
+
#ifdef FB_24BIT
pixman_private void
fbBltOne24 (FbStip *src,
@@ -956,7 +956,7 @@ typedef struct _PictFormat *PictFormatPt
#define PICT_b1g2r1 PICT_FORMAT(4,PICT_TYPE_ABGR,0,1,2,1)
#define PICT_a1r1g1b1 PICT_FORMAT(4,PICT_TYPE_ARGB,1,1,1,1)
#define PICT_a1b1g1r1 PICT_FORMAT(4,PICT_TYPE_ABGR,1,1,1,1)
-
+
#define PICT_c4 PICT_FORMAT(4,PICT_TYPE_COLOR,0,0,0,0)
#define PICT_g4 PICT_FORMAT(4,PICT_TYPE_GRAY,0,0,0,0)
diff --git a/pixman/src/icrect.c b/pixman/src/icrect.c
index 94ff1e4..959699a 100644
--- a/pixman/src/icrect.c
+++ b/pixman/src/icrect.c
@@ -135,7 +135,7 @@ pixman_fill_rect_32bpp (pixman_image_t *
line = (char *)dst->pixels->data +
xDst * 4 + yDst * dst->pixels->stride;
-
+
int_pixel = *(uint32_t *)pixel;
while (height-- > 0) {
data = line;
@@ -165,7 +165,7 @@ pixman_fill_rect_general (pixman_image_t
line = (char *)dst->pixels->data +
xDst * pixel_size + yDst * dst->pixels->stride;
-
+
while (height-- > 0) {
data = line;
w = width;
@@ -201,7 +201,7 @@ pixman_color_rects (pixman_image_t *dst
/* offset to the right place on the destination image */
xoff -= dst->pixels->x;
yoff -= dst->pixels->y;
-
+
clip = pixman_region_create();
pixman_region_union_rect (clip, clip,
dst->pixels->x, dst->pixels->y,
@@ -250,7 +250,7 @@ pixman_color_rects (pixman_image_t *dst
func = pixman_fill_rect_1bpp;
else
func = pixman_fill_rect_general;
-
+
for (i = 0; i < n_clipped_rects; i++) {
(*func) (dst,
clipped_rects[i].x1,
@@ -326,11 +326,11 @@ pixman_fill_rectangles (pixman_operator_
pixman_bits_t pixel;
pixman_format_init (&rgbaFormat, PICT_a8r8g8b8);
-
+
pixels = FbPixelsCreate (1, 1, rgbaFormat.depth);
if (!pixels)
goto bail1;
-
+
pixman_color_to_pixel (&rgbaFormat, &color_s, &pixel);
/* XXX: Originally, fb had the following:
diff --git a/pixman/src/icrop.h b/pixman/src/icrop.h
index 8f17547..d65b5c4 100644
--- a/pixman/src/icrop.h
+++ b/pixman/src/icrop.h
@@ -110,7 +110,7 @@ fbStippleTable(int bits);
#define FbStippleRRopMask(dst, b, fa, fx, ba, bx, m) \
(FbDoMaskRRop(dst, fa, fx, m) & (b)) | (FbDoMaskRRop(dst, ba, bx, m) & ~(b))
-
+
#define FbDoLeftMaskByteStippleRRop(dst, b, fa, fx, ba, bx, lb, l) { \
FbBits __xor = ((fx) & (b)) | ((bx) & ~(b)); \
FbDoLeftMaskByteRRop(dst, lb, l, ((fa) & (b)) | ((ba) & ~(b)), __xor); \
@@ -122,7 +122,7 @@ fbStippleTable(int bits);
}
#define FbOpaqueStipple(b, fg, bg) (((fg) & (b)) | ((bg) & ~(b)))
-
+
/*
* Compute rop for using tile code for 1-bit dest stipples; modifies
* existing rop to flip depending on pixel values
diff --git a/pixman/src/icstipple.c b/pixman/src/icstipple.c
index e077cbb..8074d7a 100644
--- a/pixman/src/icstipple.c
+++ b/pixman/src/icstipple.c
@@ -41,15 +41,15 @@
#define LaneCases64(c,a) LaneCases32(c,a); LaneCases32(c+32,a)
#define LaneCases128(c,a) LaneCases64(c,a); LaneCases64(c+64,a)
#define LaneCases256(c,a) LaneCases128(c,a); LaneCases128(c+128,a)
-
+
#if FB_SHIFT == 6
#define LaneCases(a) LaneCases256(0,a)
#endif
-
+
#if FB_SHIFT == 5
#define LaneCases(a) LaneCases16(0,a)
#endif
-
+
/*
* Repeat a transparent stipple across a scanline n times
*/
diff --git a/pixman/src/ictrap.c b/pixman/src/ictrap.c
index 72616f3..68b4750 100644
--- a/pixman/src/ictrap.c
+++ b/pixman/src/ictrap.c
@@ -81,16 +81,16 @@ pixman_trapezoid_bounds (int ntrap, cons
y1 = xFixedToInt (traps->top);
if (y1 < box->y1)
box->y1 = y1;
-
+
y2 = xFixedToInt (xFixedCeil (traps->bottom));
if (y2 > box->y2)
box->y2 = y2;
-
+
x1 = xFixedToInt (MIN (pixman_line_fixed_x (&traps->left, traps->top, 0),
pixman_line_fixed_x (&traps->left, traps->bottom, 0)));
if (x1 < box->x1)
box->x1 = x1;
-
+
x2 = xFixedToInt (xFixedCeil (MAX (pixman_line_fixed_x (&traps->right, traps->top, 1),
pixman_line_fixed_x (&traps->right, traps->bottom, 1))));
if (x2 > box->x2)
@@ -132,7 +132,7 @@ pixman_composite_trapezoids (pixman_oper
xDst = traps[0].left.p1.x >> 16;
yDst = traps[0].left.p1.y >> 16;
-
+
pixman_trapezoid_bounds (ntraps, traps, &traps_bounds);
traps_region = pixman_region_create_simple (&traps_bounds);
diff --git a/pixman/src/ictri.c b/pixman/src/ictri.c
index a3947ab..f612966 100644
--- a/pixman/src/ictri.c
+++ b/pixman/src/ictri.c
@@ -94,25 +94,25 @@ FbRasterizeTriangle (pixman_image_t *im
* / --- --- \
* +-- --+
*/
-
+
trap[0].top = top->y;
-
+
trap[0].left.p1.x = top->x;
trap[0].left.p1.y = trap[0].top;
trap[0].left.p2.x = left->x;
trap[0].left.p2.y = left->y;
-
+
trap[0].right.p1 = trap[0].left.p1;
trap[0].right.p2.x = right->x;
trap[0].right.p2.y = right->y;
-
+
if (right->y < left->y)
{
trap[0].bottom = trap[0].right.p2.y;
trap[1].top = trap[0].bottom;
trap[1].bottom = trap[0].left.p2.y;
-
+
trap[1].left = trap[0].left;
trap[1].right.p1 = trap[0].right.p2;
trap[1].right.p2 = trap[0].left.p2;
@@ -120,10 +120,10 @@ FbRasterizeTriangle (pixman_image_t *im
else
{
trap[0].bottom = trap[0].left.p2.y;
-
+
trap[1].top = trap[0].bottom;
trap[1].bottom = trap[0].right.p2.y;
-
+
trap[1].right = trap[0].right;
trap[1].left.p1 = trap[0].left.p2;
trap[1].left.p2 = trap[0].right.p2;
@@ -148,12 +148,12 @@ pixman_composite_triangles (pixman_opera
int xDst, yDst;
int xRel, yRel;
pixman_format_t *format;
-
+
xDst = tris[0].p1.x >> 16;
yDst = tris[0].p1.y >> 16;
format = pixman_format_create (PIXMAN_FORMAT_NAME_A8);
-
+
if (format)
{
pixman_triangle_bounds (ntris, tris, &bounds);
@@ -223,12 +223,12 @@ pixman_composite_tri_strip (pixman_opera
if (npoints < 3)
return;
-
+
xDst = points[0].x >> 16;
yDst = points[0].y >> 16;
format = pixman_format_create (PIXMAN_FORMAT_NAME_A8);
-
+
if (format)
{
pixman_point_fixed_bounds (npoints, points, &bounds);
@@ -298,7 +298,7 @@ pixman_composite_tri_fan (pixman_operato
int xDst, yDst;
int xRel, yRel;
pixman_format_t *format;
-
+
if (npoints < 3)
return;
@@ -306,7 +306,7 @@ pixman_composite_tri_fan (pixman_operato
yDst = points[0].y >> 16;
format = pixman_format_create (PIXMAN_FORMAT_NAME_A8);
-
+
if (format)
{
pixman_point_fixed_bounds (npoints, points, &bounds);
diff --git a/pixman/src/icutil.c b/pixman/src/icutil.c
index f6119df..0a4ba66 100644
--- a/pixman/src/icutil.c
+++ b/pixman/src/icutil.c
@@ -28,7 +28,7 @@ pixman_bits_t
fbReplicatePixel (Pixel p, int bpp)
{
pixman_bits_t b = p;
-
+
b &= FbFullMask (bpp);
while (bpp < FB_UNIT)
{
diff --git a/pixman/src/pixregion.c b/pixman/src/pixregion.c
index e566096..bb2eb4f 100644
--- a/pixman/src/pixregion.c
+++ b/pixman/src/pixregion.c
@@ -21,7 +21,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
-
+
Copyright 1987, 1988, 1989 by
Digital Equipment Corporation, Maynard, Massachusetts.
@@ -244,7 +244,7 @@ pixman_region16_tsEqual(reg1, reg2)
if (reg1->extents.y1 != reg2->extents.y1) return PIXMAN_REGION_STATUS_FAILURE;
if (reg1->extents.y2 != reg2->extents.y2) return PIXMAN_REGION_STATUS_FAILURE;
if (PIXREGION_NUM_RECTS(reg1) != PIXREGION_NUM_RECTS(reg2)) return PIXMAN_REGION_STATUS_FAILURE;
-
+
rects1 = PIXREGION_RECTS(reg1);
rects2 = PIXREGION_RECTS(reg2);
for (i = 0; i != PIXREGION_NUM_RECTS(reg1); i++) {
@@ -321,7 +321,7 @@ pixman_region16_t *
pixman_region_create_simple (pixman_box16_t *extents)
{
pixman_region16_t *region;
-
+
region = malloc (sizeof (pixman_region16_t));
if (region == NULL)
return &pixman_brokenregion;
@@ -393,7 +393,7 @@ static pixman_region_status_t
pixman_rect_alloc(pixman_region16_t * region, int n)
{
pixman_region16_data_t *data;
-
+
if (!region->data)
{
n++;
@@ -690,7 +690,7 @@ pixman_op(
*/
if (PIXREGION_NAR (reg1) || PIXREGION_NAR(reg2))
return pixman_break (newReg);
-
+
/*
* Initialization:
* set r1, r2, r1End and r2End appropriately, save the rectangles
@@ -742,7 +742,7 @@ pixman_op(
*/
ybot = MIN(r1->y1, r2->y1);
-
+
/*
* prevBand serves to mark the start of the previous band so rectangles
* can be coalesced into larger rectangles. qv. pixman_coalesce, above.
@@ -753,7 +753,7 @@ pixman_op(
* array of rectangles.
*/
prevBand = 0;
-
+
do {
/*
* This algorithm proceeds one source-band (as opposed to a
@@ -764,7 +764,7 @@ pixman_op(
*/
assert(r1 != r1End);
assert(r2 != r2End);
-
+
FindBand(r1, r1BandEnd, r1End, r1y1);
FindBand(r2, r2BandEnd, r2End, r2y1);
@@ -1141,7 +1141,7 @@ pixman_region_unionO (
MERGERECT(r2);
} while (r2 != r2End);
}
-
+
/* Add current rectangle */
NEWRECT(region, pNextRect, x1, y1, x2, y2);
@@ -1274,7 +1274,7 @@ pixman_region_append(dstrgn, rgn)
if (PIXREGION_NAR(rgn))
return pixman_break (dstrgn);
-
+
if (!rgn->data && (dstrgn->data == &pixman_region_emptyData))
{
dstrgn->extents = rgn->extents;
@@ -1349,7 +1349,7 @@ pixman_region_append(dstrgn, rgn)
return PIXMAN_REGION_STATUS_SUCCESS;
}
-
+
#define ExchangeRects(a, b) \
{ \
pixman_box16_t t; \
@@ -1758,7 +1758,7 @@ pixman_region_subtractO (
int x1;
x1 = r1->x1;
-
+
assert(y1<y2);
assert(r1 != r1End && r2 != r2End);
@@ -1852,7 +1852,7 @@ pixman_region_subtractO (
}
return PIXMAN_REGION_STATUS_SUCCESS;
}
-
+
/*-
*-----------------------------------------------------------------------
* pixman_region_subtract --
@@ -1894,7 +1894,7 @@ pixman_region_subtract(regD, regM, regS)
regD->data = &pixman_region_emptyData;
return PIXMAN_REGION_STATUS_SUCCESS;
}
-
+
/* Add those rectangles in region 1 that aren't in region 2,
do yucky substraction for overlaps, and
just throw away rectangles in region 2 that aren't in region 1 */
@@ -2430,7 +2430,7 @@ pixman_region16_clip_spans(
clipy1 = prgnDst->extents.y1;
clipx2 = prgnDst->extents.x2;
clipy2 = prgnDst->extents.y2;
-
+
for (; ppt != pptLast; ppt++, pwidth++)
{
y = ppt->y;
@@ -2468,7 +2468,7 @@ pixman_region16_clip_spans(
pboxBandStart = PIXREGION_BOXPTR(prgnDst);
pboxLast = pboxBandStart + numRects;
-
+
NextBand();
for (; ppt != pptLast; )
diff --git a/pixman/src/renderedge.c b/pixman/src/renderedge.c
index 56fcfb3..42fa65f 100644
--- a/pixman/src/renderedge.c
+++ b/pixman/src/renderedge.c
@@ -32,7 +32,7 @@ RenderSampleCeilY (xFixed y, int n)
{
xFixed f = xFixedFrac(y);
xFixed i = xFixedFloor(y);
-
+
f = ((f + Y_FRAC_FIRST(n)) / STEP_Y_SMALL(n)) * STEP_Y_SMALL(n) + Y_FRAC_FIRST(n);
if (f > Y_FRAC_LAST(n))
{
@@ -53,7 +53,7 @@ RenderSampleFloorY (xFixed y, int n)
{
xFixed f = xFixedFrac(y);
xFixed i = xFixedFloor (y);
-
+
f = _div(f - Y_FRAC_FIRST(n), STEP_Y_SMALL(n)) * STEP_Y_SMALL(n) + Y_FRAC_FIRST(n);
if (f < Y_FRAC_FIRST(n))
{
@@ -72,9 +72,9 @@ RenderEdgeStep (RenderEdge *e, int n)
xFixed_48_16 ne;
e->x += n * e->stepx;
-
+
ne = e->e + n * (xFixed_48_16) e->dx;
-
+
if (n >= 0)
{
if (ne > 0)
@@ -104,7 +104,7 @@ _RenderEdgeMultiInit (RenderEdge *e, int
{
xFixed stepx;
xFixed_48_16 ne;
-
+
ne = n * (xFixed_48_16) e->dx;
stepx = n * e->stepx;
if (ne > 0)
@@ -153,7 +153,7 @@ RenderEdgeInit (RenderEdge *e,
e->dx = -dx % dy;
e->e = 0;
}
-
+
_RenderEdgeMultiInit (e, STEP_Y_SMALL(n), &e->stepx_small, &e->dx_small);
_RenderEdgeMultiInit (e, STEP_Y_BIG(n), &e->stepx_big, &e->dx_big);
}
diff --git a/src/cairo-analysis-surface.c b/src/cairo-analysis-surface.c
index fdcd17f..d06e3fe 100644
--- a/src/cairo-analysis-surface.c
+++ b/src/cairo-analysis-surface.c
@@ -43,7 +43,7 @@ typedef struct {
int height;
cairo_surface_t *target;
-
+
cairo_bool_t fallback;
} cairo_analysis_surface_t;
diff --git a/src/cairo-arc.c b/src/cairo-arc.c
index 4b767f1..e65e381 100644
--- a/src/cairo-arc.c
+++ b/src/cairo-arc.c
@@ -190,7 +190,7 @@ _cairo_arc_in_direction (cairo_t *cr,
_cairo_arc_in_direction (cr, xc, yc, radius,
angle_min, angle_mid,
dir);
-
+
_cairo_arc_in_direction (cr, xc, yc, radius,
angle_mid, angle_max,
dir);
diff --git a/src/cairo-atsui-font.c b/src/cairo-atsui-font.c
index 878eaf8..4adeabd 100644
--- a/src/cairo-atsui-font.c
+++ b/src/cairo-atsui-font.c
@@ -186,7 +186,7 @@ _cairo_atsui_font_set_metrics (cairo_ats
if (err == noErr) {
cairo_font_extents_t extents;
-
+
extents.ascent = metrics.ascent;
extents.descent = -metrics.descent;
extents.height = metrics.capHeight;
@@ -407,7 +407,7 @@ _line_to (const Float32Point *point,
_cairo_path_fixed_line_to (path,
_cairo_fixed_from_double(point->x),
_cairo_fixed_from_double(point->y));
-
+
return noErr;
}
@@ -426,7 +426,7 @@ _curve_to (const Float32Point *point1,
_cairo_fixed_from_double(point2->y),
_cairo_fixed_from_double(point3->x),
_cairo_fixed_from_double(point3->y));
-
+
return noErr;
}
@@ -553,7 +553,7 @@ _cairo_atsui_font_text_to_glyphs (void
kATSUDirectDataLayoutRecordATSLayoutRecordCurrent,
(void *) &layoutRecords);
ATSUDisposeTextLayout(textLayout);
-
+
return CAIRO_STATUS_SUCCESS;
}
@@ -599,7 +599,7 @@ _cairo_atsui_font_old_show_glyphs (void
/* Create a CGBitmapContext for the dest surface for drawing into */
colorSpace = CGColorSpaceCreateDeviceRGB();
-
+
myBitmapContext = CGBitmapContextCreate(destImageSurface->data,
destImageSurface->width,
destImageSurface->height,
@@ -658,23 +658,23 @@ _cairo_atsui_font_old_show_glyphs (void
rects = malloc (sizeof (CGRect) * num_boxes);
else
rects = stack_rects;
-
+
for (i = 0; i < num_boxes; i++) {
rects[i].origin.x = boxes[i].x1;
rects[i].origin.y = boxes[i].y1;
rects[i].size.width = boxes[i].x2 - boxes[i].x1;
rects[i].size.height = boxes[i].y2 - boxes[i].y1;
}
-
+
CGContextClipToRects (drawingContext, rects, num_boxes);
-
+
if (rects != stack_rects)
free(rects);
}
} else {
/* XXX: Need to get the text clipped */
}
-
+
/* TODO - bold and italic text
*
* We could draw the text using ATSUI and get bold, italics
@@ -682,10 +682,10 @@ _cairo_atsui_font_old_show_glyphs (void
* that we don't really need...
*/
-
+
for (i = 0; i < num_glyphs; i++) {
CGGlyph theGlyph = glyphs[i].index;
-
+
CGContextShowGlyphsAtPoint(drawingContext,
glyphs[i].x,
glyphs[i].y,
@@ -695,7 +695,7 @@ _cairo_atsui_font_old_show_glyphs (void
if (!can_draw_directly) {
CGColorSpaceRelease(colorSpace);
CGContextRelease(myBitmapContext);
-
+
_cairo_surface_release_dest_image(generic_surface,
&rect,
destImageSurface,
diff --git a/src/cairo-base85-stream.c b/src/cairo-base85-stream.c
index 1d4535a..43401e6 100644
--- a/src/cairo-base85-stream.c
+++ b/src/cairo-base85-stream.c
@@ -49,7 +49,7 @@ _expand_four_tuple_to_five (unsigned cha
{
uint32_t value;
int digit, i;
-
+
value = four_tuple[0] << 24 | four_tuple[1] << 16 | four_tuple[2] << 8 | four_tuple[3];
if (all_zero)
*all_zero = TRUE;
diff --git a/src/cairo-clip.c b/src/cairo-clip.c
index 06c2abd..b0d142b 100644
--- a/src/cairo-clip.c
+++ b/src/cairo-clip.c
@@ -114,7 +114,7 @@ _cairo_clip_reset (cairo_clip_t *clip)
_cairo_clip_path_destroy (clip->path);
clip->path = NULL;
-
+
return CAIRO_STATUS_SUCCESS;
}
@@ -133,11 +133,11 @@ _cairo_clip_intersect_to_rectangle (cair
pixman_region16_t *intersection;
cairo_status_t status = CAIRO_STATUS_SUCCESS;
pixman_region_status_t pixman_status;
-
+
intersection = _cairo_region_create_from_rectangle (rectangle);
if (intersection == NULL)
return CAIRO_STATUS_NO_MEMORY;
-
+
pixman_status = pixman_region_intersect (intersection,
clip->region,
intersection);
@@ -176,11 +176,11 @@ _cairo_clip_intersect_to_region (cairo_c
pixman_region16_t *clip_rect;
pixman_region_status_t pixman_status;
cairo_status_t status = CAIRO_STATUS_SUCCESS;
-
+
clip_rect = _cairo_region_create_from_rectangle (&clip->surface_rect);
if (clip_rect == NULL)
return CAIRO_STATUS_NO_MEMORY;
-
+
pixman_status = pixman_region_intersect (region,
clip_rect,
region);
@@ -212,7 +212,7 @@ _cairo_clip_combine_to_surface (cairo_cl
cairo_status_t status;
_cairo_pattern_init_for_surface (&pattern.surface, clip->surface);
-
+
status = _cairo_surface_composite (op,
&pattern.base,
NULL,
@@ -223,7 +223,7 @@ _cairo_clip_combine_to_surface (cairo_cl
extents->x - dst_x,
extents->y - dst_y,
extents->width, extents->height);
-
+
_cairo_pattern_fini (&pattern.base);
return status;
@@ -298,11 +298,11 @@ _cairo_clip_intersect_region (cairo_clip
if (clip->mode != CAIRO_CLIP_MODE_REGION)
return CAIRO_INT_STATUS_UNSUPPORTED;
-
+
status = _cairo_traps_extract_region (traps, ®ion);
if (status)
return status;
-
+
if (region == NULL)
return CAIRO_INT_STATUS_UNSUPPORTED;
@@ -311,7 +311,7 @@ _cairo_clip_intersect_region (cairo_clip
clip->region = region;
} else {
pixman_region16_t *intersection = pixman_region_create();
-
+
if (pixman_region_intersect (intersection,
clip->region, region)
== PIXMAN_REGION_STATUS_SUCCESS) {
@@ -369,7 +369,7 @@ _cairo_clip_intersect_mask (cairo_clip_t
_cairo_traps_translate (traps, -surface_rect.x, -surface_rect.y);
_cairo_pattern_init_solid (&pattern.solid, CAIRO_COLOR_WHITE);
-
+
status = _cairo_surface_composite_trapezoids (CAIRO_OPERATOR_IN,
&pattern.base,
surface,
@@ -442,7 +442,7 @@ _cairo_clip_clip (cairo_clip_t *cl
_cairo_fixed_from_double (target->device_y_offset));
path = &path_transformed;
}
-
+
status = _cairo_clip_intersect_path (clip,
path, fill_rule, tolerance,
antialias);
@@ -466,7 +466,7 @@ _cairo_clip_clip (cairo_clip_t *cl
goto bail;
status = _cairo_clip_intersect_mask (clip, &traps, antialias, target);
-
+
bail:
_cairo_traps_fini (&traps);
if (path == &path_transformed)
diff --git a/src/cairo-directfb-surface.c b/src/cairo-directfb-surface.c
index 0b13de1..8776581 100644
--- a/src/cairo-directfb-surface.c
+++ b/src/cairo-directfb-surface.c
@@ -266,7 +266,7 @@ _cairo_directfb_surface_get_image (cairo
surface->buffer_data=NULL;
}
surface->buffer->Unlock(surface->buffer);
-
+
surface->main_surface->GetSize(surface->main_surface,&width,&height);
surface->main_surface->GetPixelFormat(surface->main_surface,&dfbformat);
@@ -508,7 +508,7 @@ _cairo_directfb_surface_composite (cairo
if (src->base.backend != dst->base.backend){
return CAIRO_INT_STATUS_UNSUPPORTED;
}
-
+
integer_transform = _cairo_matrix_is_integer_translation (&src_pattern->matrix, &itx, &ity);
if (!integer_transform) {
return CAIRO_INT_STATUS_UNSUPPORTED;
@@ -776,7 +776,7 @@ _cairo_directfb_surface_show_glyphs (cai
surface->buffer->SetColor(surface->buffer,0,0xff,0xff,0xff);
#endif
surface->buffer->Blit(surface->buffer,tmpbuffer,NULL,x,y);
-
+
}
return CAIRO_INT_STATUS_UNSUPPORTED;
}
diff --git a/src/cairo-font-options.c b/src/cairo-font-options.c
index 920e6ed..91d7a4d 100644
--- a/src/cairo-font-options.c
+++ b/src/cairo-font-options.c
@@ -54,7 +54,7 @@ _cairo_font_options_init_default (cairo_
{
if (options == (cairo_font_options_t *)&cairo_font_options_nil)
return;
-
+
options->antialias = CAIRO_ANTIALIAS_DEFAULT;
options->subpixel_order = CAIRO_SUBPIXEL_ORDER_DEFAULT;
options->hint_style = CAIRO_HINT_STYLE_DEFAULT;
@@ -237,7 +237,7 @@ cairo_font_options_set_antialias (cairo_
{
if (options == (cairo_font_options_t *)&cairo_font_options_nil)
return;
-
+
options->antialias = antialias;
}
@@ -272,7 +272,7 @@ cairo_font_options_set_subpixel_order (c
{
if (options == (cairo_font_options_t *)&cairo_font_options_nil)
return;
-
+
options->subpixel_order = subpixel_order;
}
@@ -307,7 +307,7 @@ cairo_font_options_set_hint_style (cairo
{
if (options == (cairo_font_options_t *)&cairo_font_options_nil)
return;
-
+
options->hint_style = hint_style;
}
diff --git a/src/cairo-font-subset.c b/src/cairo-font-subset.c
index c504f2e..f96b2a4 100644
--- a/src/cairo-font-subset.c
+++ b/src/cairo-font-subset.c
@@ -331,7 +331,7 @@ cairo_pdf_ft_font_write_generic_table (c
status = cairo_pdf_ft_font_allocate_write_buffer (font, size, &buffer);
/* XXX: Need to check status here. */
FT_Load_Sfnt_Table (font->face, tag, 0, buffer, &size);
-
+
return 0;
}
@@ -371,7 +371,7 @@ cairo_pdf_ft_font_remap_composite_glyph
glyph_data = (glyph_data_t *) buffer;
if ((short)be16_to_cpu (glyph_data->num_contours) >= 0)
return;
-
+
composite_glyph = &glyph_data->glyph;
do {
flags = be16_to_cpu (composite_glyph->flags);
@@ -573,7 +573,7 @@ cairo_pdf_ft_font_write_maxp_table (cair
TT_MaxProfile *maxp;
maxp = FT_Get_Sfnt_Table (font->face, ft_sfnt_maxp);
-
+
cairo_pdf_ft_font_write_be32 (font, maxp->version);
cairo_pdf_ft_font_write_be16 (font, font->base.num_glyphs);
cairo_pdf_ft_font_write_be16 (font, maxp->maxPoints);
diff --git a/src/cairo-font.c b/src/cairo-font.c
index 425021a..40020a0 100644
--- a/src/cairo-font.c
+++ b/src/cairo-font.c
@@ -202,7 +202,7 @@ cairo_font_face_set_user_data (cairo_fon
{
if (font_face->ref_count == -1)
return CAIRO_STATUS_NO_MEMORY;
-
+
return _cairo_user_data_array_set_data (&font_face->user_data,
key, user_data, destroy);
}
@@ -277,7 +277,7 @@ _cairo_toy_font_face_init_key (cairo_toy
hash = _cairo_hash_string (family);
hash += ((unsigned long) slant) * 1607;
hash += ((unsigned long) weight) * 1451;
-
+
key->base.hash_entry.hash = hash;
}
@@ -350,7 +350,7 @@ _cairo_toy_font_face_create (const char
goto UNWIND;
_cairo_toy_font_face_init_key (&key, family, slant, weight);
-
+
/* Return existing font_face if it exists in the hash table. */
if (_cairo_hash_table_lookup (hash_table,
&key.base.hash_entry,
@@ -400,9 +400,9 @@ _cairo_toy_font_face_destroy (void *abst
assert (hash_table != NULL);
_cairo_hash_table_remove (hash_table, &font_face->base.hash_entry);
-
+
_cairo_toy_font_face_hash_table_unlock ();
-
+
_cairo_toy_font_face_fini (font_face);
}
diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index d48cec7..2a06eeb 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -96,7 +96,7 @@ struct _cairo_ft_unscaled_font {
double x_scale; /* Extracted X scale factor */
double y_scale; /* Extracted Y scale factor */
cairo_bool_t have_shape; /* true if the current scale has a non-scale component*/
-
+
int lock; /* count of how many times this font has been locked */
cairo_ft_font_face_t *faces; /* Linked list of faces for this font */
@@ -276,7 +276,7 @@ _cairo_ft_unscaled_font_init_key (cairo_
/* 1607 is just an arbitrary prime. */
hash = _cairo_hash_string (filename);
hash += ((unsigned long) id) * 1607;
-
+
key->base.hash_entry.hash = hash;
}
@@ -330,7 +330,7 @@ _cairo_ft_unscaled_font_init (cairo_ft_u
unscaled->have_scale = FALSE;
unscaled->lock = 0;
-
+
unscaled->faces = NULL;
return CAIRO_STATUS_SUCCESS;
@@ -387,14 +387,14 @@ _cairo_ft_unscaled_font_create_for_patte
FcChar8 *fc_filename;
char *filename;
int id;
-
+
if (FcPatternGetString (pattern, FC_FILE, 0, &fc_filename) != FcResultMatch)
goto UNWIND;
filename = (char *) fc_filename;
if (FcPatternGetInteger (pattern, FC_INDEX, 0, &id) != FcResultMatch)
goto UNWIND;
-
+
font_map = _cairo_ft_unscaled_font_map_lock ();
if (font_map == NULL)
goto UNWIND;
@@ -473,7 +473,7 @@ _cairo_ft_unscaled_font_destroy (void *a
cairo_font_face_destroy (&unscaled->faces->base);
} else {
cairo_ft_unscaled_font_map_t *font_map;
-
+
font_map = _cairo_ft_unscaled_font_map_lock ();
/* All created objects must have been mapped in the font map. */
assert (font_map != NULL);
@@ -516,14 +516,14 @@ _cairo_ft_unscaled_font_lock_face (cairo
/* If this unscaled font was created from an FT_Face then we just
* returned it above. */
assert (!unscaled->from_face);
-
+
font_map = _cairo_ft_unscaled_font_map_lock ();
assert (font_map != NULL);
-
+
while (font_map->num_open_faces >= MAX_OPEN_FACES)
{
cairo_ft_unscaled_font_t *entry;
-
+
entry = _cairo_hash_table_random_entry (font_map->hash_table,
_has_unlocked_face);
if (entry == NULL)
@@ -555,7 +555,7 @@ void
_cairo_ft_unscaled_font_unlock_face (cairo_ft_unscaled_font_t *unscaled)
{
assert (unscaled->lock > 0);
-
+
unscaled->lock--;
}
@@ -565,7 +565,7 @@ _compute_transform (cairo_ft_font_transf
{
cairo_matrix_t normalized = *scale;
double tx, ty;
-
+
/* The font matrix has x and y "scale" components which we extract and
* use as character scale values. These influence the way freetype
* chooses hints, as well as selecting different bitmaps in
@@ -576,10 +576,10 @@ _compute_transform (cairo_ft_font_transf
_cairo_matrix_compute_scale_factors (&normalized,
&sf->x_scale, &sf->y_scale,
/* XXX */ 1);
-
+
if (sf->x_scale != 0 && sf->y_scale != 0) {
cairo_matrix_scale (&normalized, 1.0 / sf->x_scale, 1.0 / sf->y_scale);
-
+
_cairo_matrix_get_affine (&normalized,
&sf->shape[0][0], &sf->shape[0][1],
&sf->shape[1][0], &sf->shape[1][1],
@@ -603,7 +603,7 @@ _cairo_ft_unscaled_font_set_scale (cairo
FT_Error error;
assert (unscaled->face != NULL);
-
+
if (unscaled->have_scale &&
scale->xx == unscaled->current_scale.xx &&
scale->yx == unscaled->current_scale.yx &&
@@ -613,12 +613,12 @@ _cairo_ft_unscaled_font_set_scale (cairo
unscaled->have_scale = TRUE;
unscaled->current_scale = *scale;
-
+
_compute_transform (&sf, scale);
unscaled->x_scale = sf.x_scale;
unscaled->y_scale = sf.y_scale;
-
+
mat.xx = DOUBLE_TO_16_16(sf.shape[0][0]);
mat.yx = - DOUBLE_TO_16_16(sf.shape[0][1]);
mat.xy = - DOUBLE_TO_16_16(sf.shape[1][0]);
@@ -628,7 +628,7 @@ _cairo_ft_unscaled_font_set_scale (cairo
mat.yx != 0x00000 ||
mat.xy != 0x00000 ||
mat.yy != 0x10000);
-
+
FT_Set_Transform(unscaled->face, &mat, NULL);
if ((unscaled->face->face_flags & FT_FACE_FLAG_SCALABLE) != 0) {
@@ -644,7 +644,7 @@ _cairo_ft_unscaled_font_set_scale (cairo
int best_i = 0;
pixel_width = pixel_height = 0;
-
+
for (i = 0; i < unscaled->face->num_fixed_sizes; i++) {
#if HAVE_FT_BITMAP_SIZE_Y_PPEM
double size = unscaled->face->available_sizes[i].y_ppem / 64.;
@@ -652,7 +652,7 @@ _cairo_ft_unscaled_font_set_scale (cairo
double size = unscaled->face->available_sizes[i].height;
#endif
double distance = fabs (size - sf.y_scale);
-
+
if (distance <= min_distance) {
min_distance = distance;
best_i = i;
@@ -711,10 +711,10 @@ _get_bitmap_surface (FT_Bitmap *bi
unsigned char *data;
int format = CAIRO_FORMAT_A8;
cairo_bool_t subpixel = FALSE;
-
+
width = bitmap->width;
height = bitmap->rows;
-
+
switch (bitmap->pixel_mode) {
case FT_PIXEL_MODE_MONO:
stride = (((width + 31) & ~31) >> 3);
@@ -731,24 +731,24 @@ _get_bitmap_surface (FT_Bitmap *bi
} else {
int i;
unsigned char *source, *dest;
-
+
source = bitmap->buffer;
dest = data;
for (i = height; i; i--) {
memcpy (dest, source, bitmap->pitch);
memset (dest + bitmap->pitch, '\0', stride - bitmap->pitch);
-
+
source += bitmap->pitch;
dest += stride;
}
}
}
-
+
if (_native_byte_order_lsb())
{
unsigned char *d = data, c;
int count = stride * height;
-
+
while (count--) {
c = *d;
c = ((c << 1) & 0xaa) | ((c >> 1) & 0x55);
@@ -791,7 +791,7 @@ _get_bitmap_surface (FT_Bitmap *bi
unsigned int width_rgba, stride_rgba;
int vmul = 1;
int hmul = 1;
-
+
switch (font_options->subpixel_order) {
case CAIRO_SUBPIXEL_ORDER_DEFAULT:
case CAIRO_SUBPIXEL_ORDER_RGB:
@@ -813,7 +813,7 @@ _get_bitmap_surface (FT_Bitmap *bi
stride = bitmap->pitch;
stride_rgba = (width_rgba * 4 + 3) & ~3;
data_rgba = calloc (1, stride_rgba * height);
-
+
os = 1;
switch (font_options->subpixel_order) {
case CAIRO_SUBPIXEL_ORDER_VRGB:
@@ -858,11 +858,11 @@ _get_bitmap_surface (FT_Bitmap *bi
*out++ = (green << 24) | (red << 16) | (green << 8) | blue;
}
}
-
+
/* Images here are stored in native format. The
* backend must convert to its own format as needed
*/
-
+
if (own_buffer)
free (bitmap->buffer);
data = data_rgba;
@@ -879,7 +879,7 @@ _get_bitmap_surface (FT_Bitmap *bi
default:
return CAIRO_STATUS_NO_MEMORY;
}
-
+
*surface = (cairo_image_surface_t *)
cairo_image_surface_create_for_data (data,
format,
@@ -888,7 +888,7 @@ _get_bitmap_surface (FT_Bitmap *bi
free (data);
return CAIRO_STATUS_NO_MEMORY;
}
-
+
if (subpixel)
pixman_image_set_component_alpha ((*surface)->pixman_image, TRUE);
@@ -964,7 +964,7 @@ _render_glyph_outline (FT_Face
matrix.xx = matrix.yy = 0x10000L;
matrix.xy = matrix.yx = 0;
-
+
switch (font_options->antialias) {
case CAIRO_ANTIALIAS_NONE:
bitmap.pixel_mode = FT_PIXEL_MODE_MONO;
@@ -999,18 +999,18 @@ _render_glyph_outline (FT_Face
bitmap.num_grays = 256;
stride = (width * hmul + 3) & -4;
}
-
+
bitmap.pitch = stride;
bitmap.width = width * hmul;
bitmap.rows = height * vmul;
bitmap.buffer = calloc (1, stride * bitmap.rows);
-
+
if (bitmap.buffer == NULL) {
return CAIRO_STATUS_NO_MEMORY;
}
-
+
FT_Outline_Translate (outline, -cbox.xMin*hmul, -cbox.yMin*vmul);
-
+
if (FT_Outline_Get_Bitmap (glyphslot->library, outline, &bitmap) != 0) {
free (bitmap.buffer);
return CAIRO_STATUS_NO_MEMORY;
@@ -1070,7 +1070,7 @@ _render_glyph_bitmap (FT_Face fac
status = _get_bitmap_surface (&glyphslot->bitmap, FALSE, font_options, surface);
if (status)
return status;
-
+
/*
* Note: the font's coordinate system is upside down from ours, so the
* Y coordinate of the control box needs to be negated.
@@ -1099,7 +1099,7 @@ _transform_glyph_bitmap (cairo_image_gly
int width, height;
cairo_status_t status;
cairo_surface_pattern_t pattern;
-
+
/* We want to compute a transform that takes the origin
* (val->size.x, val->size.y) to 0,0, then applies the "shape"
* portion of the font transform
@@ -1128,7 +1128,7 @@ _transform_glyph_bitmap (cairo_image_gly
x_min = floor (x[0]); y_min = floor (y[0]);
x_max = ceil (x[0]); y_max = ceil (y[0]);
-
+
for (i = 1; i < 4; i++) {
if (x[i] < x_min)
x_min = floor (x[i]);
@@ -1199,7 +1199,7 @@ _transform_glyph_bitmap (cairo_image_gly
val->size.height = height;
val->size.x = - floor (origin_x + 0.5);
val->size.y = - floor (origin_y + 0.5);
-
+
return status;
}
#endif
@@ -1255,7 +1255,7 @@ _get_pattern_ft_options (FcPattern *patt
if (FcPatternGetBool (pattern,
FC_EMBEDDED_BITMAP, 0, &bitmap) != FcResultMatch)
bitmap = FcFalse;
-
+
/* disable antialiasing if requested */
if (FcPatternGetBool (pattern,
FC_ANTIALIAS, 0, &antialias) != FcResultMatch)
@@ -1265,7 +1265,7 @@ _get_pattern_ft_options (FcPattern *patt
ft_options.load_flags |= FT_LOAD_NO_BITMAP;
else if (!antialias)
ft_options.load_flags |= FT_LOAD_MONOCHROME;
-
+
/* disable hinting if requested */
if (FcPatternGetBool (pattern,
FC_HINTING, 0, &hinting) != FcResultMatch)
@@ -1277,7 +1277,7 @@ _get_pattern_ft_options (FcPattern *patt
if (!hinting || hintstyle == FC_HINT_NONE)
ft_options.load_flags |= FT_LOAD_NO_HINTING;
-
+
if (antialias) {
switch (hintstyle) {
case FC_HINT_SLIGHT:
@@ -1318,22 +1318,22 @@ _get_pattern_ft_options (FcPattern *patt
}
ft_options.load_flags |= target_flags;
-
+
/* force autohinting if requested */
if (FcPatternGetBool (pattern,
FC_AUTOHINT, 0, &autohint) != FcResultMatch)
autohint = FcFalse;
-
+
if (autohint)
ft_options.load_flags |= FT_LOAD_FORCE_AUTOHINT;
-
+
if (FcPatternGetBool (pattern,
FC_VERTICAL_LAYOUT, 0, &vertical_layout) != FcResultMatch)
vertical_layout = FcFalse;
-
+
if (vertical_layout)
ft_options.load_flags |= FT_LOAD_VERTICAL_LAYOUT;
-
+
#ifdef FC_EMBOLDEN
{
FcBool embolden;
@@ -1341,12 +1341,12 @@ _get_pattern_ft_options (FcPattern *patt
if (FcPatternGetBool (pattern,
FC_EMBOLDEN, 0, &embolden) != FcResultMatch)
embolden = FcFalse;
-
+
if (embolden)
ft_options.extra_flags |= CAIRO_FT_OPTIONS_EMBOLDEN;
}
#endif
-
+
return ft_options;
}
@@ -1381,7 +1381,7 @@ _get_options_load_flags (const cairo_fon
load_flags |= FT_LOAD_NO_BITMAP;
break;
}
-
+
/* disable hinting if requested */
switch (options->hint_style) {
case CAIRO_HINT_STYLE_NONE:
@@ -1396,7 +1396,7 @@ _get_options_load_flags (const cairo_fon
load_flags |= FT_LOAD_TARGET_NORMAL;
break;
}
-
+
return load_flags;
}
@@ -1416,7 +1416,7 @@ _cairo_ft_scaled_font_create (cairo_ft_u
face = _cairo_ft_unscaled_font_lock_face (unscaled);
if (!face)
return NULL;
-
+
scaled_font = malloc (sizeof(cairo_ft_scaled_font_t));
if (scaled_font == NULL) {
_cairo_ft_unscaled_font_unlock_face (unscaled);
@@ -1471,10 +1471,10 @@ _cairo_ft_scaled_font_create (cairo_ft_u
fs_metrics.max_x_advance = face->max_advance_width / scale;
}
-
+
/* FIXME: this doesn't do vertical layout atm. */
fs_metrics.max_y_advance = 0.0;
-
+
_cairo_scaled_font_set_metrics (&scaled_font->base, &fs_metrics);
return &scaled_font->base;
@@ -1548,7 +1548,7 @@ _cairo_ft_scaled_font_create_toy (cairo_
FcConfigSubstitute (NULL, pattern, FcMatchPattern);
cairo_ft_font_options_substitute (font_options, pattern);
FcDefaultSubstitute (pattern);
-
+
resolved = FcFontMatch (NULL, pattern, &result);
if (!resolved)
goto FREE_PATTERN;
@@ -1584,10 +1584,10 @@ static void
_cairo_ft_scaled_font_fini (void *abstract_font)
{
cairo_ft_scaled_font_t *scaled_font = abstract_font;
-
+
if (scaled_font == NULL)
return;
-
+
_cairo_unscaled_font_destroy (&scaled_font->unscaled->base);
}
@@ -1696,7 +1696,7 @@ _decompose_glyph_outline (FT_Face fac
DOUBLE_TO_16_16 (1.0), 0,
0, DOUBLE_TO_16_16 (-1.0),
};
-
+
FT_GlyphSlot glyph;
cairo_path_fixed_t *path;
@@ -1709,11 +1709,11 @@ _decompose_glyph_outline (FT_Face fac
/* Font glyphs have an inverted Y axis compared to cairo. */
FT_Outline_Transform (&glyph->outline, &invert_y);
FT_Outline_Decompose (&glyph->outline, &outline_funcs, path);
-
+
_cairo_path_fixed_close_path (path);
*pathp = path;
-
+
return CAIRO_STATUS_SUCCESS;
}
@@ -1739,16 +1739,16 @@ _cairo_ft_scaled_glyph_init (void *abs
if ((info & CAIRO_SCALED_GLYPH_INFO_PATH) != 0 &&
(info & CAIRO_SCALED_GLYPH_INFO_SURFACE) == 0)
load_flags |= FT_LOAD_NO_BITMAP;
-
+
error = FT_Load_Glyph (scaled_font->unscaled->face,
_cairo_scaled_glyph_index(scaled_glyph),
load_flags);
-
+
if (error) {
cairo_ft_scaled_font_unlock_face (abstract_font);
return CAIRO_STATUS_NO_MEMORY;
}
-
+
glyph = face->glyph;
#if HAVE_FT_GLYPHSLOT_EMBOLDEN
@@ -1758,23 +1758,23 @@ _cairo_ft_scaled_glyph_init (void *abs
if (scaled_font->ft_options.extra_flags & CAIRO_FT_OPTIONS_EMBOLDEN)
FT_GlyphSlot_Embolden (glyph);
#endif
-
+
if (info & CAIRO_SCALED_GLYPH_INFO_METRICS) {
/*
* Compute font-space metrics
*/
metrics = &glyph->metrics;
-
+
if (unscaled->x_scale == 0)
x_factor = 0;
else
x_factor = 1 / unscaled->x_scale;
-
+
if (unscaled->y_scale == 0)
y_factor = 0;
else
y_factor = 1 / unscaled->y_scale;
-
+
/*
* Note: the font's coordinate system is upside down from ours, so the
* Y coordinates of the bearing and advance need to be negated.
@@ -1785,27 +1785,27 @@ _cairo_ft_scaled_glyph_init (void *abs
* If we want hinted metrics but aren't asking for hinted glyphs from
* FreeType, then we need to do the metric hinting ourselves.
*/
-
+
if ((scaled_font->base.options.hint_metrics != CAIRO_HINT_METRICS_OFF) &&
(load_flags & FT_LOAD_NO_HINTING))
{
FT_Pos x1, x2;
FT_Pos y1, y2;
FT_Pos advance;
-
+
x1 = (metrics->horiBearingX) & -64;
x2 = (metrics->horiBearingX + metrics->width + 63) & -64;
y1 = (-metrics->horiBearingY) & -64;
y2 = (-metrics->horiBearingY + metrics->height + 63) & -64;
-
+
advance = ((metrics->horiAdvance + 32) & -64);
-
+
fs_metrics.x_bearing = DOUBLE_FROM_26_6 (x1) * x_factor;
fs_metrics.y_bearing = DOUBLE_FROM_26_6 (y1) * y_factor;
-
+
fs_metrics.width = DOUBLE_FROM_26_6 (x2 - x1) * x_factor;
fs_metrics.height = DOUBLE_FROM_26_6 (y2 - y1) * y_factor;
-
+
/*
* use untransformed advance values
* XXX uses horizontal advance only at present; should provide FT_LOAD_VERTICAL_LAYOUT
@@ -1815,19 +1815,19 @@ _cairo_ft_scaled_glyph_init (void *abs
} else {
fs_metrics.x_bearing = DOUBLE_FROM_26_6 (metrics->horiBearingX) * x_factor;
fs_metrics.y_bearing = DOUBLE_FROM_26_6 (-metrics->horiBearingY) * y_factor;
-
+
fs_metrics.width = DOUBLE_FROM_26_6 (metrics->width) * x_factor;
fs_metrics.height = DOUBLE_FROM_26_6 (metrics->height) * y_factor;
-
+
fs_metrics.x_advance = DOUBLE_FROM_26_6 (metrics->horiAdvance) * x_factor;
fs_metrics.y_advance = 0 * y_factor;
}
-
+
_cairo_scaled_glyph_set_metrics (scaled_glyph,
&scaled_font->base,
&fs_metrics);
}
-
+
if ((info & CAIRO_SCALED_GLYPH_INFO_SURFACE) != 0) {
cairo_image_surface_t *surface;
cairo_status_t status;
@@ -1845,11 +1845,11 @@ _cairo_ft_scaled_glyph_init (void *abs
&scaled_font->base,
surface);
}
-
+
if (info & CAIRO_SCALED_GLYPH_INFO_PATH) {
cairo_path_fixed_t *path;
cairo_status_t status;
-
+
/*
* A kludge -- the above code will trash the outline,
* so reload it. This will probably never occur though
@@ -1869,7 +1869,7 @@ _cairo_ft_scaled_glyph_init (void *abs
&path);
else
status = CAIRO_STATUS_NO_MEMORY;
-
+
if (status) {
cairo_ft_scaled_font_unlock_face (abstract_font);
return status;
@@ -1878,9 +1878,9 @@ _cairo_ft_scaled_glyph_init (void *abs
&scaled_font->base,
path);
}
-
+
cairo_ft_scaled_font_unlock_face (abstract_font);
-
+
return CAIRO_STATUS_SUCCESS;
}
@@ -1934,7 +1934,7 @@ static void
_cairo_ft_font_face_destroy (void *abstract_face)
{
cairo_ft_font_face_t *font_face = abstract_face;
-
+
cairo_ft_font_face_t *tmp_face = NULL;
cairo_ft_font_face_t *last_face = NULL;
@@ -1960,13 +1960,13 @@ _cairo_ft_font_face_destroy (void *abstr
font_face->unscaled->base.ref_count > 1)
{
cairo_font_face_reference (&font_face->base);
-
+
_cairo_unscaled_font_destroy (&font_face->unscaled->base);
font_face->unscaled = NULL;
-
+
return;
}
-
+
if (font_face->unscaled) {
/* Remove face from linked list */
for (tmp_face = font_face->unscaled->faces;
@@ -1979,7 +1979,7 @@ _cairo_ft_font_face_destroy (void *abstr
else
font_face->unscaled->faces = tmp_face->next;
}
-
+
last_face = tmp_face;
}
@@ -2007,7 +2007,7 @@ _cairo_ft_font_face_scaled_font_create (
* cairo_ft_font_options_substitute(), so *just* use those load
* flags and ignore the options.
*/
-
+
ft_options = font_face->ft_options;
if (font_face->unscaled->from_face)
ft_options.load_flags |= _get_options_load_flags (options);
@@ -2048,15 +2048,15 @@ _cairo_ft_font_face_create (cairo_ft_uns
font_face = malloc (sizeof (cairo_ft_font_face_t));
if (!font_face)
return NULL;
-
+
font_face->unscaled = unscaled;
_cairo_unscaled_font_reference (&unscaled->base);
-
+
font_face->ft_options = ft_options;
font_face->next = unscaled->faces;
unscaled->faces = font_face;
-
+
_cairo_font_face_init (&font_face->base, &_cairo_ft_font_face_backend);
return &font_face->base;
@@ -2094,7 +2094,7 @@ cairo_ft_font_options_substitute (const
if (FcPatternGet (pattern, FC_RGBA, 0, &v) == FcResultNoMatch)
{
int rgba;
-
+
if (options->antialias == CAIRO_ANTIALIAS_SUBPIXEL) {
switch (options->subpixel_order) {
case CAIRO_SUBPIXEL_ORDER_DEFAULT:
@@ -2115,7 +2115,7 @@ cairo_ft_font_options_substitute (const
} else {
rgba = FC_RGBA_NONE;
}
-
+
FcPatternAddInteger (pattern, FC_RGBA, rgba);
}
}
@@ -2144,7 +2144,7 @@ cairo_ft_font_options_substitute (const
hint_style = FC_HINT_FULL;
break;
}
-
+
FcPatternAddInteger (pattern, FC_HINT_STYLE, hint_style);
}
#endif
@@ -2243,7 +2243,7 @@ cairo_ft_font_face_create_for_ft_face (F
ft_options.load_flags = load_flags;
ft_options.extra_flags = 0;
-
+
font_face = _cairo_ft_font_face_create (unscaled, ft_options);
_cairo_unscaled_font_destroy (&unscaled->base);
@@ -2279,7 +2279,7 @@ cairo_ft_font_face_create_for_ft_face (F
* cairo_ft_unlock() after you are done. (These functions are not yet
* implemented, so this function cannot be currently safely used in a
* threaded application.)
-
+
* Return value: The #FT_Face object for @font, scaled appropriately,
* or %NULL if @scaled_font is in an error state (see
* cairo_scaled_font_status()) or there is insufficient memory.
@@ -2298,7 +2298,7 @@ cairo_ft_scaled_font_lock_face (cairo_sc
_cairo_scaled_font_set_error (&scaled_font->base, CAIRO_STATUS_NO_MEMORY);
return NULL;
}
-
+
_cairo_ft_unscaled_font_set_scale (scaled_font->unscaled,
&scaled_font->base.scale);
diff --git a/src/cairo-gstate-private.h b/src/cairo-gstate-private.h
index 8cbe238..2590048 100644
--- a/src/cairo-gstate-private.h
+++ b/src/cairo-gstate-private.h
@@ -40,7 +40,7 @@
struct _cairo_gstate {
cairo_operator_t op;
-
+
double tolerance;
cairo_antialias_t antialias;
diff --git a/src/cairo-gstate.c b/src/cairo-gstate.c
index 2d4c79f..68af94f 100644
--- a/src/cairo-gstate.c
+++ b/src/cairo-gstate.c
@@ -115,7 +115,7 @@ _cairo_gstate_init (cairo_gstate_t *gst
CAIRO_GSTATE_DEFAULT_FONT_SIZE);
_cairo_font_options_init_default (&gstate->font_options);
-
+
_cairo_clip_init (&gstate->clip, target);
gstate->target = cairo_surface_reference (target);
@@ -145,7 +145,7 @@ static cairo_status_t
_cairo_gstate_init_copy (cairo_gstate_t *gstate, cairo_gstate_t *other)
{
cairo_status_t status;
-
+
gstate->op = other->op;
gstate->tolerance = other->tolerance;
@@ -394,7 +394,7 @@ _cairo_gstate_set_source (cairo_gstate_t
cairo_pattern_destroy (gstate->source);
gstate->source = source;
gstate->source_ctm_inverse = gstate->ctm_inverse;
-
+
return CAIRO_STATUS_SUCCESS;
}
@@ -499,7 +499,7 @@ _cairo_gstate_set_dash (cairo_gstate_t *
if (gstate->stroke_style.dash)
free (gstate->stroke_style.dash);
-
+
gstate->stroke_style.num_dashes = num_dashes;
if (gstate->stroke_style.num_dashes == 0) {
@@ -515,7 +515,7 @@ _cairo_gstate_set_dash (cairo_gstate_t *
}
memcpy (gstate->stroke_style.dash, dash, gstate->stroke_style.num_dashes * sizeof (double));
-
+
dash_total = 0.0;
for (i = 0; i < gstate->stroke_style.num_dashes; i++) {
if (gstate->stroke_style.dash[i] < 0)
@@ -567,7 +567,7 @@ _cairo_gstate_translate (cairo_gstate_t
cairo_matrix_t tmp;
_cairo_gstate_unset_scaled_font (gstate);
-
+
cairo_matrix_init_translate (&tmp, tx, ty);
cairo_matrix_multiply (&gstate->ctm, &tmp, &gstate->ctm);
@@ -586,7 +586,7 @@ _cairo_gstate_scale (cairo_gstate_t *gst
return CAIRO_STATUS_INVALID_MATRIX;
_cairo_gstate_unset_scaled_font (gstate);
-
+
cairo_matrix_init_scale (&tmp, sx, sy);
cairo_matrix_multiply (&gstate->ctm, &tmp, &gstate->ctm);
@@ -602,7 +602,7 @@ _cairo_gstate_rotate (cairo_gstate_t *gs
cairo_matrix_t tmp;
_cairo_gstate_unset_scaled_font (gstate);
-
+
cairo_matrix_init_rotate (&tmp, angle);
cairo_matrix_multiply (&gstate->ctm, &tmp, &gstate->ctm);
@@ -619,7 +619,7 @@ _cairo_gstate_transform (cairo_gstate_t
cairo_matrix_t tmp;
_cairo_gstate_unset_scaled_font (gstate);
-
+
tmp = *matrix;
cairo_matrix_multiply (&gstate->ctm, &tmp, &gstate->ctm);
@@ -636,7 +636,7 @@ _cairo_gstate_set_matrix (cairo_gstate_t
cairo_status_t status;
_cairo_gstate_unset_scaled_font (gstate);
-
+
gstate->ctm = *matrix;
gstate->ctm_inverse = *matrix;
@@ -651,7 +651,7 @@ cairo_status_t
_cairo_gstate_identity_matrix (cairo_gstate_t *gstate)
{
_cairo_gstate_unset_scaled_font (gstate);
-
+
cairo_matrix_init_identity (&gstate->ctm);
cairo_matrix_init_identity (&gstate->ctm_inverse);
@@ -818,7 +818,7 @@ _cairo_operator_bounded_by_mask (cairo_o
case CAIRO_OPERATOR_DEST_ATOP:
return FALSE;
}
-
+
ASSERT_NOT_REACHED;
return FALSE;
}
@@ -858,7 +858,7 @@ _cairo_operator_bounded_by_source (cairo
case CAIRO_OPERATOR_DEST_ATOP:
return FALSE;
}
-
+
ASSERT_NOT_REACHED;
return FALSE;
}
@@ -923,7 +923,7 @@ _cairo_gstate_stroke (cairo_gstate_t *gs
gstate->antialias);
_cairo_pattern_fini (&source_pattern.base);
-
+
return status;
}
@@ -967,11 +967,11 @@ _cairo_gstate_fill (cairo_gstate_t *gsta
if (gstate->source->status)
return gstate->source->status;
-
+
status = _cairo_surface_set_clip (gstate->target, &gstate->clip);
if (status)
return status;
-
+
_cairo_gstate_copy_transformed_source (gstate, &pattern.base);
status = _cairo_surface_fill (gstate->target,
@@ -983,7 +983,7 @@ _cairo_gstate_fill (cairo_gstate_t *gsta
gstate->antialias);
_cairo_pattern_fini (&pattern.base);
-
+
return status;
}
@@ -1009,7 +1009,7 @@ _cairo_gstate_in_fill (cairo_gstate_t
goto BAIL;
*inside_ret = _cairo_traps_contain (&traps, x, y);
-
+
BAIL:
_cairo_traps_fini (&traps);
@@ -1053,9 +1053,9 @@ _cairo_gstate_stroke_extents (cairo_gsta
cairo_status_t status;
cairo_traps_t traps;
cairo_box_t extents;
-
+
_cairo_traps_init (&traps);
-
+
status = _cairo_path_fixed_stroke_to_traps (path,
&gstate->stroke_style,
&gstate->ctm,
@@ -1074,10 +1074,10 @@ _cairo_gstate_stroke_extents (cairo_gsta
_cairo_gstate_backend_to_user (gstate, x1, y1);
_cairo_gstate_backend_to_user (gstate, x2, y2);
-
+
BAIL:
_cairo_traps_fini (&traps);
-
+
return status;
}
@@ -1090,16 +1090,16 @@ _cairo_gstate_fill_extents (cairo_gstate
cairo_status_t status;
cairo_traps_t traps;
cairo_box_t extents;
-
+
_cairo_traps_init (&traps);
-
+
status = _cairo_path_fixed_fill_to_traps (path,
gstate->fill_rule,
gstate->tolerance,
&traps);
if (status)
goto BAIL;
-
+
_cairo_traps_extents (&traps, &extents);
*x1 = _cairo_fixed_to_double (extents.p1.x);
@@ -1109,10 +1109,10 @@ _cairo_gstate_fill_extents (cairo_gstate
_cairo_gstate_backend_to_user (gstate, x1, y1);
_cairo_gstate_backend_to_user (gstate, x2, y2);
-
+
BAIL:
_cairo_traps_fini (&traps);
-
+
return status;
}
@@ -1213,7 +1213,7 @@ _cairo_gstate_get_font_face (cairo_gstat
status = _cairo_gstate_ensure_font_face (gstate);
if (status)
return status;
-
+
*font_face = gstate->font_face;
return CAIRO_STATUS_SUCCESS;
@@ -1309,31 +1309,31 @@ _cairo_gstate_ensure_font_face (cairo_gs
else
gstate->font_face = font_face;
}
-
+
return CAIRO_STATUS_SUCCESS;
}
-
+
static cairo_status_t
_cairo_gstate_ensure_scaled_font (cairo_gstate_t *gstate)
{
cairo_status_t status;
cairo_font_options_t options;
-
+
if (gstate->scaled_font)
return CAIRO_STATUS_SUCCESS;
-
+
status = _cairo_gstate_ensure_font_face (gstate);
if (status)
return status;
cairo_surface_get_font_options (gstate->target, &options);
cairo_font_options_merge (&options, &gstate->font_options);
-
+
gstate->scaled_font = cairo_scaled_font_create (gstate->font_face,
&gstate->font_matrix,
&gstate->ctm,
&options);
-
+
if (!gstate->scaled_font)
return CAIRO_STATUS_NO_MEMORY;
@@ -1366,7 +1366,7 @@ _cairo_gstate_text_to_glyphs (cairo_gsta
status = _cairo_gstate_ensure_scaled_font (gstate);
if (status)
return status;
-
+
status = _cairo_scaled_font_text_to_glyphs (gstate->scaled_font, x, y,
utf8, glyphs, num_glyphs);
@@ -1382,14 +1382,14 @@ _cairo_gstate_set_font_face (cairo_gstat
{
if (font_face && font_face->status)
return font_face->status;
-
+
if (font_face != gstate->font_face) {
cairo_font_face_destroy (gstate->font_face);
gstate->font_face = cairo_font_face_reference (font_face);
}
_cairo_gstate_unset_scaled_font (gstate);
-
+
return CAIRO_STATUS_SUCCESS;
}
@@ -1436,7 +1436,7 @@ _cairo_gstate_show_glyphs (cairo_gstate_
transformed_glyphs = malloc (num_glyphs * sizeof(cairo_glyph_t));
if (transformed_glyphs == NULL)
return CAIRO_STATUS_NO_MEMORY;
-
+
for (i = 0; i < num_glyphs; ++i)
{
transformed_glyphs[i] = glyphs[i];
@@ -1473,11 +1473,11 @@ _cairo_gstate_glyph_path (cairo_gstate_t
status = _cairo_gstate_ensure_scaled_font (gstate);
if (status)
return status;
-
+
transformed_glyphs = malloc (num_glyphs * sizeof(cairo_glyph_t));
if (transformed_glyphs == NULL)
return CAIRO_STATUS_NO_MEMORY;
-
+
for (i = 0; i < num_glyphs; ++i)
{
transformed_glyphs[i] = glyphs[i];
diff --git a/src/cairo-hash.c b/src/cairo-hash.c
index bfaac57..72b20b1 100644
--- a/src/cairo-hash.c
+++ b/src/cairo-hash.c
@@ -196,7 +196,7 @@ _cairo_hash_table_destroy (cairo_hash_ta
assert (hash_table->live_entries == 0);
/* No iterators can be running. Otherwise, halt. */
assert (hash_table->iterating == 0);
-
+
free (hash_table->entries);
hash_table->entries = NULL;
@@ -234,7 +234,7 @@ _cairo_hash_table_lookup_internal (cairo
{
cairo_hash_entry_t **entry, **first_available = NULL;
unsigned long table_size, i, idx, step;
-
+
table_size = hash_table->arrangement->size;
idx = key->hash % table_size;
@@ -330,7 +330,7 @@ _cairo_hash_table_resize (cairo_hash_ta
tmp.entries = calloc (new_size, sizeof (cairo_hash_entry_t*));
if (tmp.entries == NULL)
return CAIRO_STATUS_NO_MEMORY;
-
+
for (i = 0; i < hash_table->arrangement->size; ++i) {
if (ENTRY_IS_LIVE (hash_table->entries[i])) {
entry = _cairo_hash_table_lookup_internal (&tmp,
@@ -464,13 +464,13 @@ _cairo_hash_table_insert (cairo_hash_tab
{
cairo_status_t status;
cairo_hash_entry_t **entry;
-
+
/* Insert is illegal while an iterator is running. */
assert (hash_table->iterating == 0);
-
+
entry = _cairo_hash_table_lookup_internal (hash_table,
key_and_value, FALSE);
-
+
if (ENTRY_IS_LIVE(*entry))
{
/* User is being bad, let's crash. */
@@ -549,7 +549,7 @@ _cairo_hash_table_foreach (cairo_hash_ta
if (hash_table == NULL)
return;
-
+
/* Mark the table for iteration */
++hash_table->iterating;
for (i = 0; i < hash_table->arrangement->size; i++) {
diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
index b5010c5..82a2227 100644
--- a/src/cairo-image-surface.c
+++ b/src/cairo-image-surface.c
@@ -295,7 +295,7 @@ cairo_image_surface_create_for_data (uns
_cairo_error (CAIRO_STATUS_NO_MEMORY);
return (cairo_surface_t*) &_cairo_surface_nil;
}
-
+
pixman_image = pixman_image_create_for_data ((pixman_bits_t *) data, pixman_format,
width, height,
_cairo_format_bpp (format),
@@ -515,7 +515,7 @@ _cairo_image_surface_acquire_source_imag
{
*image_out = abstract_surface;
*image_extra = NULL;
-
+
return CAIRO_STATUS_SUCCESS;
}
@@ -534,7 +534,7 @@ _cairo_image_surface_acquire_dest_image
void **image_extra)
{
cairo_image_surface_t *surface = abstract_surface;
-
+
image_rect_out->x = 0;
image_rect_out->y = 0;
image_rect_out->width = surface->width;
@@ -542,7 +542,7 @@ _cairo_image_surface_acquire_dest_image
*image_out = surface;
*image_extra = NULL;
-
+
return CAIRO_STATUS_SUCCESS;
}
@@ -567,7 +567,7 @@ _cairo_image_surface_clone_similar (void
return CAIRO_STATUS_SUCCESS;
}
-
+
return CAIRO_INT_STATUS_UNSUPPORTED;
}
@@ -619,7 +619,7 @@ _cairo_image_surface_set_attributes (cai
cairo_surface_attributes_t *attributes)
{
cairo_int_status_t status;
-
+
status = _cairo_image_surface_set_matrix (surface, &attributes->matrix);
if (status)
return status;
@@ -638,9 +638,9 @@ _cairo_image_surface_set_attributes (cai
pixman_image_set_repeat (surface->pixman_image, PIXMAN_REPEAT_PAD);
break;
}
-
+
status = _cairo_image_surface_set_filter (surface, attributes->filter);
-
+
return status;
}
@@ -719,7 +719,7 @@ _cairo_image_surface_composite (cairo_op
&src_attr, &mask_attr);
if (status)
return status;
-
+
status = _cairo_image_surface_set_attributes (src, &src_attr);
if (status)
goto CLEANUP_SURFACES;
@@ -729,7 +729,7 @@ _cairo_image_surface_composite (cairo_op
status = _cairo_image_surface_set_attributes (mask, &mask_attr);
if (status)
goto CLEANUP_SURFACES;
-
+
pixman_composite (_pixman_operator (op),
src->pixman_image,
mask->pixman_image,
@@ -753,7 +753,7 @@ _cairo_image_surface_composite (cairo_op
dst_x, dst_y,
width, height);
}
-
+
if (!_cairo_operator_bounded_by_source (op))
status = _cairo_surface_composite_fixup_unbounded (&dst->base,
&src_attr, src->width, src->height,
@@ -767,9 +767,9 @@ _cairo_image_surface_composite (cairo_op
CLEANUP_SURFACES:
if (mask)
_cairo_pattern_release_surface (mask_pattern, &mask->base, &mask_attr);
-
+
_cairo_pattern_release_surface (src_pattern, &src->base, &src_attr);
-
+
return status;
}
@@ -800,7 +800,7 @@ static cairo_bool_t
_cairo_image_surface_is_alpha_only (cairo_image_surface_t *surface)
{
int bpp, alpha, red, green, blue;
-
+
if (surface->format != (cairo_format_t) -1)
return surface->format == CAIRO_FORMAT_A1 || surface->format == CAIRO_FORMAT_A8;
diff --git a/src/cairo-lzw.c b/src/cairo-lzw.c
index 3ffaa02..d8776db 100644
--- a/src/cairo-lzw.c
+++ b/src/cairo-lzw.c
@@ -335,7 +335,7 @@ _cairo_lzw_compress (unsigned char *data
_lzw_buf_init (&buf, *size_in_out);
_lzw_symbol_table_init (&table);
-
+
/* The LZW header is a clear table code. */
_lzw_buf_store_bits (&buf, LZW_CODE_CLEAR_TABLE, code_bits);
diff --git a/src/cairo-matrix.c b/src/cairo-matrix.c
index 83e297a..eda62e7 100644
--- a/src/cairo-matrix.c
+++ b/src/cairo-matrix.c
@@ -460,7 +460,7 @@ cairo_matrix_invert (cairo_matrix_t *mat
double det;
_cairo_matrix_compute_determinant (matrix, &det);
-
+
if (det == 0)
return CAIRO_STATUS_INVALID_MATRIX;
@@ -501,7 +501,7 @@ _cairo_matrix_compute_scale_factors (con
double x = x_major != 0;
double y = x == 0;
double major, minor;
-
+
cairo_matrix_transform_distance (matrix, &x, &y);
major = sqrt(x*x + y*y);
/*
@@ -561,105 +561,105 @@ _cairo_matrix_is_integer_translation(con
The following is a derivation of a formula to calculate the length of the
major axis for this ellipse; this is useful for error bounds calculations.
-
+
Thanks to Walter Brisken <wbrisken at aoc.nrao.edu> for this derivation:
-
+
1. First some notation:
-
+
All capital letters represent vectors in two dimensions. A prime '
represents a transformed coordinate. Matrices are written in underlined
form, ie _R_. Lowercase letters represent scalar real values.
-
+
2. The question has been posed: What is the maximum expansion factor
achieved by the linear transformation
-
+
X' = X _R_
-
+
where _R_ is a real-valued 2x2 matrix with entries:
-
+
_R_ = [a b]
[c d] .
-
+
In other words, what is the maximum radius, MAX[ |X'| ], reached for any
X on the unit circle ( |X| = 1 ) ?
-
-
+
+
3. Some useful formulae
-
+
(A) through (C) below are standard double-angle formulae. (D) is a lesser
known result and is derived below:
-
+
(A) sin²(θ) = (1 - cos(2*θ))/2
(B) cos²(θ) = (1 + cos(2*θ))/2
(C) sin(θ)*cos(θ) = sin(2*θ)/2
(D) MAX[a*cos(θ) + b*sin(θ)] = sqrt(a² + b²)
-
+
Proof of (D):
-
+
find the maximum of the function by setting the derivative to zero:
-
+
-a*sin(θ)+b*cos(θ) = 0
-
+
From this it follows that
-
+
tan(θ) = b/a
-
+
and hence
-
+
sin(θ) = b/sqrt(a² + b²)
-
+
and
-
+
cos(θ) = a/sqrt(a² + b²)
-
+
Thus the maximum value is
-
+
MAX[a*cos(θ) + b*sin(θ)] = (a² + b²)/sqrt(a² + b²)
= sqrt(a² + b²)
-
-
+
+
4. Derivation of maximum expansion
-
+
To find MAX[ |X'| ] we search brute force method using calculus. The unit
circle on which X is constrained is to be parameterized by t:
-
+
X(θ) = (cos(θ), sin(θ))
-
+
Thus
-
+
X'(θ) = X(θ) * _R_ = (cos(θ), sin(θ)) * [a b]
[c d]
= (a*cos(θ) + c*sin(θ), b*cos(θ) + d*sin(θ)).
-
+
Define
-
+
r(θ) = |X'(θ)|
-
+
Thus
-
+
r²(θ) = (a*cos(θ) + c*sin(θ))² + (b*cos(θ) + d*sin(θ))²
= (a² + b²)*cos²(θ) + (c² + d²)*sin²(θ)
+ 2*(a*c + b*d)*cos(θ)*sin(θ)
-
+
Now apply the double angle formulae (A) to (C) from above:
-
+
r²(θ) = (a² + b² + c² + d²)/2
+ (a² + b² - c² - d²)*cos(2*θ)/2
+ (a*c + b*d)*sin(2*θ)
= f + g*cos(Ï) + h*sin(Ï)
-
+
Where
-
+
f = (a² + b² + c² + d²)/2
g = (a² + b² - c² - d²)/2
h = (a*c + d*d)
Ï = 2*θ
-
+
It is clear that MAX[ |X'| ] = sqrt(MAX[ r² ]). Here we determine MAX[ r² ]
using (D) from above:
-
+
MAX[ r² ] = f + sqrt(g² + h²)
-
+
And finally
MAX[ |X'| ] = sqrt( f + sqrt(g² + h²) )
diff --git a/src/cairo-meta-surface.c b/src/cairo-meta-surface.c
index 46ea13d..26fc6a6 100644
--- a/src/cairo-meta-surface.c
+++ b/src/cairo-meta-surface.c
@@ -128,7 +128,7 @@ _cairo_meta_surface_finish (void *abstra
_cairo_pattern_fini (&command->mask.mask.base);
free (command);
break;
-
+
case CAIRO_COMMAND_STROKE:
_cairo_pattern_fini (&command->stroke.source.base);
_cairo_path_fixed_fini (&command->stroke.path);
@@ -246,7 +246,7 @@ _cairo_meta_surface_paint (void *abstr
status = _init_pattern_with_snapshot (&command->source.base, source);
if (status)
goto CLEANUP_COMMAND;
-
+
status = _cairo_array_append (&meta->commands, &command);
if (status)
goto CLEANUP_SOURCE;
@@ -284,7 +284,7 @@ _cairo_meta_surface_mask (void *abstra
status = _init_pattern_with_snapshot (&command->mask.base, mask);
if (status)
goto CLEANUP_SOURCE;
-
+
status = _cairo_array_append (&meta->commands, &command);
if (status)
goto CLEANUP_MASK;
@@ -314,7 +314,7 @@ _cairo_meta_surface_stroke (void *abst
cairo_status_t status;
cairo_meta_surface_t *meta = abstract_surface;
cairo_command_stroke_t *command;
-
+
command = malloc (sizeof (cairo_command_stroke_t));
if (command == NULL)
return CAIRO_STATUS_NO_MEMORY;
@@ -598,7 +598,7 @@ static const cairo_surface_backend_t cai
/* Here are the 5 basic drawing operations, (which are in some
* sense the only things that cairo_meta_surface should need to
* implement). */
-
+
_cairo_meta_surface_paint,
_cairo_meta_surface_mask,
_cairo_meta_surface_stroke,
diff --git a/src/cairo-operator.c b/src/cairo-operator.c
index 99c3aaa..1a3c3d1 100644
--- a/src/cairo-operator.c
+++ b/src/cairo-operator.c
@@ -56,7 +56,7 @@ _cairo_operator_always_opaque (cairo_ope
case CAIRO_OPERATOR_SOURCE:
return FALSE;
-
+
case CAIRO_OPERATOR_OVER:
case CAIRO_OPERATOR_IN:
case CAIRO_OPERATOR_OUT:
@@ -65,7 +65,7 @@ _cairo_operator_always_opaque (cairo_ope
case CAIRO_OPERATOR_DEST:
return TRUE;
-
+
case CAIRO_OPERATOR_DEST_OVER:
case CAIRO_OPERATOR_DEST_IN:
case CAIRO_OPERATOR_DEST_OUT:
@@ -94,7 +94,7 @@ _cairo_operator_always_translucent (cair
case CAIRO_OPERATOR_SOURCE:
return FALSE;
-
+
case CAIRO_OPERATOR_OVER:
case CAIRO_OPERATOR_IN:
case CAIRO_OPERATOR_OUT:
@@ -103,7 +103,7 @@ _cairo_operator_always_translucent (cair
case CAIRO_OPERATOR_DEST:
return FALSE;
-
+
case CAIRO_OPERATOR_DEST_OVER:
case CAIRO_OPERATOR_DEST_IN:
case CAIRO_OPERATOR_DEST_OUT:
diff --git a/src/cairo-output-stream.c b/src/cairo-output-stream.c
index de92fa4..b27c943 100644
--- a/src/cairo-output-stream.c
+++ b/src/cairo-output-stream.c
@@ -180,20 +180,20 @@ _cairo_dtostr (char *buffer, size_t size
int decimal_len;
snprintf (buffer, size, "%f", d);
-
+
locale_data = localeconv ();
decimal_point = locale_data->decimal_point;
decimal_point_len = strlen (decimal_point);
-
+
assert (decimal_point_len != 0);
p = buffer;
-
+
if (*p == '+' || *p == '-')
p++;
while (isdigit (*p))
p++;
-
+
if (strncmp (p, decimal_point, decimal_point_len) == 0) {
*p = '.';
decimal_len = strlen (p + decimal_point_len);
@@ -209,7 +209,7 @@ _cairo_dtostr (char *buffer, size_t size
p--;
}
}
-
+
return p + 1 - buffer;
}
@@ -298,7 +298,7 @@ _cairo_output_stream_vprintf (cairo_outp
p = buffer + strlen (buffer);
f++;
}
-
+
_cairo_output_stream_write (stream, buffer, p - buffer);
}
@@ -385,6 +385,6 @@ _cairo_output_stream_create_for_filename
file = fopen (filename, "wb");
if (file == NULL)
return (cairo_output_stream_t *) &cairo_output_stream_nil_write_error;
-
+
return _cairo_output_stream_create (stdio_write, stdio_close, file);
}
diff --git a/src/cairo-paginated-surface.c b/src/cairo-paginated-surface.c
index d4caafe..ed00cb8 100644
--- a/src/cairo-paginated-surface.c
+++ b/src/cairo-paginated-surface.c
@@ -159,7 +159,7 @@ _cairo_paginated_surface_finish (void *a
cairo_surface_destroy (surface->meta);
cairo_surface_destroy (surface->target);
-
+
return CAIRO_STATUS_SUCCESS;
}
@@ -177,7 +177,7 @@ _cairo_paginated_surface_acquire_source_
image = _cairo_image_surface_create_with_content (surface->content,
extents.width,
extents.height);
-
+
_cairo_meta_surface_replay (surface->meta, image);
*image_out = (cairo_image_surface_t*) image;
@@ -214,7 +214,7 @@ _paint_page (cairo_paginated_surface_t *
cairo_surface_destroy (analysis);
return status;
}
-
+
if (_cairo_analysis_surface_has_unsupported (analysis))
{
image = _cairo_image_surface_create_with_content (surface->content,
@@ -237,7 +237,7 @@ _paint_page (cairo_paginated_surface_t *
}
cairo_surface_destroy (analysis);
-
+
return CAIRO_STATUS_SUCCESS;
}
diff --git a/src/cairo-path-bounds.c b/src/cairo-path-bounds.c
index 670036c..48b4393 100644
--- a/src/cairo-path-bounds.c
+++ b/src/cairo-path-bounds.c
@@ -87,13 +87,13 @@ _cairo_path_bounder_add_point (cairo_pat
if (bounder->has_point) {
if (point->x < bounder->min_x)
bounder->min_x = point->x;
-
+
if (point->y < bounder->min_y)
bounder->min_y = point->y;
-
+
if (point->x > bounder->max_x)
bounder->max_x = point->x;
-
+
if (point->y > bounder->max_y)
bounder->max_y = point->y;
} else {
@@ -104,7 +104,7 @@ _cairo_path_bounder_add_point (cairo_pat
bounder->has_point = 1;
}
-
+
return CAIRO_STATUS_SUCCESS;
}
diff --git a/src/cairo-path-fill.c b/src/cairo-path-fill.c
index 31b83ad..f9b9d9f 100644
--- a/src/cairo-path-fill.c
+++ b/src/cairo-path-fill.c
@@ -94,7 +94,7 @@ _cairo_filler_move_to (void *closure, ca
status = _cairo_polygon_close (polygon);
if (status)
return status;
-
+
status = _cairo_polygon_move_to (polygon, point);
if (status)
return status;
diff --git a/src/cairo-path-stroke.c b/src/cairo-path-stroke.c
index 7ca6ab8..80302f0 100644
--- a/src/cairo-path-stroke.c
+++ b/src/cairo-path-stroke.c
@@ -161,7 +161,7 @@ _cairo_stroker_init (cairo_stroker_t *s
_cairo_pen_init (&stroker->pen,
stroke_style->line_width / 2.0,
tolerance, ctm);
-
+
stroker->has_current_face = FALSE;
stroker->has_first_face = FALSE;
@@ -307,14 +307,14 @@ _cairo_stroker_join (cairo_stroker_t *st
dx1 = in->usr_vector.x;
dy1 = in->usr_vector.y;
cairo_matrix_transform_distance (stroker->ctm, &dx1, &dy1);
-
+
/* outer point of outgoing line face */
x2 = _cairo_fixed_to_double (outpt->x);
y2 = _cairo_fixed_to_double (outpt->y);
dx2 = out->usr_vector.x;
dy2 = out->usr_vector.y;
cairo_matrix_transform_distance (stroker->ctm, &dx2, &dy2);
-
+
/*
* Compute the location of the outer corner of the miter.
* That's pretty easy -- just the intersection of the two
@@ -329,7 +329,7 @@ _cairo_stroker_join (cairo_stroker_t *st
mx = (my - y1) * dx1 / dy1 + x1;
else
mx = (my - y2) * dx2 / dy2 + x2;
-
+
/*
* Draw the quadrilateral
*/
@@ -368,7 +368,7 @@ _cairo_stroker_add_cap (cairo_stroker_t
if (stroker->style->line_cap == CAIRO_LINE_CAP_BUTT)
return CAIRO_STATUS_SUCCESS;
-
+
switch (stroker->style->line_cap) {
case CAIRO_LINE_CAP_ROUND: {
int i;
@@ -644,7 +644,7 @@ _cairo_stroker_line_to (void *closure, c
}
_cairo_slope_init (&slope, p1, p2);
-
+
status = _cairo_stroker_add_sub_edge (stroker, p1, p2, &slope, &start, &end);
if (status)
return status;
@@ -827,7 +827,7 @@ _cairo_stroker_curve_to (void *closure,
}
stroker->current_face = end;
stroker->has_current_face = 1;
-
+
extra_points[0] = start.cw;
extra_points[0].x -= start.point.x;
extra_points[0].y -= start.point.y;
@@ -840,7 +840,7 @@ _cairo_stroker_curve_to (void *closure,
extra_points[3] = end.ccw;
extra_points[3].x -= end.point.x;
extra_points[3].y -= end.point.y;
-
+
status = _cairo_pen_add_points (&pen, extra_points, 4);
if (status)
goto CLEANUP_PEN;
diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c
index 034598f..6e98be1 100644
--- a/src/cairo-pattern.c
+++ b/src/cairo-pattern.c
@@ -135,14 +135,14 @@ _cairo_gradient_pattern_init_copy (cairo
{
cairo_linear_pattern_t *dst = (cairo_linear_pattern_t *) pattern;
cairo_linear_pattern_t *src = (cairo_linear_pattern_t *) other;
-
+
*dst = *src;
}
else
{
cairo_radial_pattern_t *dst = (cairo_radial_pattern_t *) pattern;
cairo_radial_pattern_t *src = (cairo_radial_pattern_t *) other;
-
+
*dst = *src;
}
@@ -154,7 +154,7 @@ _cairo_gradient_pattern_init_copy (cairo
_cairo_pattern_set_error (&pattern->base, CAIRO_STATUS_NO_MEMORY);
return;
}
-
+
memcpy (pattern->stops, other->stops,
other->n_stops * sizeof (pixman_gradient_stop_t));
}
@@ -179,7 +179,7 @@ _cairo_pattern_init_copy (cairo_pattern_
case CAIRO_PATTERN_TYPE_SURFACE: {
cairo_surface_pattern_t *dst = (cairo_surface_pattern_t *) pattern;
cairo_surface_pattern_t *src = (cairo_surface_pattern_t *) other;
-
+
*dst = *src;
cairo_surface_reference (dst->surface);
} break;
@@ -187,11 +187,11 @@ _cairo_pattern_init_copy (cairo_pattern_
case CAIRO_PATTERN_TYPE_RADIAL: {
cairo_gradient_pattern_t *dst = (cairo_gradient_pattern_t *) pattern;
cairo_gradient_pattern_t *src = (cairo_gradient_pattern_t *) other;
-
+
_cairo_gradient_pattern_init_copy (dst, src);
} break;
}
-
+
pattern->ref_count = 1;
}
@@ -204,14 +204,14 @@ _cairo_pattern_fini (cairo_pattern_t *pa
case CAIRO_PATTERN_TYPE_SURFACE: {
cairo_surface_pattern_t *surface_pattern =
(cairo_surface_pattern_t *) pattern;
-
+
cairo_surface_destroy (surface_pattern->surface);
} break;
case CAIRO_PATTERN_TYPE_LINEAR:
case CAIRO_PATTERN_TYPE_RADIAL: {
cairo_gradient_pattern_t *gradient =
(cairo_gradient_pattern_t *) pattern;
-
+
if (gradient->stops)
free (gradient->stops);
} break;
@@ -238,7 +238,7 @@ _cairo_pattern_init_for_surface (cairo_s
}
_cairo_pattern_init (&pattern->base, CAIRO_PATTERN_TYPE_SURFACE);
-
+
pattern->surface = cairo_surface_reference (surface);
}
@@ -486,7 +486,7 @@ cairo_pattern_create_radial (double cx0,
double cx1, double cy1, double radius1)
{
cairo_radial_pattern_t *pattern;
-
+
pattern = malloc (sizeof (cairo_radial_pattern_t));
if (pattern == NULL) {
_cairo_error (CAIRO_STATUS_NO_MEMORY);
@@ -874,7 +874,7 @@ _cairo_linear_pattern_classify (cairo_li
/* transform fragment into pattern space */
double qx = a * qx_device + c * qy_device + tx;
double qy = b * qx_device + d * qy_device + ty;
-
+
factors[i] = _cairo_fixed_from_double (((dx * qx + dy * qy) - start) * scale);
}
@@ -1046,7 +1046,7 @@ _cairo_pattern_acquire_surface_for_solid
attribs->extend = CAIRO_EXTEND_REPEAT;
attribs->filter = CAIRO_FILTER_NEAREST;
attribs->acquired = FALSE;
-
+
return CAIRO_STATUS_SUCCESS;
}
@@ -1078,7 +1078,7 @@ static cairo_bool_t
_gradient_is_opaque (const cairo_gradient_pattern_t *gradient)
{
int i;
-
+
for (i = 0; i < gradient->n_stops; i++)
if (! CAIRO_ALPHA_IS_OPAQUE (gradient->stops[i].color.alpha))
return FALSE;
@@ -1129,11 +1129,11 @@ _cairo_pattern_acquire_surface_for_surfa
int tx, ty;
attr->acquired = FALSE;
-
+
if (_cairo_surface_is_image (dst))
{
cairo_image_surface_t *image;
-
+
status = _cairo_surface_acquire_source_image (pattern->surface,
&image,
&attr->extra);
@@ -1147,7 +1147,7 @@ _cairo_pattern_acquire_surface_for_surfa
{
status = _cairo_surface_clone_similar (dst, pattern->surface, out);
}
-
+
attr->extend = pattern->base.extend;
attr->filter = pattern->base.filter;
if (_cairo_matrix_is_integer_translation (&pattern->base.matrix,
@@ -1163,7 +1163,7 @@ _cairo_pattern_acquire_surface_for_surfa
attr->matrix = pattern->base.matrix;
attr->x_offset = attr->y_offset = 0;
}
-
+
return status;
}
@@ -1195,7 +1195,7 @@ _cairo_pattern_acquire_surface (cairo_pa
cairo_surface_attributes_t *attributes)
{
cairo_status_t status;
-
+
if (pattern->status) {
*surface_out = NULL;
attributes->acquired = FALSE;
@@ -1205,7 +1205,7 @@ _cairo_pattern_acquire_surface (cairo_pa
switch (pattern->type) {
case CAIRO_PATTERN_TYPE_SOLID: {
cairo_solid_pattern_t *src = (cairo_solid_pattern_t *) pattern;
-
+
status = _cairo_pattern_acquire_surface_for_solid (src, dst,
x, y, width, height,
surface_out,
@@ -1257,7 +1257,7 @@ _cairo_pattern_acquire_surface (cairo_pa
} break;
case CAIRO_PATTERN_TYPE_SURFACE: {
cairo_surface_pattern_t *src = (cairo_surface_pattern_t *) pattern;
-
+
status = _cairo_pattern_acquire_surface_for_surface (src, dst,
x, y, width, height,
surface_out,
@@ -1365,12 +1365,12 @@ _cairo_pattern_acquire_surfaces (cairo_p
}
_cairo_pattern_init_copy (&mask_tmp.base, mask);
-
+
status = _cairo_pattern_acquire_surface (&mask_tmp.base, dst,
mask_x, mask_y,
width, height,
mask_out, mask_attributes);
-
+
if (status)
_cairo_pattern_release_surface (&src_tmp.base,
*src_out, src_attributes);
diff --git a/src/cairo-pen.c b/src/cairo-pen.c
index a2cd55d..91a6f44 100644
--- a/src/cairo-pen.c
+++ b/src/cairo-pen.c
@@ -79,7 +79,7 @@ _cairo_pen_init (cairo_pen_t *pen,
pen->num_vertices = _cairo_pen_vertices_needed (tolerance,
radius,
ctm);
-
+
pen->vertices = malloc (pen->num_vertices * sizeof (cairo_pen_vertex_t));
if (pen->vertices == NULL) {
return CAIRO_STATUS_NO_MEMORY;
@@ -252,21 +252,21 @@ _cairo_pen_vertices_needed (double t
* compute major axis length for a pen with the specified radius.
* we don't need the minor axis length.
*/
-
+
double major_axis = _cairo_matrix_transformed_circle_major_axis(matrix, radius);
/*
* compute number of vertices needed
*/
int num_vertices;
-
+
/* Where tolerance / M is > 1, we use 4 points */
if (tolerance >= major_axis) {
num_vertices = 4;
} else {
double delta = acos (1 - tolerance / major_axis);
num_vertices = ceil (M_PI / delta);
-
+
/* number of vertices must be even */
if (num_vertices % 2)
num_vertices++;
@@ -443,6 +443,6 @@ _cairo_pen_stroke_spline (cairo_pen_t *
_cairo_polygon_close (&polygon);
_cairo_traps_tessellate_polygon (traps, &polygon, CAIRO_FILL_RULE_WINDING);
_cairo_polygon_fini (&polygon);
-
+
return CAIRO_STATUS_SUCCESS;
}
diff --git a/src/cairo-png.c b/src/cairo-png.c
index f0aaebe..1c3caef 100644
--- a/src/cairo-png.c
+++ b/src/cairo-png.c
@@ -74,7 +74,7 @@ convert_data_to_bytes (png_structp png,
uint32_t pixel;
memcpy (&pixel, b, sizeof (uint32_t));
-
+
b[0] = (pixel & 0xff0000) >> 16;
b[1] = (pixel & 0x00ff00) >> 8;
b[2] = (pixel & 0x0000ff) >> 0;
@@ -133,7 +133,7 @@ write_png (cairo_surface_t *surface,
status = CAIRO_STATUS_NO_MEMORY;
goto BAIL3;
}
-
+
png_set_write_fn (png, closure, write_func, NULL);
switch (image->format) {
@@ -179,14 +179,14 @@ write_png (cairo_surface_t *surface,
* that is needed for the write transformation functions to work.
*/
png_write_info (png, info);
-
+
if (image->format == CAIRO_FORMAT_ARGB32)
png_set_write_user_transform_fn (png, unpremultiply_data);
else if (image->format == CAIRO_FORMAT_RGB24)
png_set_write_user_transform_fn (png, convert_data_to_bytes);
if (image->format == CAIRO_FORMAT_RGB24)
png_set_filler (png, 0, PNG_FILLER_AFTER);
-
+
png_write_image (png, rows);
png_write_end (png, info);
@@ -235,7 +235,7 @@ cairo_surface_write_to_png (cairo_surfac
fp = fopen (filename, "wb");
if (fp == NULL)
return CAIRO_STATUS_WRITE_ERROR;
-
+
status = write_png (surface, stdio_write_func, fp);
if (fclose (fp) && status == CAIRO_STATUS_SUCCESS)
@@ -481,7 +481,7 @@ cairo_image_surface_create_from_png (con
return (cairo_surface_t*) &_cairo_surface_nil_read_error;
}
}
-
+
surface = read_png (stdio_read_func, fp);
fclose (fp);
diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 1a48c91..418e2a5 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -81,7 +81,7 @@ typedef struct cairo_ps_surface {
cairo_array_t dsc_page_setup_comments;
cairo_array_t *dsc_comment_target;
-
+
} cairo_ps_surface_t;
#define PS_SURFACE_DPI_DEFAULT 300.0
@@ -96,7 +96,7 @@ _cairo_ps_surface_path_move_to (void *cl
"%f %f moveto ",
_cairo_fixed_to_double (point->x),
_cairo_fixed_to_double (point->y));
-
+
return CAIRO_STATUS_SUCCESS;
}
@@ -129,7 +129,7 @@ _cairo_ps_surface_path_curve_to (void
_cairo_fixed_to_double (c->y),
_cairo_fixed_to_double (d->x),
_cairo_fixed_to_double (d->y));
-
+
return CAIRO_STATUS_SUCCESS;
}
@@ -137,7 +137,7 @@ static cairo_status_t
_cairo_ps_surface_path_close_path (void *closure)
{
cairo_output_stream_t *output_stream = closure;
-
+
_cairo_output_stream_printf (output_stream,
"closepath\n");
@@ -251,7 +251,7 @@ _cairo_ps_surface_emit_glyph (cairo_ps_s
-_cairo_fixed_to_double (scaled_glyph->bbox.p2.y),
_cairo_fixed_to_double (scaled_glyph->bbox.p2.x),
-_cairo_fixed_to_double (scaled_glyph->bbox.p1.y));
-
+
status = _cairo_path_fixed_interpret (scaled_glyph->path,
CAIRO_DIRECTION_FORWARD,
_cairo_ps_surface_path_move_to,
@@ -259,10 +259,10 @@ _cairo_ps_surface_emit_glyph (cairo_ps_s
_cairo_ps_surface_path_curve_to,
_cairo_ps_surface_path_close_path,
surface->final_stream);
-
+
_cairo_output_stream_printf (surface->final_stream,
"F\n");
-
+
_cairo_output_stream_printf (surface->final_stream,
"\t\t}\n");
}
@@ -326,7 +326,7 @@ _cairo_ps_surface_emit_body (cairo_ps_su
{
char buf[4096];
int n;
-
+
rewind (surface->tmpfile);
while ((n = fread (buf, 1, sizeof (buf), surface->tmpfile)) > 0)
_cairo_output_stream_write (surface->final_stream, buf, n);
@@ -915,9 +915,9 @@ _cairo_ps_surface_finish (void *abstract
word_wrap = _word_wrap_stream_create (final_stream, 79);
surface->final_stream = word_wrap;
-
+
_cairo_ps_surface_emit_header (surface);
-
+
_cairo_ps_surface_emit_font_subsets (surface);
_cairo_ps_surface_emit_body (surface);
@@ -1065,7 +1065,7 @@ pattern_supported (const cairo_pattern_t
if (pattern->type == CAIRO_PATTERN_TYPE_SURFACE)
return surface_pattern_supported ((const cairo_surface_pattern_t *) pattern);
-
+
return FALSE;
}
@@ -1242,9 +1242,9 @@ emit_image (cairo_ps_surface_t *surfa
status = CAIRO_STATUS_NO_MEMORY;
goto bail0;
}
-
+
_cairo_pattern_init_for_surface (&pattern.surface, &image->base);
-
+
_cairo_surface_fill_rectangle (opaque,
CAIRO_OPERATOR_SOURCE,
CAIRO_COLOR_WHITE,
@@ -1259,7 +1259,7 @@ emit_image (cairo_ps_surface_t *surfa
0, 0,
image->width,
image->height);
-
+
_cairo_pattern_fini (&pattern.base);
opaque_image = (cairo_image_surface_t *) opaque;
} else {
@@ -1550,7 +1550,7 @@ _cairo_ps_surface_paint (void *abstrac
/*
assert (_operation_supported (op, source));
*/
-
+
_cairo_output_stream_printf (stream,
"%% _cairo_ps_surface_paint\n");
@@ -1616,7 +1616,7 @@ _cairo_ps_surface_stroke (void *abstra
return _analyze_operation (surface, op, source);
assert (operation_supported (surface, op, source));
-
+
_cairo_output_stream_printf (stream,
"%% _cairo_ps_surface_stroke\n");
@@ -1684,7 +1684,7 @@ _cairo_ps_surface_fill (void *abstract_
return _analyze_operation (surface, op, source);
assert (operation_supported (surface, op, source));
-
+
_cairo_output_stream_printf (stream,
"%% _cairo_ps_surface_fill\n");
@@ -1806,7 +1806,7 @@ static const cairo_surface_backend_t cai
NULL, /* scaled_glyph_fini */
/* Here are the drawing functions */
-
+
_cairo_ps_surface_paint, /* paint */
NULL, /* mask */
_cairo_ps_surface_stroke,
diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c
index 698b149..269e9b6 100644
--- a/src/cairo-quartz-surface.c
+++ b/src/cairo-quartz-surface.c
@@ -44,7 +44,7 @@ _cairo_quartz_surface_finish(void *abstr
if (surface->clip_region)
pixman_region_destroy (surface->clip_region);
-
+
return CAIRO_STATUS_SUCCESS;
}
@@ -91,7 +91,7 @@ _cairo_quartz_surface_acquire_dest_image
if (x1 >= x2 || y1 >= y2) {
*image_out = NULL;
*image_extra = NULL;
-
+
return CAIRO_STATUS_SUCCESS;
}
@@ -125,7 +125,7 @@ create_image_from_surface (cairo_image_s
width = cairo_image_surface_get_width ((cairo_surface_t *)image_surface);
height = cairo_image_surface_get_height ((cairo_surface_t *)image_surface);
-
+
color_space = CGColorSpaceCreateDeviceRGB();
data_provider = CGDataProviderCreateWithData (NULL, data,
width * height * 4, NULL);
@@ -140,7 +140,7 @@ create_image_from_surface (cairo_image_s
CGColorSpaceRelease (color_space);
CGDataProviderRelease (data_provider);
-
+
return image;
}
@@ -154,7 +154,7 @@ _cairo_quartz_surface_release_dest_image
cairo_quartz_surface_t *surface = abstract_surface;
CGImageRef image_ref;
CGRect rect;
-
+
image_ref = create_image_from_surface (image, image_extra);
rect = CGRectMake (image_rect->x, image_rect->y, image_rect->width, image_rect->height);
@@ -167,11 +167,11 @@ _cairo_quartz_surface_release_dest_image
CGContextDrawImage(surface->context, rect, image_ref);
CFRelease (image_ref);
-
+
if (surface->y_grows_down) {
CGContextRestoreGState (surface->context);
}
-
+
cairo_surface_destroy ((cairo_surface_t *)image);
free (image_extra);
}
@@ -184,7 +184,7 @@ _cairo_quartz_surface_set_clip_region(vo
if (surface->clip_region)
pixman_region_destroy (surface->clip_region);
-
+
if (region) {
surface->clip_region = pixman_region_create ();
pixman_region_copy (surface->clip_region, region);
diff --git a/src/cairo-region.c b/src/cairo-region.c
index c8419c1..dcbcffe 100644
--- a/src/cairo-region.c
+++ b/src/cairo-region.c
@@ -58,7 +58,7 @@ _cairo_region_create_from_rectangle (cai
pixman_region_destroy (region);
return NULL;
}
-
+
return region;
}
diff --git a/src/cairo-scaled-font-subsets.c b/src/cairo-scaled-font-subsets.c
index 4d8f4bb..8d907b0 100644
--- a/src/cairo-scaled-font-subsets.c
+++ b/src/cairo-scaled-font-subsets.c
@@ -246,7 +246,7 @@ _cairo_sub_font_map_glyph (cairo_sub_fon
sub_font->current_subset++;
sub_font->num_glyphs_in_current_subset = 0;
}
-
+
sub_font_glyph = _cairo_sub_font_glyph_create (scaled_font_glyph_index,
sub_font->current_subset,
sub_font->num_glyphs_in_current_subset++);
diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index 3ef7804..8cb979f 100644
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -61,7 +61,7 @@ _cairo_scaled_glyph_fini (cairo_scaled_g
if (scaled_glyph->path != NULL)
_cairo_path_fixed_destroy (scaled_glyph->path);
}
-
+
static void
_cairo_scaled_glyph_destroy (void *abstract_glyph)
{
@@ -168,7 +168,7 @@ cairo_scaled_font_status (cairo_scaled_f
* of scaled fonts we keep around even when not otherwise referenced
*/
#define CAIRO_SCALED_FONT_MAX_HOLDOVERS 256
-
+
typedef struct _cairo_scaled_font_map {
cairo_hash_table_t *hash_table;
cairo_scaled_font_t *holdovers[CAIRO_SCALED_FONT_MAX_HOLDOVERS];
@@ -339,10 +339,10 @@ _cairo_scaled_font_init (cairo_scaled_fo
scaled_font->glyphs = _cairo_cache_create (_cairo_scaled_glyph_keys_equal,
_cairo_scaled_glyph_destroy,
256);
-
+
scaled_font->surface_backend = NULL;
scaled_font->surface_private = NULL;
-
+
scaled_font->backend = backend;
return CAIRO_STATUS_SUCCESS;
@@ -353,16 +353,16 @@ _cairo_scaled_font_set_metrics (cairo_sc
cairo_font_extents_t *fs_metrics)
{
double font_scale_x, font_scale_y;
-
+
_cairo_matrix_compute_scale_factors (&scaled_font->font_matrix,
&font_scale_x, &font_scale_y,
/* XXX */ 1);
-
+
/*
* The font responded in unscaled units, scale by the font
* matrix scale factors to get to user space
*/
-
+
scaled_font->extents.ascent = fs_metrics->ascent * font_scale_y;
scaled_font->extents.descent = fs_metrics->descent * font_scale_y;
scaled_font->extents.height = fs_metrics->height * font_scale_y;
@@ -378,7 +378,7 @@ _cairo_scaled_font_fini (cairo_scaled_fo
if (scaled_font->glyphs != NULL)
_cairo_cache_destroy (scaled_font->glyphs);
-
+
if (scaled_font->surface_backend != NULL &&
scaled_font->surface_backend->scaled_font_fini != NULL)
scaled_font->surface_backend->scaled_font_fini (scaled_font);
@@ -423,7 +423,7 @@ cairo_scaled_font_create (cairo_font_fac
font_map = _cairo_scaled_font_map_lock ();
if (font_map == NULL)
goto UNWIND;
-
+
_cairo_scaled_font_init_key (&key, font_face,
font_matrix, ctm, options);
@@ -561,12 +561,12 @@ cairo_scaled_font_destroy (cairo_scaled_
lru = font_map->holdovers[0];
assert (lru->ref_count == 0);
-
+
_cairo_hash_table_remove (font_map->hash_table, &lru->hash_entry);
_cairo_scaled_font_fini (lru);
free (lru);
-
+
font_map->num_holdovers--;
memmove (&font_map->holdovers[0],
&font_map->holdovers[1],
@@ -674,14 +674,14 @@ cairo_scaled_font_glyph_extents (cairo_s
extents->height = 0.0;
extents->x_advance = 0.0;
extents->y_advance = 0.0;
-
+
return;
}
for (i = 0; i < num_glyphs; i++) {
cairo_scaled_glyph_t *scaled_glyph;
double left, top, right, bottom;
-
+
status = _cairo_scaled_glyph_lookup (scaled_font,
glyphs[i].index,
CAIRO_SCALED_GLYPH_INFO_METRICS,
@@ -690,12 +690,12 @@ cairo_scaled_font_glyph_extents (cairo_s
_cairo_scaled_font_set_error (scaled_font, status);
return;
}
-
+
left = scaled_glyph->metrics.x_bearing + glyphs[i].x;
right = left + scaled_glyph->metrics.width;
top = scaled_glyph->metrics.y_bearing + glyphs[i].y;
bottom = top + scaled_glyph->metrics.height;
-
+
if (i == 0) {
min_x = left;
max_x = right;
@@ -757,7 +757,7 @@ _cairo_scaled_font_text_to_glyphs (cairo
ucs4_to_index) (scaled_font, ucs4[i]);
(*glyphs)[i].x = x;
(*glyphs)[i].y = y;
-
+
status = _cairo_scaled_glyph_lookup (scaled_font,
(*glyphs)[i].index,
CAIRO_SCALED_GLYPH_INFO_METRICS,
@@ -767,14 +767,14 @@ _cairo_scaled_font_text_to_glyphs (cairo
*glyphs = NULL;
goto FAIL;
}
-
+
x += scaled_glyph->metrics.x_advance;
y += scaled_glyph->metrics.y_advance;
}
FAIL:
free (ucs4);
-
+
return status;
}
@@ -800,7 +800,7 @@ _cairo_scaled_font_glyph_device_extents
int left, top;
int right, bottom;
int x, y;
-
+
status = _cairo_scaled_glyph_lookup (scaled_font,
glyphs[i].index,
CAIRO_SCALED_GLYPH_INFO_METRICS,
@@ -809,16 +809,16 @@ _cairo_scaled_font_glyph_device_extents
_cairo_scaled_font_set_error (scaled_font, status);
return status;
}
-
+
/* glyph images are snapped to pixel locations */
x = (int) floor (glyphs[i].x + 0.5);
y = (int) floor (glyphs[i].y + 0.5);
-
+
left = x + _cairo_fixed_integer_floor(scaled_glyph->bbox.p1.x);
top = y + _cairo_fixed_integer_floor (scaled_glyph->bbox.p1.y);
right = x + _cairo_fixed_integer_ceil(scaled_glyph->bbox.p2.x);
bottom = y + _cairo_fixed_integer_ceil (scaled_glyph->bbox.p2.y);
-
+
if (left < min_x) min_x = left;
if (right > max_x) max_x = right;
if (top < min_y) min_y = top;
@@ -858,7 +858,7 @@ _cairo_scaled_font_show_glyphs (cairo_sc
* they are implemented in terms of other operators in cairo-gstate.c
*/
assert (op != CAIRO_OPERATOR_SOURCE && op != CAIRO_OPERATOR_CLEAR);
-
+
if (scaled_font->status)
return scaled_font->status;
@@ -875,7 +875,7 @@ _cairo_scaled_font_show_glyphs (cairo_sc
}
/* Font display routine either does not exist or failed. */
-
+
status = CAIRO_STATUS_SUCCESS;
_cairo_cache_freeze (scaled_font->glyphs);
@@ -885,7 +885,7 @@ _cairo_scaled_font_show_glyphs (cairo_sc
cairo_surface_pattern_t glyph_pattern;
cairo_image_surface_t *glyph_surface;
cairo_scaled_glyph_t *scaled_glyph;
-
+
status = _cairo_scaled_glyph_lookup (scaled_font,
glyphs[i].index,
CAIRO_SCALED_GLYPH_INFO_SURFACE,
@@ -893,7 +893,7 @@ _cairo_scaled_font_show_glyphs (cairo_sc
if (status)
goto CLEANUP_MASK;
-
+
glyph_surface = scaled_glyph->surface;
/* Create the mask using the format from the first glyph */
@@ -917,7 +917,7 @@ _cairo_scaled_font_show_glyphs (cairo_sc
pixman_image, TRUE);
}
-
+
/* round glyph locations to the nearest pixel */
x = (int) floor (glyphs[i].x +
glyph_surface->base.device_x_offset +
@@ -925,7 +925,7 @@ _cairo_scaled_font_show_glyphs (cairo_sc
y = (int) floor (glyphs[i].y +
glyph_surface->base.device_y_offset +
0.5);
-
+
_cairo_pattern_init_for_surface (&glyph_pattern, &glyph_surface->base);
status = _cairo_surface_composite (CAIRO_OPERATOR_ADD,
@@ -943,25 +943,25 @@ _cairo_scaled_font_show_glyphs (cairo_sc
if (status)
break;
}
-
+
if (mask != NULL) {
cairo_surface_pattern_t mask_pattern;
_cairo_pattern_init_for_surface (&mask_pattern, mask);
-
+
status = _cairo_surface_composite (op, pattern, &mask_pattern.base,
surface,
source_x, source_y,
0, 0,
dest_x, dest_y,
width, height);
-
+
_cairo_pattern_fini (&mask_pattern.base);
}
-
+
CLEANUP_MASK:
_cairo_cache_thaw (scaled_font->glyphs);
-
+
if (mask != NULL)
cairo_surface_destroy (mask);
return status;
@@ -1027,14 +1027,14 @@ _cairo_scaled_font_glyph_path (cairo_sca
cairo_status_t status;
int i;
cairo_scaled_glyph_path_closure_t closure;
-
+
if (scaled_font->status)
return scaled_font->status;
-
+
closure.path = path;
for (i = 0; i < num_glyphs; i++) {
cairo_scaled_glyph_t *scaled_glyph;
-
+
status = _cairo_scaled_glyph_lookup (scaled_font,
glyphs[i].index,
CAIRO_SCALED_GLYPH_INFO_PATH,
@@ -1044,7 +1044,7 @@ _cairo_scaled_font_glyph_path (cairo_sca
closure.offset.x = _cairo_fixed_from_double (glyphs[i].x);
closure.offset.y = _cairo_fixed_from_double (glyphs[i].y);
-
+
status = _cairo_path_fixed_interpret (scaled_glyph->path,
CAIRO_DIRECTION_FORWARD,
_scaled_glyph_path_move_to,
@@ -1053,7 +1053,7 @@ _cairo_scaled_font_glyph_path (cairo_sca
_scaled_glyph_path_close_path,
&closure);
}
-
+
return CAIRO_STATUS_SUCCESS;
}
@@ -1077,7 +1077,7 @@ _cairo_scaled_glyph_set_metrics (cairo_s
double hm, wm;
double min_user_x = 0.0, max_user_x = 0.0, min_user_y = 0.0, max_user_y = 0.0;
double min_device_x = 0.0, max_device_x = 0.0, min_device_y = 0.0, max_device_y = 0.0;
-
+
for (hm = 0.0; hm <= 1.0; hm += 1.0)
for (wm = 0.0; wm <= 1.0; wm += 1.0) {
double x, y;
@@ -1102,7 +1102,7 @@ _cairo_scaled_glyph_set_metrics (cairo_s
y = fs_metrics->y_bearing + fs_metrics->height * hm;
cairo_matrix_transform_distance (&scaled_font->scale,
&x, &y);
-
+
if (first) {
min_device_x = max_device_x = x;
min_device_y = max_device_y = y;
@@ -1178,7 +1178,7 @@ _cairo_scaled_glyph_lookup (cairo_scaled
cairo_cache_entry_t key;
cairo_scaled_glyph_t *scaled_glyph;
cairo_scaled_glyph_info_t need_info;
-
+
if (scaled_font->status)
return scaled_font->status;
@@ -1200,14 +1200,14 @@ _cairo_scaled_glyph_lookup (cairo_scaled
status = CAIRO_STATUS_NO_MEMORY;
goto CLEANUP;
}
-
+
_cairo_scaled_glyph_set_index(scaled_glyph, index);
scaled_glyph->cache_entry.size = 1; /* XXX */
scaled_glyph->scaled_font = scaled_font;
scaled_glyph->surface = NULL;
scaled_glyph->path = NULL;
scaled_glyph->surface_private = NULL;
-
+
/* ask backend to initialize metrics and shape fields */
status = (*scaled_font->backend->
scaled_glyph_init) (scaled_font, scaled_glyph, info);
@@ -1232,11 +1232,11 @@ _cairo_scaled_glyph_lookup (cairo_scaled
if ((info & CAIRO_SCALED_GLYPH_INFO_SURFACE) != 0 &&
scaled_glyph->surface == NULL)
need_info |= CAIRO_SCALED_GLYPH_INFO_SURFACE;
-
+
if (((info & CAIRO_SCALED_GLYPH_INFO_PATH) != 0 &&
scaled_glyph->path == NULL))
need_info |= CAIRO_SCALED_GLYPH_INFO_PATH;
-
+
if (need_info) {
status = (*scaled_font->backend->
scaled_glyph_init) (scaled_font, scaled_glyph, need_info);
diff --git a/src/cairo-spline.c b/src/cairo-spline.c
index 60ad6c5..0da00aa 100644
--- a/src/cairo-spline.c
+++ b/src/cairo-spline.c
@@ -256,7 +256,7 @@ _cairo_spline_decompose_into (cairo_spli
status = _cairo_spline_decompose_into (&s1, tolerance_squared, result);
if (status)
return status;
-
+
status = _cairo_spline_decompose_into (&s2, tolerance_squared, result);
if (status)
return status;
diff --git a/src/cairo-surface-fallback.c b/src/cairo-surface-fallback.c
index c27510b..5c62196 100644
--- a/src/cairo-surface-fallback.c
+++ b/src/cairo-surface-fallback.c
@@ -70,7 +70,7 @@ _fallback_init (fallback_state_t *state,
state->extents.y = y;
state->extents.width = width;
state->extents.height = height;
-
+
state->dst = dst;
status = _cairo_surface_acquire_dest_image (dst, &state->extents,
@@ -116,14 +116,14 @@ _create_composite_mask_pattern (cairo_su
{
cairo_surface_t *mask;
cairo_status_t status;
-
+
mask = cairo_surface_create_similar (dst,
CAIRO_CONTENT_ALPHA,
extents->width,
extents->height);
if (mask->status)
return CAIRO_STATUS_NO_MEMORY;
-
+
status = (*draw_func) (draw_closure, CAIRO_OPERATOR_ADD,
NULL, mask,
extents->x, extents->y,
@@ -138,7 +138,7 @@ _create_composite_mask_pattern (cairo_su
extents);
if (status)
goto CLEANUP_SURFACE;
-
+
_cairo_pattern_init_for_surface (mask_pattern, mask);
CLEANUP_SURFACE:
@@ -168,7 +168,7 @@ _clip_and_composite_with_mask (cairo_cli
dst, extents);
if (status)
return status;
-
+
status = _cairo_surface_composite (op,
src, &mask_pattern.base, dst,
extents->x, extents->y,
@@ -254,7 +254,7 @@ _clip_and_composite_combine (cairo_clip_
/* Now add the two results together
*/
_cairo_pattern_init_for_surface (&intermediate_pattern, intermediate);
-
+
status = _cairo_surface_composite (CAIRO_OPERATOR_ADD,
&intermediate_pattern.base, NULL, dst,
0, 0,
@@ -263,7 +263,7 @@ _clip_and_composite_combine (cairo_clip_
extents->width, extents->height);
_cairo_pattern_fini (&intermediate_pattern.base);
-
+
CLEANUP_SURFACE:
cairo_surface_destroy (intermediate);
@@ -292,7 +292,7 @@ _clip_and_composite_source (cairo_clip_t
dst, extents);
if (status)
return status;
-
+
/* Compute dest' = dest OUT (mask IN clip)
*/
status = _cairo_surface_composite (CAIRO_OPERATOR_DEST_OUT,
@@ -425,11 +425,11 @@ _composite_trap_region (cairo_clip_t
if (num_rects == 0)
return CAIRO_STATUS_SUCCESS;
-
+
if (num_rects > 1) {
if (_cairo_surface_get_clip_mode (dst) != CAIRO_CLIP_MODE_REGION)
return CAIRO_INT_STATUS_UNSUPPORTED;
-
+
clip_serial = _cairo_surface_allocate_clip_serial (dst);
status = _cairo_surface_set_clip_region (dst,
trap_region,
@@ -437,10 +437,10 @@ _composite_trap_region (cairo_clip_t
if (status)
return status;
}
-
+
if (clip_surface)
_cairo_pattern_init_for_surface (&mask.surface, clip_surface);
-
+
status = _cairo_surface_composite (op,
src,
clip_surface ? &mask.base : NULL,
@@ -481,14 +481,14 @@ _composite_traps_draw_func (void
cairo_composite_traps_info_t *info = closure;
cairo_pattern_union_t pattern;
cairo_status_t status;
-
+
if (dst_x != 0 || dst_y != 0)
_cairo_traps_translate (info->traps, - dst_x, - dst_y);
_cairo_pattern_init_solid (&pattern.solid, CAIRO_COLOR_WHITE);
if (!src)
src = &pattern.base;
-
+
status = _cairo_surface_composite_trapezoids (op,
src, dst, info->antialias,
extents->x, extents->y,
@@ -515,7 +515,7 @@ _clip_and_composite_trapezoids (cairo_pa
pixman_region16_t *clear_region = NULL;
cairo_rectangle_fixed_t extents;
cairo_composite_traps_info_t traps_info;
-
+
if (traps->num_traps == 0)
return CAIRO_STATUS_SUCCESS;
@@ -538,11 +538,11 @@ _clip_and_composite_trapezoids (cairo_pa
else
{
cairo_surface_t *clip_surface = clip ? clip->surface : NULL;
-
+
status = _cairo_surface_get_extents (dst, &extents);
if (status)
return status;
-
+
if (trap_region && !clip_surface) {
/* If we optimize drawing with an unbounded operator to
* _cairo_surface_fill_rectangles() or to drawing with a
@@ -551,7 +551,7 @@ _clip_and_composite_trapezoids (cairo_pa
status = _cairo_surface_get_extents (dst, &extents);
if (status)
return status;
-
+
clear_region = _cairo_region_create_from_rectangle (&extents);
if (clear_region == NULL)
return CAIRO_STATUS_NO_MEMORY;
@@ -559,12 +559,12 @@ _clip_and_composite_trapezoids (cairo_pa
status = _cairo_clip_intersect_to_region (clip, clear_region);
if (status)
return status;
-
+
_cairo_region_extents_rectangle (clear_region, &extents);
-
+
if (pixman_region_subtract (clear_region, clear_region, trap_region) != PIXMAN_REGION_STATUS_SUCCESS)
return CAIRO_STATUS_NO_MEMORY;
-
+
if (!pixman_region_not_empty (clear_region)) {
pixman_region_destroy (clear_region);
clear_region = NULL;
@@ -575,14 +575,14 @@ _clip_and_composite_trapezoids (cairo_pa
return status;
}
}
-
+
if (status)
goto out;
-
+
if (trap_region)
{
cairo_surface_t *clip_surface = clip ? clip->surface : NULL;
-
+
if ((src->type == CAIRO_PATTERN_TYPE_SOLID || op == CAIRO_OPERATOR_CLEAR) &&
!clip_surface)
{
@@ -592,7 +592,7 @@ _clip_and_composite_trapezoids (cairo_pa
color = CAIRO_COLOR_TRANSPARENT;
else
color = &((cairo_solid_pattern_t *)src)->color;
-
+
/* Solid rectangles special case */
status = _cairo_surface_fill_region (dst, op, color, trap_region);
if (!status && clear_region)
@@ -646,7 +646,7 @@ _clip_and_composite_trapezoids (cairo_pa
pixman_region_destroy (trap_region);
if (clear_region)
pixman_region_destroy (clear_region);
-
+
return status;
}
@@ -672,7 +672,7 @@ _cairo_surface_fallback_paint (cairo_sur
_cairo_rectangle_intersect (&extents, &source_extents);
}
-
+
status = _cairo_clip_intersect_to_rectangle (surface->clip, &extents);
if (status)
return status;
@@ -685,7 +685,7 @@ _cairo_surface_fallback_paint (cairo_sur
status = _cairo_traps_init_box (&traps, &box);
if (status)
return status;
-
+
_clip_and_composite_trapezoids (source,
op,
surface,
@@ -745,7 +745,7 @@ _cairo_surface_fallback_mask (cairo_surf
_cairo_rectangle_intersect (&extents, &source_extents);
}
-
+
if (_cairo_operator_bounded_by_mask (op)) {
status = _cairo_pattern_get_extents (mask, &mask_extents);
if (status)
@@ -781,7 +781,7 @@ _cairo_surface_fallback_stroke (cairo_su
{
cairo_status_t status;
cairo_traps_t traps;
-
+
_cairo_traps_init (&traps);
status = _cairo_path_fixed_stroke_to_traps (path,
@@ -866,7 +866,7 @@ _cairo_surface_old_show_glyphs_draw_func
*/
if (dst_x != 0 || dst_y != 0) {
int i;
-
+
for (i = 0; i < glyph_info->num_glyphs; ++i)
{
((cairo_glyph_t *) glyph_info->glyphs)[i].x -= dst_x;
@@ -877,7 +877,7 @@ _cairo_surface_old_show_glyphs_draw_func
_cairo_pattern_init_solid (&pattern.solid, CAIRO_COLOR_WHITE);
if (!src)
src = &pattern.base;
-
+
status = _cairo_surface_old_show_glyphs (glyph_info->font, op, src,
dst,
extents->x, extents->y,
@@ -890,7 +890,7 @@ _cairo_surface_old_show_glyphs_draw_func
if (status != CAIRO_INT_STATUS_UNSUPPORTED)
return status;
-
+
status = _cairo_scaled_font_show_glyphs (glyph_info->font,
op,
src, dst,
@@ -933,15 +933,15 @@ _cairo_surface_fallback_show_glyphs (cai
_cairo_rectangle_intersect (&extents, &glyph_extents);
}
-
+
status = _cairo_clip_intersect_to_rectangle (surface->clip, &extents);
if (status)
return status;
-
+
glyph_info.font = scaled_font;
glyph_info.glyphs = glyphs;
glyph_info.num_glyphs = num_glyphs;
-
+
status = _clip_and_composite (surface->clip,
op,
source,
@@ -949,7 +949,7 @@ _cairo_surface_fallback_show_glyphs (cai
&glyph_info,
surface,
&extents);
-
+
return status;
}
@@ -1063,7 +1063,7 @@ _cairo_surface_fallback_fill_rectangles
y1 = rects[0].y;
x2 = rects[0].x + rects[0].width;
y2 = rects[0].y + rects[0].height;
-
+
for (i = 1; i < num_rects; i++) {
if (rects[i].x < x1)
x1 = rects[i].x;
@@ -1084,7 +1084,7 @@ _cairo_surface_fallback_fill_rectangles
}
/* If the fetched image isn't at 0,0, we need to offset the rectangles */
-
+
if (state.image_rect.x != 0 || state.image_rect.y != 0) {
offset_rects = malloc (sizeof (cairo_rectangle_fixed_t) * num_rects);
if (offset_rects == NULL) {
@@ -1140,7 +1140,7 @@ _cairo_surface_fallback_composite_trapez
}
/* If the destination image isn't at 0,0, we need to offset the trapezoids */
-
+
if (state.image_rect.x != 0 || state.image_rect.y != 0) {
offset_traps = malloc (sizeof (cairo_trapezoid_t) * num_traps);
if (!offset_traps) {
@@ -1166,6 +1166,6 @@ _cairo_surface_fallback_composite_trapez
DONE:
_fallback_fini (&state);
-
+
return status;
}
diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index c6f8f9c..c7809d7 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -188,7 +188,7 @@ _cairo_surface_init (cairo_surface_t *
surface->backend = backend;
surface->content = content;
-
+
surface->type = backend->type;
surface->ref_count = 1;
@@ -294,7 +294,7 @@ _cairo_surface_create_similar_solid (cai
CAIRO_OPERATOR_SOURCE, source);
cairo_pattern_destroy (source);
-
+
if (status) {
cairo_surface_destroy (surface);
_cairo_error (status);
@@ -466,7 +466,7 @@ cairo_surface_set_user_data (cairo_surfa
{
if (surface->ref_count == -1)
return CAIRO_STATUS_NO_MEMORY;
-
+
return _cairo_user_data_array_set_data (&surface->user_data,
key, user_data, destroy);
}
@@ -520,7 +520,7 @@ cairo_surface_flush (cairo_surface_t *su
cairo_status_t status;
status = surface->backend->flush (surface);
-
+
if (status)
_cairo_surface_set_error (surface, status);
}
@@ -584,12 +584,12 @@ cairo_surface_mark_dirty_rectangle (cair
if (surface->backend->mark_dirty_rectangle) {
cairo_status_t status;
-
+
status = surface->backend->mark_dirty_rectangle (surface,
SURFACE_TO_BACKEND_X(surface, x),
SURFACE_TO_BACKEND_Y(surface, y),
width, height);
-
+
if (status)
_cairo_surface_set_error (surface, status);
}
@@ -799,13 +799,13 @@ _cairo_surface_clone_similar (cairo_surf
cairo_status_t status;
cairo_image_surface_t *image;
void *image_extra;
-
+
if (surface->finished)
return CAIRO_STATUS_SURFACE_FINISHED;
if (surface->backend->clone_similar == NULL)
return CAIRO_INT_STATUS_UNSUPPORTED;
-
+
status = surface->backend->clone_similar (surface, src, clone_out);
if (status == CAIRO_STATUS_SUCCESS) {
(*clone_out)->device_x_offset = src->device_x_offset;
@@ -830,7 +830,7 @@ _cairo_surface_clone_similar (cairo_surf
* inefficient compared to a backend-specific implementation of
* clone_similar() with an image source. So we don't bother
*/
-
+
_cairo_surface_release_source_image (src, image, image_extra);
return status;
}
@@ -891,7 +891,7 @@ _cairo_surface_composite (cairo_operator
if (dst->status)
return dst->status;
-
+
if (dst->finished)
return CAIRO_STATUS_SURFACE_FINISHED;
@@ -985,7 +985,7 @@ _cairo_surface_fill_region (cairo_surfac
if (!num_rects)
return CAIRO_STATUS_SUCCESS;
-
+
rects = malloc (sizeof (pixman_rectangle_t) * num_rects);
if (!rects)
return CAIRO_STATUS_NO_MEMORY;
@@ -999,7 +999,7 @@ _cairo_surface_fill_region (cairo_surfac
status = _cairo_surface_fill_rectangles (surface, op,
color, rects, num_rects);
-
+
free (rects);
return status;
@@ -1207,7 +1207,7 @@ FINISH:
return status;
}
-
+
cairo_status_t
_cairo_surface_composite_trapezoids (cairo_operator_t op,
cairo_pattern_t *pattern,
@@ -1326,7 +1326,7 @@ unsigned int
_cairo_surface_allocate_clip_serial (cairo_surface_t *surface)
{
unsigned int serial;
-
+
if (surface->status)
return 0;
@@ -1354,7 +1354,7 @@ _cairo_surface_reset_clip (cairo_surface
if (surface->finished)
return CAIRO_STATUS_SURFACE_FINISHED;
-
+
surface->current_clip_serial = 0;
if (surface->backend->intersect_clip_path) {
@@ -1398,7 +1398,7 @@ _cairo_surface_set_clip_region (cairo_su
if (surface->finished)
return CAIRO_STATUS_SURFACE_FINISHED;
-
+
assert (surface->backend->set_clip_region != NULL);
surface->current_clip_serial = serial;
@@ -1423,7 +1423,7 @@ _cairo_surface_intersect_clip_path (cair
if (surface->finished)
return CAIRO_STATUS_SURFACE_FINISHED;
-
+
assert (surface->backend->intersect_clip_path != NULL);
status = surface->backend->intersect_clip_path (surface,
@@ -1500,7 +1500,7 @@ cairo_status_t
_cairo_surface_set_clip (cairo_surface_t *surface, cairo_clip_t *clip)
{
unsigned int serial = 0;
-
+
if (!surface)
return CAIRO_STATUS_NULL_POINTER;
@@ -1515,7 +1515,7 @@ _cairo_surface_set_clip (cairo_surface_t
if (serial == 0)
clip = NULL;
}
-
+
surface->clip = clip;
if (serial == _cairo_surface_get_current_clip_serial (surface))
@@ -1526,13 +1526,13 @@ _cairo_surface_set_clip (cairo_surface_t
return _cairo_surface_set_clip_path (surface,
clip->path,
clip->serial);
-
+
if (clip->region)
return _cairo_surface_set_clip_region (surface,
clip->region,
clip->serial);
}
-
+
return _cairo_surface_reset_clip (surface);
}
@@ -1866,7 +1866,7 @@ _cairo_surface_composite_shape_fixup_unb
mask_tmp.y = dst_y - mask_y;
mask_tmp.width = mask_width;
mask_tmp.height = mask_height;
-
+
mask_rectangle = &mask_tmp;
return _cairo_surface_composite_fixup_unbounded_internal (dst, src_rectangle, mask_rectangle,
diff --git a/src/cairo-svg-surface.c b/src/cairo-svg-surface.c
index f0c1e5c..2827b57 100644
--- a/src/cairo-svg-surface.c
+++ b/src/cairo-svg-surface.c
@@ -396,7 +396,7 @@ _cairo_svg_surface_create_for_document (
surface->id = document->surface_id++;
clip_id = document->clip_id++;
-
+
clip = xmlNewChild (document->xml_node_defs, NULL, CC2XML ("clipPath"), NULL);
snprintf (buffer, sizeof buffer, "clip%d", clip_id);
xmlSetProp (clip, CC2XML ("id"), C2XML (buffer));
@@ -405,14 +405,14 @@ _cairo_svg_surface_create_for_document (
xmlSetProp (rect, CC2XML ("width"), C2XML (buffer));
_cairo_dtostr (buffer, sizeof buffer, height);
xmlSetProp (rect, CC2XML ("height"), C2XML (buffer));
-
+
/* Use of xlink namespace requires node to be linked to tree.
* So by default we link surface main node to document svg node.
* For surfaces that don't own document, their main node will be
* unlinked and freed in surface finish. */
surface->xml_node = xmlNewChild (document->xml_node_main, NULL, CC2XML ("g"), NULL);
surface->xml_root_node = surface->xml_node;
-
+
snprintf (buffer, sizeof buffer, "surface%d", surface->id);
xmlSetProp (surface->xml_node, CC2XML ("id"), C2XML (buffer));
snprintf (buffer, sizeof buffer, "url(#clip%d)", clip_id);
@@ -581,7 +581,7 @@ _cairo_svg_document_emit_glyph (cairo_sv
svg_path_info_t info;
xmlNodePtr symbol, child;
char buffer[CAIRO_SVG_DTOSTR_BUFFER_LEN];
-
+
status = _cairo_scaled_glyph_lookup (scaled_font,
scaled_font_glyph_index,
CAIRO_SCALED_GLYPH_INFO_METRICS|
@@ -600,7 +600,7 @@ _cairo_svg_document_emit_glyph (cairo_sv
_cairo_surface_set_error (document->owner, status);
return;
}
-
+
info.document = document;
info.path = xmlBufferCreate ();
info.ctm_inverse = NULL;
@@ -622,7 +622,7 @@ _cairo_svg_document_emit_glyph (cairo_sv
child = xmlNewChild (symbol, NULL, CC2XML ("path"), NULL);
xmlSetProp (child, CC2XML ("d"), xmlBufferContent (info.path));
xmlSetProp (child, CC2XML ("style"), CC2XML ("stroke: none;"));
-
+
xmlBufferFree (info.path);
}
@@ -657,7 +657,7 @@ _operation_supported (cairo_svg_surface_
const cairo_pattern_t *pattern)
{
cairo_svg_document_t *document = surface->document;
-
+
if (document->svg_version < CAIRO_SVG_VERSION_1_2)
if (op != CAIRO_OPERATOR_OVER)
return FALSE;
@@ -691,7 +691,7 @@ _cairo_svg_surface_finish (void *abstrac
cairo_status_t status;
cairo_svg_surface_t *surface = abstract_surface;
cairo_svg_document_t *document = surface->document;
-
+
if (document->owner == &surface->base) {
status = _cairo_svg_document_finish (document);
} else {
@@ -736,7 +736,7 @@ emit_transform (xmlNodePtr node,
{
xmlBufferPtr matrix_buffer;
char buffer[CAIRO_SVG_DTOSTR_BUFFER_LEN];
-
+
matrix_buffer = xmlBufferCreate ();
xmlBufferCat (matrix_buffer, CC2XML ("matrix("));
_cairo_dtostr (buffer, sizeof buffer, matrix->xx);
@@ -835,7 +835,7 @@ _cairo_surface_base64_encode (cairo_surf
if (buffer == NULL)
return CAIRO_STATUS_NULL_POINTER;
-
+
info.buffer = xmlBufferCreate();
info.in_mem = 0;
info.trailing = 0;
@@ -852,7 +852,7 @@ _cairo_surface_base64_encode (cairo_surf
*buffer = NULL;
return status;
}
-
+
if (info.in_mem > 0) {
for (i = info.in_mem; i < 3; i++)
info.src[i] = '\x0';
@@ -860,7 +860,7 @@ _cairo_surface_base64_encode (cairo_surf
info.in_mem = 3;
base64_write_func (&info, NULL, 0);
}
-
+
return CAIRO_STATUS_SUCCESS;
}
@@ -900,7 +900,7 @@ emit_composite_image_pattern (xmlNodePtr
_cairo_dtostr (buffer, sizeof buffer, image->height);
xmlSetProp (child, CC2XML ("height"), C2XML (buffer));
xmlSetProp (child, CC2XML ("xlink:href"), C2XML (xmlBufferContent (image_buffer)));
-
+
xmlBufferFree (image_buffer);
if (!is_pattern) {
@@ -939,7 +939,7 @@ emit_meta_surface (cairo_svg_document_t
break;
}
}
-
+
if (i >= num_elements) {
cairo_surface_t *paginated_surface;
cairo_surface_t *svg_surface;
@@ -958,11 +958,11 @@ emit_meta_surface (cairo_svg_document_t
&cairo_svg_surface_paginated_backend);
_cairo_meta_surface_replay ((cairo_surface_t *)meta, paginated_surface);
_cairo_surface_show_page (paginated_surface);
-
+
new_snapshot.meta = meta;
new_snapshot.id = ((cairo_svg_surface_t *) svg_surface)->id;
_cairo_array_append (&document->meta_snapshots, &new_snapshot);
-
+
if (meta->content == CAIRO_CONTENT_ALPHA)
emit_alpha_filter (document);
child = xmlAddChild (document->xml_node_defs,
@@ -994,13 +994,13 @@ emit_composite_meta_pattern (xmlNodePtr
char buffer[CAIRO_SVG_DTOSTR_BUFFER_LEN];
meta_surface = (cairo_meta_surface_t *) pattern->surface;
-
+
id = emit_meta_surface (document, meta_surface);
-
+
child = xmlNewChild (node, NULL, CC2XML("use"), NULL);
snprintf (buffer, sizeof buffer, "#surface%d", id);
xmlSetProp (child, CC2XML ("xlink:href"), C2XML (buffer));
-
+
if (!is_pattern) {
p2u = pattern->base.matrix;
cairo_matrix_invert (&p2u);
@@ -1038,13 +1038,13 @@ emit_operator (xmlNodePtr node,
{
char const *op_str[] = {
"clear",
-
+
"src", "src-over", "src-in",
"src-out", "src-atop",
-
+
"dst", "dst-over", "dst-in",
"dst-out", "dst-atop",
-
+
"xor", "plus",
"color-dodge" /* FIXME: saturate ? */
};
@@ -1102,9 +1102,9 @@ emit_surface_pattern (cairo_svg_surface_
cairo_matrix_t p2u;
double width, height;
char buffer[CAIRO_SVG_DTOSTR_BUFFER_LEN];
-
+
child = xmlNewChild (document->xml_node_defs, NULL, CC2XML ("pattern"), NULL);
-
+
id = xmlBufferCreate ();
xmlBufferCat (id, CC2XML ("pattern"));
snprintf (buffer, sizeof buffer, "%d", document->pattern_id);
@@ -1180,7 +1180,7 @@ emit_pattern_extend (xmlNodePtr node, ca
/* FIXME not implemented */
break;
}
-
+
if (value != NULL)
xmlSetProp (node, CC2XML ("spreadMethod"), CC2XML (value));
}
@@ -1197,9 +1197,9 @@ emit_linear_pattern (cairo_svg_surface_t
double x0, y0, x1, y1;
cairo_matrix_t p2u;
char buffer[CAIRO_SVG_DTOSTR_BUFFER_LEN];
-
+
child = xmlNewChild (document->xml_node_defs, NULL, CC2XML ("linearGradient"), NULL);
-
+
id = xmlBufferCreate ();
xmlBufferCat (id, CC2XML ("linear"));
snprintf (buffer, sizeof buffer, "%d", document->linear_pattern_id);
@@ -1222,7 +1222,7 @@ emit_linear_pattern (cairo_svg_surface_t
y0 = _cairo_fixed_to_double (pattern->gradient.p1.y);
x1 = _cairo_fixed_to_double (pattern->gradient.p2.x);
y1 = _cairo_fixed_to_double (pattern->gradient.p2.y);
-
+
_cairo_dtostr (buffer, sizeof buffer, x0);
xmlSetProp (child, CC2XML ("x1"), C2XML (buffer));
_cairo_dtostr (buffer, sizeof buffer, y0);
@@ -1231,13 +1231,13 @@ emit_linear_pattern (cairo_svg_surface_t
xmlSetProp (child, CC2XML ("x2"), C2XML (buffer));
_cairo_dtostr (buffer, sizeof buffer, y1);
xmlSetProp (child, CC2XML ("y2"), C2XML (buffer));
-
+
p2u = pattern->base.base.matrix;
cairo_matrix_invert (&p2u);
emit_transform (child, "gradientTransform", &p2u);
}
-
+
static void
emit_radial_pattern (cairo_svg_surface_t *surface,
cairo_radial_pattern_t *pattern,
@@ -1250,9 +1250,9 @@ emit_radial_pattern (cairo_svg_surface_t
double x0, y0, x1, y1, r0, r1;
double fx, fy;
char buffer[CAIRO_SVG_DTOSTR_BUFFER_LEN];
-
+
child = xmlNewChild (document->xml_node_defs, NULL, CC2XML ("radialGradient"), NULL);
-
+
id = xmlBufferCreate ();
xmlBufferCat (id, CC2XML ("radial"));
snprintf (buffer, sizeof buffer, "%d", document->radial_pattern_id);
@@ -1260,7 +1260,7 @@ emit_radial_pattern (cairo_svg_surface_t
xmlSetProp (child, CC2XML ("id"), C2XML (xmlBufferContent (id)));
xmlSetProp (child, CC2XML ("gradientUnits"), CC2XML ("userSpaceOnUse"));
emit_pattern_extend (child, pattern->base.base.extend);
-
+
xmlBufferCat (style, CC2XML (is_stroke ? "color: url(#" : "fill: url(#"));
xmlBufferCat (style, xmlBufferContent (id));
xmlBufferCat (style, CC2XML (");"));
@@ -1302,7 +1302,7 @@ emit_radial_pattern (cairo_svg_surface_t
emit_transform (child, "gradientTransform", &p2u);
}
-
+
static void
emit_pattern (cairo_svg_surface_t *surface, cairo_pattern_t *pattern,
xmlBufferPtr style, int is_stroke)
@@ -1350,7 +1350,7 @@ _cairo_svg_surface_fill (void *abstrac
info.document = document;
info.path = xmlBufferCreate ();
info.ctm_inverse = NULL;
-
+
style = xmlBufferCreate ();
emit_pattern (surface, source, style, 0);
xmlBufferCat (style, CC2XML (" stroke: none;"));
@@ -1437,7 +1437,7 @@ _cairo_svg_surface_paint (void *abs
cairo_pattern_t *source)
{
cairo_svg_surface_t *surface = abstract_surface;
-
+
if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE)
return _analyze_operation (surface, op, source);
@@ -1463,7 +1463,7 @@ _cairo_svg_surface_paint (void *abs
(op == CAIRO_OPERATOR_CLEAR ||
op == CAIRO_OPERATOR_SOURCE)) {
xmlNodePtr child = surface->xml_root_node->children;
-
+
while (child != NULL) {
xmlUnlinkNode (child);
xmlFreeNode (child);
@@ -1487,7 +1487,7 @@ _cairo_svg_surface_paint (void *abs
}
emit_paint (surface->xml_node, surface, op, source);
-
+
return CAIRO_STATUS_SUCCESS;
}
@@ -1506,7 +1506,7 @@ _cairo_svg_surface_mask (void *abst
return _analyze_operation (surface, op, source);
assert (_operation_supported (surface, op, source));
-
+
emit_alpha_filter (document);
mask_node = xmlNewChild (document->xml_node_defs, NULL, CC2XML ("mask"), NULL);
@@ -1553,7 +1553,7 @@ _cairo_svg_surface_stroke (void *abstr
svg_path_info_t info;
unsigned int i;
char buffer[CAIRO_SVG_DTOSTR_BUFFER_LEN];
-
+
if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE)
return _analyze_operation (surface, op, source);
@@ -1569,7 +1569,7 @@ _cairo_svg_surface_stroke (void *abstr
_cairo_dtostr (buffer, sizeof buffer, stroke_style->line_width);
xmlBufferCat (style, C2XML (buffer));
xmlBufferCat (style, CC2XML (";"));
-
+
switch (stroke_style->line_cap) {
case CAIRO_LINE_CAP_BUTT:
xmlBufferCat (style, CC2XML ("stroke-linecap: butt;"));
@@ -1623,13 +1623,13 @@ _cairo_svg_surface_stroke (void *abstr
_cairo_svg_path_curve_to,
_cairo_svg_path_close_path,
&info);
-
+
child = xmlNewChild (surface->xml_node, NULL, CC2XML ("path"), NULL);
emit_transform (child, "transform", ctm);
xmlSetProp (child, CC2XML ("d"), xmlBufferContent (info.path));
xmlSetProp (child, CC2XML ("style"), xmlBufferContent (style));
emit_operator (child, surface, op);
-
+
xmlBufferFree (info.path);
xmlBufferFree (style);
@@ -1654,7 +1654,7 @@ _cairo_svg_surface_show_glyphs (void *
char buffer[CAIRO_SVG_DTOSTR_BUFFER_LEN];
unsigned int font_id, subset_id, subset_glyph_index;
int i;
-
+
if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE)
return _analyze_operation (surface, op, pattern);
@@ -1698,7 +1698,7 @@ _cairo_svg_surface_show_glyphs (void *
return CAIRO_STATUS_SUCCESS;
FALLBACK:
-
+
_cairo_path_fixed_init (&path);
status = _cairo_scaled_font_glyph_path (scaled_font,(cairo_glyph_t *) glyphs, num_glyphs, &path);
@@ -1835,7 +1835,7 @@ _cairo_svg_document_create (cairo_output
free (document);
return NULL;
}
-
+
document->output_stream = output_stream;
document->refcount = 1;
document->owner = NULL;
@@ -1863,13 +1863,13 @@ _cairo_svg_document_create (cairo_output
document->xml_node_defs = xmlNewChild (node, NULL, CC2XML ("defs"), NULL);
xml_buffer = xmlBufferCreate ();
-
+
_cairo_dtostr (buffer, sizeof buffer, width);
xmlBufferCat (xml_buffer, C2XML (buffer));
xmlBufferCat (xml_buffer, CC2XML ("pt"));
xmlSetProp (node, CC2XML ("width"), C2XML (xmlBufferContent (xml_buffer)));
xmlBufferEmpty (xml_buffer);
-
+
_cairo_dtostr (buffer, sizeof buffer, height);
xmlBufferCat (xml_buffer, C2XML (buffer));
xmlBufferCat (xml_buffer, CC2XML ("pt"));
@@ -1883,7 +1883,7 @@ _cairo_svg_document_create (cairo_output
_cairo_dtostr (buffer, sizeof buffer, height);
xmlBufferCat (xml_buffer, C2XML (buffer));
xmlSetProp (node, CC2XML ("viewBox"), C2XML (xmlBufferContent (xml_buffer)));
-
+
xmlBufferFree (xml_buffer);
xmlNewNs (node, CC2XML ("http://www.w3.org/2000/svg"), NULL);
@@ -1927,7 +1927,7 @@ _cairo_svg_document_write (cairo_output_
int len)
{
cairo_status_t status;
-
+
_cairo_output_stream_write (output_stream, buffer, len);
status = _cairo_output_stream_get_status (output_stream);
if (status) {
diff --git a/src/cairo-traps.c b/src/cairo-traps.c
index 6733ca5..a3f1fca 100644
--- a/src/cairo-traps.c
+++ b/src/cairo-traps.c
@@ -102,13 +102,13 @@ _cairo_traps_init_box (cairo_traps_t *tr
cairo_box_t *box)
{
cairo_status_t status;
-
+
_cairo_traps_init (traps);
-
+
status = _cairo_traps_grow_by (traps, 1);
if (status)
return status;
-
+
traps->num_traps = 1;
traps->traps[0].top = box->p1.y;
@@ -165,12 +165,12 @@ _cairo_traps_add_trap (cairo_traps_t *tr
traps->extents.p1.x = left->p1.x;
if (left->p2.x < traps->extents.p1.x)
traps->extents.p1.x = left->p2.x;
-
+
if (right->p1.x > traps->extents.p2.x)
traps->extents.p2.x = right->p1.x;
if (right->p2.x > traps->extents.p2.x)
traps->extents.p2.x = right->p2.x;
-
+
traps->num_traps++;
return CAIRO_STATUS_SUCCESS;
@@ -540,7 +540,7 @@ _line_segs_intersect_ceil (cairo_line_t
dy2 = l2->p1.y - l2->p2.y;
den_det = _det16_32 (dx1, dy1,
dx2, dy2);
-
+
if (_cairo_int64_eq (den_det, _cairo_int32_to_int64(0)))
return 0;
@@ -549,26 +549,26 @@ _line_segs_intersect_ceil (cairo_line_t
l2_det = _det16_32 (l2->p1.x, l2->p1.y,
l2->p2.x, l2->p2.y);
-
+
num_det = _det32_64 (l1_det, _fixed_16_16_to_fixed_32_32 (dy1),
l2_det, _fixed_16_16_to_fixed_32_32 (dy2));
-
+
/*
* Ok, this one is a bit tricky in fixed point, the denominator
* needs to be left with 32-bits of fraction so that the
* result of the divide ends up with 32-bits of fraction (64 - 32 = 32)
*/
qr = _cairo_int128_divrem (num_det, _cairo_int64_to_int128 (den_det));
-
+
intersect_32_32 = _cairo_int128_to_int64 (qr.quo);
-
+
/*
* Find the ceiling of the quotient -- divrem returns
* the quotient truncated towards zero, so if the
* quotient should be positive (num_den and den_det have same sign)
* bump the quotient up by one.
*/
-
+
if (_cairo_int128_ne (qr.rem, _cairo_int32_to_int128 (0)) &&
(_cairo_int128_ge (num_det, _cairo_int32_to_int128 (0)) ==
_cairo_int64_ge (den_det, _cairo_int32_to_int64 (0))))
@@ -576,7 +576,7 @@ _line_segs_intersect_ceil (cairo_line_t
intersect_32_32 = _cairo_int64_add (intersect_32_32,
_cairo_int32_to_int64 (1));
}
-
+
/*
* Now convert from 32.32 to 48.16 and take the ceiling;
* this requires adding in 15 1 bits and shifting the result
@@ -585,12 +585,12 @@ _line_segs_intersect_ceil (cairo_line_t
intersect_32_32 = _cairo_int64_add (intersect_32_32,
_cairo_int32_to_int64 ((1 << 16) - 1));
intersect_48_16 = _cairo_int64_rsa (intersect_32_32, 16);
-
+
/*
* And drop the top bits
*/
intersect_16_16 = _cairo_int64_to_int32 (intersect_48_16);
-
+
*y_intersection = intersect_16_16;
return 1;
@@ -741,7 +741,7 @@ _cairo_traps_tessellate_polygon (cairo_t
return CAIRO_STATUS_SUCCESS;
qsort (edges, num_edges, sizeof (cairo_edge_t), _compare_cairo_edge_by_top);
-
+
y = edges[0].edge.p1.y;
active = 0;
inactive = 0;
@@ -809,12 +809,12 @@ static cairo_bool_t
_cairo_trap_contains (cairo_trapezoid_t *t, cairo_point_t *pt)
{
cairo_slope_t slope_left, slope_pt, slope_right;
-
+
if (t->top > pt->y)
return FALSE;
if (t->bottom < pt->y)
return FALSE;
-
+
_cairo_slope_init (&slope_left, &t->left.p1, &t->left.p2);
_cairo_slope_init (&slope_pt, &t->left.p1, pt);
@@ -882,7 +882,7 @@ _cairo_traps_extract_region (cairo_traps
*region = NULL;
return CAIRO_STATUS_SUCCESS;
}
-
+
*region = pixman_region_create ();
for (i = 0; i < traps->num_traps; i++) {
@@ -897,7 +897,7 @@ _cairo_traps_extract_region (cairo_traps
*/
if (width == 0 || height == 0)
continue;
-
+
if (pixman_region_union_rect (*region, *region,
x, y, width, height) != PIXMAN_REGION_STATUS_SUCCESS) {
pixman_region_destroy (*region);
diff --git a/src/cairo-unicode.c b/src/cairo-unicode.c
index 8929baa..0c0dff2 100644
--- a/src/cairo-unicode.c
+++ b/src/cairo-unicode.c
@@ -84,7 +84,7 @@
((Char) < 0x10000 ? 3 : \
((Char) < 0x200000 ? 4 : \
((Char) < 0x4000000 ? 5 : 6)))))
-
+
#define UTF8_GET(Result, Chars, Count, Mask, Len) \
(Result) = (Chars)[0] & (Mask); \
@@ -104,8 +104,8 @@
(((Char) & 0xFFFFF800) != 0xD800) && \
((Char) < 0xFDD0 || (Char) > 0xFDEF) && \
((Char) & 0xFFFE) != 0xFFFE)
-
-
+
+
static const char utf8_skip_data[256] = {
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
@@ -170,7 +170,7 @@ _utf8_get_char_extended (const unsigned
} else {
return (uint32_t)-1;
}
-
+
if (max_len >= 0 && len > max_len) {
for (i = 1; i < max_len; i++) {
if ((((unsigned char *)p)[i] & 0xc0) != 0x80)
@@ -181,7 +181,7 @@ _utf8_get_char_extended (const unsigned
for (i = 1; i < len; ++i) {
uint32_t ch = ((unsigned char *)p)[i];
-
+
if ((ch & 0xc0) != 0x80) {
if (ch)
return (uint32_t)-1;
@@ -195,7 +195,7 @@ _utf8_get_char_extended (const unsigned
if (UTF8_LENGTH(wc) != len)
return (uint32_t)-1;
-
+
return wc;
}
@@ -228,7 +228,7 @@ _cairo_utf8_to_ucs4 (const unsigned char
uint32_t *str32 = NULL;
int n_chars, i;
const unsigned char *in;
-
+
in = str;
n_chars = 0;
while ((len < 0 || str + len - in > 0) && *in)
@@ -236,7 +236,7 @@ _cairo_utf8_to_ucs4 (const unsigned char
uint32_t wc = _utf8_get_char_extended (in, str + len - in);
if (wc & 0x80000000 || !UNICODE_VALID (wc))
return CAIRO_STATUS_INVALID_STRING;
-
+
n_chars++;
if (n_chars == INT_MAX)
return CAIRO_STATUS_INVALID_STRING;
@@ -247,7 +247,7 @@ _cairo_utf8_to_ucs4 (const unsigned char
str32 = malloc (sizeof (uint32_t) * (n_chars + 1));
if (!str32)
return CAIRO_STATUS_NO_MEMORY;
-
+
in = str;
for (i=0; i < n_chars; i++) {
str32[i] = _utf8_get_char (in);
@@ -299,23 +299,23 @@ _cairo_utf8_to_utf16 (const unsigned cha
uint32_t wc = _utf8_get_char_extended (in, str + len - in);
if (wc & 0x80000000 || !UNICODE_VALID (wc))
return CAIRO_STATUS_INVALID_STRING;
-
+
if (wc < 0x10000)
n16 += 1;
else
n16 += 2;
-
+
if (n16 == INT_MAX - 1 || n16 == INT_MAX)
return CAIRO_STATUS_INVALID_STRING;
-
+
in = UTF8_NEXT_CHAR (in);
}
-
+
str16 = malloc (sizeof (uint16_t) * (n16 + 1));
if (!str16)
return CAIRO_STATUS_NO_MEMORY;
-
+
in = str;
for (i = 0; i < n16;) {
uint32_t wc = _utf8_get_char (in);
@@ -326,7 +326,7 @@ _cairo_utf8_to_utf16 (const unsigned cha
str16[i++] = (wc - 0x10000) / 0x400 + 0xd800;
str16[i++] = (wc - 0x10000) % 0x400 + 0xdc00;
}
-
+
in = UTF8_NEXT_CHAR (in);
}
diff --git a/src/cairo-wideint.c b/src/cairo-wideint.c
index 89df00b..b5fd555 100644
--- a/src/cairo-wideint.c
+++ b/src/cairo-wideint.c
@@ -113,7 +113,7 @@ cairo_uint64_t
_cairo_uint32x32_64_mul (uint32_t a, uint32_t b)
{
cairo_uint64_t s;
-
+
uint16_t ah, al, bh, bl;
uint32_t r0, r1, r2, r3;
@@ -153,7 +153,7 @@ cairo_uint64_t
_cairo_uint64_mul (cairo_uint64_t a, cairo_uint64_t b)
{
cairo_uint64_t s;
-
+
s = _cairo_uint32x32_64_mul (a.lo, b.lo);
s.hi += a.lo * b.hi + a.hi * b.lo;
return s;
@@ -262,9 +262,9 @@ _cairo_uint64_divrem (cairo_uint64_t num
cairo_uquorem64_t qr;
cairo_uint64_t bit;
cairo_uint64_t quo;
-
+
bit = _cairo_uint32_to_uint64 (1);
-
+
/* normalize to make den >= num, but not overflow */
while (_cairo_uint64_lt (den, num) && (den.hi & 0x80000000) == 0)
{
@@ -272,7 +272,7 @@ _cairo_uint64_divrem (cairo_uint64_t num
den = _cairo_uint64_lsl (den, 1);
}
quo = _cairo_uint32_to_uint64 (0);
-
+
/* generate quotient, one bit at a time */
while (bit.hi | bit.lo)
{
@@ -588,9 +588,9 @@ _cairo_uint128_divrem (cairo_uint128_t n
cairo_uquorem128_t qr;
cairo_uint128_t bit;
cairo_uint128_t quo;
-
+
bit = _cairo_uint32_to_uint128 (1);
-
+
/* normalize to make den >= num, but not overflow */
while (_cairo_uint128_lt (den, num) && !_cairo_msbset64(den.hi))
{
@@ -598,7 +598,7 @@ _cairo_uint128_divrem (cairo_uint128_t n
den = _cairo_uint128_lsl (den, 1);
}
quo = _cairo_uint32_to_uint128 (0);
-
+
/* generate quotient, one bit at a time */
while (_cairo_uint128_ne (bit, _cairo_uint32_to_uint128(0)))
{
diff --git a/src/cairo-wideint.h b/src/cairo-wideint.h
index 795cde7..aed9e44 100644
--- a/src/cairo-wideint.h
+++ b/src/cairo-wideint.h
@@ -185,7 +185,7 @@ _cairo_int64_divrem (cairo_int64_t num,
* case the machine has a native 128-bit datatype. GCC supports int128_t
* on ia64
*/
-
+
#if !HAVE_UINT128_T
typedef struct cairo_uint128 {
diff --git a/src/cairo-win32-font.c b/src/cairo-win32-font.c
index ac455b4..81aadae 100644
--- a/src/cairo-win32-font.c
+++ b/src/cairo-win32-font.c
@@ -89,7 +89,7 @@ typedef struct {
cairo_bool_t swap_y;
double x_scale;
double y_scale;
-
+
/* The size of the design unit of the font
*/
int em_square;
@@ -126,7 +126,7 @@ _compute_transform (cairo_win32_scaled_f
scaled_font->y_scale = sc->yy;
scaled_font->swap_y = (sc->yy < 0);
scaled_font->swap_axes = FALSE;
-
+
} else if (NEARLY_ZERO (sc->xx) && NEARLY_ZERO (sc->yy)) {
scaled_font->preserve_axes = TRUE;
scaled_font->x_scale = sc->yx;
@@ -145,7 +145,7 @@ _compute_transform (cairo_win32_scaled_f
scaled_font->x_scale = - scaled_font->x_scale;
if (scaled_font->swap_y)
scaled_font->y_scale = - scaled_font->y_scale;
-
+
scaled_font->logical_scale = WIN32_FONT_LOGICAL_SCALE * scaled_font->y_scale;
scaled_font->logical_size = WIN32_FONT_LOGICAL_SCALE * floor (scaled_font->y_scale + 0.5);
}
@@ -169,7 +169,7 @@ _compute_transform (cairo_win32_scaled_f
1.0 / scaled_font->logical_scale, 1.0 / scaled_font->logical_scale);
scaled_font->device_to_logical = scaled_font->logical_to_device;
-
+
status = cairo_matrix_invert (&scaled_font->device_to_logical);
if (status)
cairo_matrix_init_identity (&scaled_font->device_to_logical);
@@ -179,14 +179,14 @@ static cairo_bool_t
_have_cleartype_quality (void)
{
OSVERSIONINFO version_info;
-
+
version_info.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
-
+
if (!GetVersionEx (&version_info)) {
_cairo_win32_print_gdi_error ("_have_cleartype_quality");
return FALSE;
}
-
+
return (version_info.dwMajorVersion > 5 ||
(version_info.dwMajorVersion == 5 &&
version_info.dwMinorVersion >= 1)); /* XP or newer */
@@ -268,7 +268,7 @@ _win32_scaled_font_create (LOGFONTW
ASSERT_NOT_REACHED;
}
}
-
+
f->em_square = 0;
f->scaled_hfont = hfont;
f->unscaled_hfont = NULL;
@@ -297,7 +297,7 @@ _win32_scaled_font_set_world_transform (
HDC hdc)
{
XFORM xform;
-
+
xform.eM11 = scaled_font->logical_to_device.xx;
xform.eM21 = scaled_font->logical_to_device.xy;
xform.eM12 = scaled_font->logical_to_device.yx;
@@ -387,7 +387,7 @@ _win32_scaled_font_get_unscaled_hfont (c
_cairo_win32_print_gdi_error ("_win32_scaled_font_get_unscaled_hfont:GetOutlineTextMetrics");
return NULL;
}
-
+
otm = malloc (otm_size);
if (!otm)
return NULL;
@@ -400,14 +400,14 @@ _win32_scaled_font_get_unscaled_hfont (c
scaled_font->em_square = otm->otmEMSquare;
free (otm);
-
+
logfont = scaled_font->logfont;
logfont.lfHeight = -scaled_font->em_square;
logfont.lfWidth = 0;
logfont.lfEscapement = 0;
logfont.lfOrientation = 0;
logfont.lfQuality = scaled_font->quality;
-
+
scaled_font->unscaled_hfont = CreateFontIndirectW (&logfont);
if (!scaled_font->unscaled_hfont) {
_cairo_win32_print_gdi_error ("_win32_scaled_font_get_unscaled_hfont:CreateIndirect");
@@ -518,7 +518,7 @@ _cairo_win32_scaled_font_create_toy (cai
if (!logfont.lfFaceName)
return CAIRO_STATUS_NO_MEMORY;
-
+
scaled_font = _win32_scaled_font_create (&logfont, NULL, &toy_face->base,
font_matrix, ctm, options);
if (!scaled_font)
@@ -570,7 +570,7 @@ _cairo_win32_scaled_font_text_to_glyphs
cairo_matrix_transform_distance (&scaled_font->base.font_matrix, &x_incr, &y_incr);
x_incr /= scaled_font->logical_scale;
y_incr /= scaled_font->logical_scale;
-
+
status = _cairo_utf8_to_utf16 (utf8, -1, &utf16, &n16);
if (status)
return status;
@@ -580,13 +580,13 @@ _cairo_win32_scaled_font_text_to_glyphs
gcp_results.lpOrder = NULL;
gcp_results.lpCaretPos = NULL;
gcp_results.lpClass = NULL;
-
+
buffer_size = MAX (n16 * 1.2, 16); /* Initially guess number of chars plus a few */
if (buffer_size > INT_MAX) {
status = CAIRO_STATUS_NO_MEMORY;
goto FAIL1;
}
-
+
hdc = _get_global_font_dc ();
if (!hdc) {
status = CAIRO_STATUS_NO_MEMORY;
@@ -596,7 +596,7 @@ _cairo_win32_scaled_font_text_to_glyphs
status = cairo_win32_scaled_font_select_font (&scaled_font->base, hdc);
if (status)
goto FAIL1;
-
+
while (TRUE) {
if (glyph_indices) {
free (glyph_indices);
@@ -606,7 +606,7 @@ _cairo_win32_scaled_font_text_to_glyphs
free (dx);
dx = NULL;
}
-
+
glyph_indices = malloc (sizeof (WCHAR) * buffer_size);
dx = malloc (sizeof (int) * buffer_size);
if (!glyph_indices || !dx) {
@@ -630,7 +630,7 @@ _cairo_win32_scaled_font_text_to_glyphs
break;
/* Too small a buffer, try again */
-
+
buffer_size *= 1.5;
if (buffer_size > INT_MAX) {
status = CAIRO_STATUS_NO_MEMORY;
@@ -647,7 +647,7 @@ _cairo_win32_scaled_font_text_to_glyphs
x_pos = x;
y_pos = y;
-
+
for (i = 0; i < gcp_results.nGlyphs; i++) {
(*glyphs)[i].index = glyph_indices[i];
(*glyphs)[i].x = x_pos ;
@@ -662,12 +662,12 @@ _cairo_win32_scaled_font_text_to_glyphs
free (glyph_indices);
if (dx)
free (dx);
-
+
cairo_win32_scaled_font_done_font (&scaled_font->base);
-
+
FAIL1:
free (utf16);
-
+
return status;
}
@@ -718,7 +718,7 @@ _cairo_win32_scaled_font_set_metrics (ca
extents.height = (double)(metrics.tmHeight + metrics.tmExternalLeading) / scaled_font->em_square;
extents.max_x_advance = (double)(metrics.tmMaxCharWidth) / scaled_font->em_square;
extents.max_y_advance = 0;
-
+
}
_cairo_scaled_font_set_metrics (&scaled_font->base, &extents);
@@ -780,7 +780,7 @@ _cairo_win32_scaled_font_init_glyph_metr
extents.y_bearing = (- extents.y_bearing - extents.height);
extents.y_advance = - extents.y_advance;
}
-
+
} else {
/* For all other transformations, we use the design metrics
* of the font.
@@ -870,7 +870,7 @@ _cairo_win32_scaled_font_glyph_bbox (voi
typedef struct {
cairo_win32_scaled_font_t *scaled_font;
HDC hdc;
-
+
cairo_array_t glyphs;
cairo_array_t dx;
@@ -902,7 +902,7 @@ _flush_glyphs (cairo_glyph_state_t *stat
status = _cairo_array_append (&state->dx, &dx);
if (status)
return status;
-
+
elements = _cairo_array_index (&state->glyphs, 0);
dx_elements = _cairo_array_index (&state->dx, 0);
if (!ExtTextOutW (state->hdc,
@@ -914,7 +914,7 @@ _flush_glyphs (cairo_glyph_state_t *stat
dx_elements)) {
return _cairo_win32_print_gdi_error ("_flush_glyphs");
}
-
+
_cairo_array_truncate (&state->glyphs, 0);
_cairo_array_truncate (&state->dx, 0);
@@ -940,14 +940,14 @@ _add_glyph (cairo_glyph_state_t *state,
if (state->glyphs.num_elements > 0) {
int dx;
-
+
if (logical_y != state->last_y) {
status = _flush_glyphs (state);
if (status)
return status;
state->start_x = logical_x;
}
-
+
dx = logical_x - state->last_x;
status = _cairo_array_append (&state->dx, &dx);
if (status)
@@ -958,7 +958,7 @@ _add_glyph (cairo_glyph_state_t *state,
state->last_x = logical_x;
state->last_y = logical_y;
-
+
status = _cairo_array_append (&state->glyphs, &glyph_index);
if (status)
return status;
@@ -998,7 +998,7 @@ _draw_glyphs_on_surface (cairo_win32_sur
SetTextColor (surface->dc, color);
SetTextAlign (surface->dc, TA_BASELINE | TA_LEFT);
SetBkMode (surface->dc, TRANSPARENT);
-
+
_start_glyphs (&state, scaled_font, surface->dc);
for (i = 0; i < num_glyphs; i++) {
@@ -1013,10 +1013,10 @@ _draw_glyphs_on_surface (cairo_win32_sur
cairo_win32_scaled_font_done_font (&scaled_font->base);
FAIL1:
RestoreDC (surface->dc, -1);
-
+
return status;
}
-
+
/* Duplicate the green channel of a 4-channel mask in the alpha channel, then
* invert the whole mask.
*/
@@ -1069,7 +1069,7 @@ _compute_a8_mask (cairo_win32_surface_t
for (i = 0; i < image24->height; i++) {
uint32_t *p = (uint32_t *) (image24->data + i * image24->stride);
unsigned char *q = (unsigned char *) (image8->data + i * image8->stride);
-
+
for (j = 0; j < image24->width; j++) {
*q = 255 - ((*p & 0x0000ff00) >> 8);
p++;
@@ -1140,7 +1140,7 @@ _cairo_win32_scaled_font_show_glyphs (vo
* solid opaque color, we can just call ExtTextOut directly.
*/
COLORREF new_color;
-
+
new_color = RGB (((int)solid_pattern->color.red_short) >> 8,
((int)solid_pattern->color.green_short) >> 8,
((int)solid_pattern->color.blue_short) >> 8);
@@ -1148,7 +1148,7 @@ _cairo_win32_scaled_font_show_glyphs (vo
status = _draw_glyphs_on_surface (surface, scaled_font, new_color,
0, 0,
glyphs, num_glyphs);
-
+
return status;
} else {
/* Otherwise, we need to draw using software fallbacks. We create a mask
@@ -1187,12 +1187,12 @@ _cairo_win32_scaled_font_show_glyphs (vo
_compute_argb32_mask_alpha (tmp_surface);
else
_invert_argb32_mask (tmp_surface);
-
+
mask_surface = &tmp_surface->base;
/* XXX: Hacky, should expose this in cairo_image_surface */
pixman_image_set_component_alpha (((cairo_image_surface_t *)tmp_surface->image)->pixman_image, TRUE);
-
+
} else {
mask_surface = _compute_a8_mask (tmp_surface);
cairo_surface_destroy (&tmp_surface->base);
@@ -1215,7 +1215,7 @@ _cairo_win32_scaled_font_show_glyphs (vo
width, height);
_cairo_pattern_fini (&mask.base);
-
+
cairo_surface_destroy (mask_surface);
return status;
@@ -1251,18 +1251,18 @@ _cairo_win32_scaled_font_init_glyph_path
status = cairo_win32_scaled_font_select_font (&scaled_font->base, hdc);
if (status)
goto CLEANUP_PATH;
-
+
bytesGlyph = GetGlyphOutlineW (hdc, _cairo_scaled_glyph_index (scaled_glyph),
GGO_NATIVE | GGO_GLYPH_INDEX,
&metrics, 0, NULL, &matrix);
-
+
if (bytesGlyph == GDI_ERROR) {
status = _cairo_win32_print_gdi_error ("_cairo_win32_scaled_font_glyph_path");
goto CLEANUP_FONT;
}
ptr = buffer = malloc (bytesGlyph);
-
+
if (!buffer) {
status = CAIRO_STATUS_NO_MEMORY;
goto CLEANUP_FONT;
@@ -1275,13 +1275,13 @@ _cairo_win32_scaled_font_init_glyph_path
free (buffer);
goto CLEANUP_FONT;
}
-
+
while (ptr < buffer + bytesGlyph) {
TTPOLYGONHEADER *header = (TTPOLYGONHEADER *)ptr;
unsigned char *endPoly = ptr + header->cb;
-
+
ptr += sizeof (TTPOLYGONHEADER);
-
+
_cairo_path_fixed_move_to (path,
_cairo_fixed_from_FIXED (header->pfxStart.x),
_cairo_fixed_from_FIXED (header->pfxStart.y));
@@ -1304,7 +1304,7 @@ _cairo_win32_scaled_font_init_glyph_path
_cairo_path_fixed_get_current_point (path, &p1x, &p1y);
cx = _cairo_fixed_from_FIXED (points[i].x);
cy = _cairo_fixed_from_FIXED (points[i].y);
-
+
if (i + 1 == curve->cpfx - 1) {
p2x = _cairo_fixed_from_FIXED (points[i + 1].x);
p2y = _cairo_fixed_from_FIXED (points[i + 1].y);
@@ -1314,12 +1314,12 @@ _cairo_win32_scaled_font_init_glyph_path
p2x = (cx + _cairo_fixed_from_FIXED (points[i + 1].x)) / 2;
p2y = (cy + _cairo_fixed_from_FIXED (points[i + 1].y)) / 2;
}
-
+
c1x = 2 * cx / 3 + p1x / 3;
c1y = 2 * cy / 3 + p1y / 3;
c2x = 2 * cx / 3 + p2x / 3;
c2y = 2 * cy / 3 + p2y / 3;
-
+
_cairo_path_fixed_curve_to (path, c1x, c1y, c2x, c2y, p2x, p2y);
}
break;
@@ -1434,10 +1434,10 @@ cairo_win32_font_face_create_for_logfont
_cairo_error (CAIRO_STATUS_NO_MEMORY);
return (cairo_font_face_t *)&_cairo_font_face_nil;
}
-
+
font_face->logfont = *logfont;
font_face->hfont = NULL;
-
+
_cairo_font_face_init (&font_face->base, &_cairo_win32_font_face_backend);
return &font_face->base;
@@ -1454,9 +1454,9 @@ cairo_win32_font_face_create_for_hfont (
_cairo_error (CAIRO_STATUS_NO_MEMORY);
return (cairo_font_face_t *)&_cairo_font_face_nil;
}
-
+
font_face->hfont = font;
-
+
_cairo_font_face_init (&font_face->base, &_cairo_win32_font_face_backend);
return &font_face->base;
diff --git a/src/cairo-win32-private.h b/src/cairo-win32-private.h
index 01fa294..d74b84e 100644
--- a/src/cairo-win32-private.h
+++ b/src/cairo-win32-private.h
@@ -52,7 +52,7 @@ typedef struct _cairo_win32_surface {
cairo_surface_t base;
cairo_format_t format;
-
+
HDC dc;
/* We create off-screen surfaces as DIBs */
@@ -66,9 +66,9 @@ typedef struct _cairo_win32_surface {
* on some versions of Windows.
*/
HBITMAP saved_dc_bitmap;
-
+
cairo_surface_t *image;
-
+
cairo_rectangle_fixed_t clip_rect;
HRGN saved_clip;
diff --git a/src/cairo-win32-surface.c b/src/cairo-win32-surface.c
index fd7f9e0..d6d109c 100644
--- a/src/cairo-win32-surface.c
+++ b/src/cairo-win32-surface.c
@@ -75,7 +75,7 @@ _cairo_win32_print_gdi_error (const char
fprintf (stderr, "%s: Unknown GDI error", context);
} else {
fprintf (stderr, "%s: %s", context, (char *)lpMsgBuf);
-
+
LocalFree (lpMsgBuf);
}
@@ -116,11 +116,11 @@ _create_dc_and_bitmap (cairo_win32_surfa
case CAIRO_FORMAT_RGB24:
num_palette = 0;
break;
-
+
case CAIRO_FORMAT_A8:
num_palette = 256;
break;
-
+
case CAIRO_FORMAT_A1:
num_palette = 2;
break;
@@ -141,7 +141,7 @@ _create_dc_and_bitmap (cairo_win32_surfa
bitmap_info->bmiHeader.biXPelsPerMeter = 72. / 0.0254; /* unused here */
bitmap_info->bmiHeader.biYPelsPerMeter = 72. / 0.0254; /* unused here */
bitmap_info->bmiHeader.biPlanes = 1;
-
+
switch (format) {
/* We can't create real RGB24 bitmaps because something seems to
* break if we do, especially if we don't set up an image
@@ -155,7 +155,7 @@ _create_dc_and_bitmap (cairo_win32_surfa
bitmap_info->bmiHeader.biClrUsed = 0; /* unused */
bitmap_info->bmiHeader.biClrImportant = 0;
break;
-
+
case CAIRO_FORMAT_A8:
bitmap_info->bmiHeader.biBitCount = 8;
bitmap_info->bmiHeader.biCompression = BI_RGB;
@@ -168,9 +168,9 @@ _create_dc_and_bitmap (cairo_win32_surfa
bitmap_info->bmiColors[i].rgbRed = i;
bitmap_info->bmiColors[i].rgbReserved = 0;
}
-
+
break;
-
+
case CAIRO_FORMAT_A1:
bitmap_info->bmiHeader.biBitCount = 1;
bitmap_info->bmiHeader.biCompression = BI_RGB;
@@ -204,7 +204,7 @@ _create_dc_and_bitmap (cairo_win32_surfa
surface->bitmap);
if (!surface->saved_dc_bitmap)
goto FAIL;
-
+
if (bitmap_info && num_palette > 2)
free (bitmap_info);
@@ -218,11 +218,11 @@ _create_dc_and_bitmap (cairo_win32_surfa
case CAIRO_FORMAT_RGB24:
*rowstride_out = 4 * width;
break;
-
+
case CAIRO_FORMAT_A8:
*rowstride_out = (width + 3) & ~3;
break;
-
+
case CAIRO_FORMAT_A1:
*rowstride_out = ((width + 31) & ~31) / 8;
break;
@@ -233,7 +233,7 @@ _create_dc_and_bitmap (cairo_win32_surfa
FAIL:
status = _cairo_win32_print_gdi_error ("_create_dc_and_bitmap");
-
+
if (bitmap_info && num_palette > 2)
free (bitmap_info);
@@ -241,17 +241,17 @@ _create_dc_and_bitmap (cairo_win32_surfa
SelectObject (surface->dc, surface->saved_dc_bitmap);
surface->saved_dc_bitmap = NULL;
}
-
+
if (surface->bitmap) {
DeleteObject (surface->bitmap);
surface->bitmap = NULL;
}
-
+
if (surface->dc) {
DeleteDC (surface->dc);
surface->dc = NULL;
}
-
+
return status;
}
@@ -284,9 +284,9 @@ _cairo_win32_surface_create_for_dc (HDC
status = CAIRO_STATUS_NO_MEMORY;
goto FAIL;
}
-
+
surface->format = format;
-
+
surface->clip_rect.x = 0;
surface->clip_rect.y = 0;
surface->clip_rect.width = width;
@@ -375,7 +375,7 @@ _cairo_win32_surface_get_subimage (cairo
height);
if (local->base.status)
return CAIRO_STATUS_NO_MEMORY;
-
+
if (!BitBlt (local->dc,
0, 0,
width, height,
@@ -395,7 +395,7 @@ _cairo_win32_surface_get_subimage (cairo
}
*local_out = local;
-
+
return CAIRO_STATUS_SUCCESS;
FAIL:
@@ -441,7 +441,7 @@ _cairo_win32_surface_release_source_imag
void *image_extra)
{
cairo_win32_surface_t *local = image_extra;
-
+
if (local)
cairo_surface_destroy ((cairo_surface_t *)local);
}
@@ -489,14 +489,14 @@ _cairo_win32_surface_acquire_dest_image
x2 = interest_rect->x + interest_rect->width;
if (interest_rect->y + interest_rect->height < y2)
y2 = interest_rect->y + interest_rect->height;
-
+
if (x1 >= x2 || y1 >= y2) {
*image_out = NULL;
*image_extra = NULL;
-
+
return CAIRO_STATUS_SUCCESS;
}
-
+
status = _cairo_win32_surface_get_subimage (abstract_surface,
x1, y1, x2 - x1, y2 - y1,
&local);
@@ -505,7 +505,7 @@ _cairo_win32_surface_acquire_dest_image
*image_out = (cairo_image_surface_t *)local->image;
*image_extra = local;
-
+
image_rect->x = x1;
image_rect->y = y1;
image_rect->width = x2 - x1;
@@ -523,7 +523,7 @@ _cairo_win32_surface_release_dest_image
{
cairo_win32_surface_t *surface = abstract_surface;
cairo_win32_surface_t *local = image_extra;
-
+
if (!local)
return;
@@ -588,22 +588,22 @@ _composite_alpha_blend (cairo_win32_surf
*/
if (!alpha_blend_checked) {
OSVERSIONINFO os;
-
+
os.dwOSVersionInfoSize = sizeof (os);
GetVersionEx (&os);
-
+
/* If running on Win98, disable using AlphaBlend()
* to avoid Win98 AlphaBlend() bug */
if (VER_PLATFORM_WIN32_WINDOWS != os.dwPlatformId ||
os.dwMajorVersion != 4 || os.dwMinorVersion != 10)
{
HMODULE msimg32_dll = LoadLibrary ("msimg32");
-
+
if (msimg32_dll != NULL)
alpha_blend = (cairo_alpha_blend_func_t)GetProcAddress (msimg32_dll,
"AlphaBlend");
}
-
+
alpha_blend_checked = TRUE;
}
@@ -611,7 +611,7 @@ _composite_alpha_blend (cairo_win32_surf
return CAIRO_INT_STATUS_UNSUPPORTED;
if (GetDeviceCaps(dst->dc, SHADEBLENDCAPS) == SB_NONE)
return CAIRO_INT_STATUS_UNSUPPORTED;
-
+
blend_function.BlendOp = AC_SRC_OVER;
blend_function.BlendFlags = 0;
blend_function.SourceConstantAlpha = alpha;
@@ -625,7 +625,7 @@ _composite_alpha_blend (cairo_win32_surf
width, height,
blend_function))
return _cairo_win32_print_gdi_error ("_cairo_win32_surface_composite");
-
+
return CAIRO_STATUS_SUCCESS;
}
@@ -671,7 +671,7 @@ _cairo_win32_surface_composite (cairo_op
if (src->base.backend != dst->base.backend)
return CAIRO_INT_STATUS_UNSUPPORTED;
-
+
integer_transform = _cairo_matrix_is_integer_translation (&pattern->matrix, &itx, &ity);
if (!integer_transform)
return CAIRO_INT_STATUS_UNSUPPORTED;
@@ -706,7 +706,7 @@ _cairo_win32_surface_composite (cairo_op
if (alpha == 255 &&
(op == CAIRO_OPERATOR_SOURCE ||
(src->format == CAIRO_FORMAT_RGB24 && op == CAIRO_OPERATOR_OVER))) {
-
+
if (!BitBlt (dst->dc,
dst_x, dst_y,
width, height,
@@ -716,7 +716,7 @@ _cairo_win32_surface_composite (cairo_op
return _cairo_win32_print_gdi_error ("_cairo_win32_surface_composite");
return CAIRO_STATUS_SUCCESS;
-
+
} else if ((src->format == CAIRO_FORMAT_RGB24 || src->format == CAIRO_FORMAT_ARGB32) &&
(dst->format == CAIRO_FORMAT_RGB24 || dst->format == CAIRO_FORMAT_ARGB32) &&
op == CAIRO_OPERATOR_OVER) {
@@ -725,7 +725,7 @@ _cairo_win32_surface_composite (cairo_op
src_x, src_y,
dst_x, dst_y, width, height);
}
-
+
return CAIRO_INT_STATUS_UNSUPPORTED;
}
@@ -747,13 +747,13 @@ categorize_solid_dest_operator (cairo_op
source = SOURCE_TRANSPARENT;
else
source = SOURCE_OTHER;
-
+
switch (op) {
case CAIRO_OPERATOR_CLEAR: /* 0 0 */
case CAIRO_OPERATOR_OUT: /* 1 - Ab 0 */
return DO_CLEAR;
break;
-
+
case CAIRO_OPERATOR_SOURCE: /* 1 0 */
case CAIRO_OPERATOR_IN: /* Ab 0 */
return DO_SOURCE;
@@ -768,7 +768,7 @@ categorize_solid_dest_operator (cairo_op
else
return DO_UNSUPPORTED;
break;
-
+
case CAIRO_OPERATOR_DEST_OUT: /* 0 1 - Aa */
case CAIRO_OPERATOR_XOR: /* 1 - Ab 1 - Aa */
if (source == SOURCE_SOLID)
@@ -778,7 +778,7 @@ categorize_solid_dest_operator (cairo_op
else
return DO_UNSUPPORTED;
break;
-
+
case CAIRO_OPERATOR_DEST: /* 0 1 */
case CAIRO_OPERATOR_DEST_OVER:/* 1 - Ab 1 */
case CAIRO_OPERATOR_SATURATE: /* min(1,(1-Ab)/Aa) 1 */
@@ -794,7 +794,7 @@ categorize_solid_dest_operator (cairo_op
else
return DO_UNSUPPORTED;
break;
-
+
case CAIRO_OPERATOR_ADD: /* 1 1 */
if (source == SOURCE_TRANSPARENT)
return DO_NOTHING;
@@ -843,11 +843,11 @@ _cairo_win32_surface_fill_rectangles (vo
default:
return CAIRO_INT_STATUS_UNSUPPORTED;
}
-
+
new_brush = CreateSolidBrush (new_color);
if (!new_brush)
return _cairo_win32_print_gdi_error ("_cairo_win32_surface_fill_rectangles");
-
+
for (i = 0; i < num_rects; i++) {
RECT rect;
@@ -861,14 +861,14 @@ _cairo_win32_surface_fill_rectangles (vo
}
DeleteObject (new_brush);
-
+
return CAIRO_STATUS_SUCCESS;
FAIL:
status = _cairo_win32_print_gdi_error ("_cairo_win32_surface_fill_rectangles");
-
+
DeleteObject (new_brush);
-
+
return status;
}
@@ -901,7 +901,7 @@ _cairo_win32_surface_set_clip_region (vo
return _cairo_win32_print_gdi_error ("_cairo_win32_surface_set_clip_region (reset)");
return CAIRO_STATUS_SUCCESS;
-
+
} else {
pixman_box16_t *boxes = pixman_region_rects (region);
int num_boxes = pixman_region_num_rects (region);
@@ -938,7 +938,7 @@ _cairo_win32_surface_set_clip_region (vo
gdi_region = ExtCreateRegion (NULL, data_size, data);
free (data);
-
+
if (!gdi_region)
return CAIRO_STATUS_NO_MEMORY;
@@ -1143,11 +1143,11 @@ cairo_win32_surface_create (HDC hdc)
surface->image = NULL;
surface->format = format;
-
+
surface->dc = hdc;
surface->bitmap = NULL;
surface->saved_dc_bitmap = NULL;
-
+
surface->clip_rect.x = rect.left;
surface->clip_rect.y = rect.top;
surface->clip_rect.width = rect.right - rect.left;
diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c
index bfa3730..648cdb6 100644
--- a/src/cairo-xcb-surface.c
+++ b/src/cairo-xcb-surface.c
@@ -277,7 +277,7 @@ _cairo_xcb_surface_create_similar (void
d.pixmap, src->drawable,
width <= 0 ? 1 : width,
height <= 0 ? 1 : height);
-
+
surface = (cairo_xcb_surface_t *)
cairo_xcb_surface_create_with_xrender_format (dpy, d,
&xrender_format,
@@ -402,7 +402,7 @@ _get_image_surface (cairo_xcb_surface_t
rect.y = interest_rect->y;
rect.width = interest_rect->width;
rect.height = interest_rect->height;
-
+
if (rect.x > x1)
x1 = rect.x;
if (rect.y > y1)
@@ -670,7 +670,7 @@ _cairo_xcb_surface_clone_similar (void
if (xcb_src->dpy == surface->dpy) {
*clone_out = cairo_surface_reference (src);
-
+
return CAIRO_STATUS_SUCCESS;
}
} else if (_cairo_surface_is_image (src)) {
@@ -679,20 +679,20 @@ _cairo_xcb_surface_clone_similar (void
if (surface->base.status)
return surface->base.status;
-
+
clone = (cairo_xcb_surface_t *)
_cairo_xcb_surface_create_similar (surface, content,
image_src->width, image_src->height);
if (clone->base.status)
return CAIRO_STATUS_NO_MEMORY;
-
+
_draw_image_surface (clone, image_src, 0, 0);
-
+
*clone_out = &clone->base;
return CAIRO_STATUS_SUCCESS;
}
-
+
return CAIRO_INT_STATUS_UNSUPPORTED;
}
@@ -727,10 +727,10 @@ _cairo_xcb_surface_set_matrix (cairo_xcb
if (memcmp (&xtransform, &identity, sizeof (XCBRenderTRANSFORM)) == 0)
return CAIRO_STATUS_SUCCESS;
-
+
return CAIRO_INT_STATUS_UNSUPPORTED;
}
-
+
XCBRenderSetPictureTransform (surface->dpy, surface->picture, xtransform);
return CAIRO_STATUS_SUCCESS;
@@ -744,15 +744,15 @@ _cairo_xcb_surface_set_filter (cairo_xcb
if (!surface->picture.xid)
return CAIRO_STATUS_SUCCESS;
-
+
if (!CAIRO_SURFACE_RENDER_HAS_FILTERS (surface))
{
if (filter == CAIRO_FILTER_FAST || filter == CAIRO_FILTER_NEAREST)
return CAIRO_STATUS_SUCCESS;
-
+
return CAIRO_INT_STATUS_UNSUPPORTED;
}
-
+
switch (filter) {
case CAIRO_FILTER_FAST:
render_filter = "fast";
@@ -803,7 +803,7 @@ _cairo_xcb_surface_set_attributes (cairo
status = _cairo_xcb_surface_set_matrix (surface, &attributes->matrix);
if (status)
return status;
-
+
switch (attributes->extend) {
case CAIRO_EXTEND_NONE:
_cairo_xcb_surface_set_repeat (surface, 0);
@@ -894,7 +894,7 @@ _cairo_xcb_surface_composite (cairo_oper
&src_attr, &mask_attr);
if (status)
return status;
-
+
status = _cairo_xcb_surface_set_attributes (src, &src_attr);
if (status == CAIRO_STATUS_SUCCESS)
{
@@ -917,7 +917,7 @@ _cairo_xcb_surface_composite (cairo_oper
else
{
static XCBRenderPICTURE maskpict = { 0 };
-
+
XCBRenderComposite (dst->dpy,
_render_operator (op),
src->picture,
@@ -933,7 +933,7 @@ _cairo_xcb_surface_composite (cairo_oper
if (mask)
_cairo_pattern_release_surface (mask_pattern, &mask->base, &mask_attr);
-
+
_cairo_pattern_release_surface (src_pattern, &src->base, &src_attr);
return status;
@@ -990,14 +990,14 @@ _cairo_xcb_surface_composite_trapezoids
if (!CAIRO_SURFACE_RENDER_HAS_TRAPEZOIDS (dst))
return CAIRO_INT_STATUS_UNSUPPORTED;
-
+
status = _cairo_pattern_acquire_surface (pattern, &dst->base,
src_x, src_y, width, height,
(cairo_surface_t **) &src,
&attributes);
if (status)
return status;
-
+
if (traps[0].left.p1.y < traps[0].left.p2.y) {
render_reference_x = _cairo_fixed_integer_floor (traps[0].left.p1.x);
render_reference_y = _cairo_fixed_integer_floor (traps[0].left.p1.y);
diff --git a/src/cairo-xlib-private.h b/src/cairo-xlib-private.h
index 966a08d..f319dcc 100644
--- a/src/cairo-xlib-private.h
+++ b/src/cairo-xlib-private.h
@@ -40,11 +40,11 @@ typedef struct _cairo_xlib_screen_info c
struct _cairo_xlib_screen_info {
cairo_xlib_screen_info_t *next;
-
+
Display *display;
Screen *screen;
cairo_bool_t has_render;
-
+
cairo_font_options_t font_options;
};
diff --git a/src/cairo-xlib-screen.c b/src/cairo-xlib-screen.c
index 8ac6d89..cbdb540 100644
--- a/src/cairo-xlib-screen.c
+++ b/src/cairo-xlib-screen.c
@@ -65,7 +65,7 @@ static int
parse_boolean (const char *v)
{
char c0, c1;
-
+
c0 = *v;
if (c0 == 't' || c0 == 'T' || c0 == 'y' || c0 == 'Y' || c0 == '1')
return 1;
@@ -79,7 +79,7 @@ parse_boolean (const char *v)
if (c1 == 'f' || c1 == 'F')
return 0;
}
-
+
return -1;
}
@@ -90,7 +90,7 @@ get_boolean_default (Display *dpy,
{
char *v;
int i;
-
+
v = XGetDefault (dpy, "Xft", option);
if (v) {
i = parse_boolean (v);
@@ -99,7 +99,7 @@ get_boolean_default (Display *dpy,
return TRUE;
}
}
-
+
return FALSE;
}
@@ -110,17 +110,17 @@ get_integer_default (Display *dpy,
{
int i;
char *v, *e;
-
+
v = XGetDefault (dpy, "Xft", option);
if (v) {
if (FcNameConstant ((FcChar8 *) v, value))
return TRUE;
-
+
i = strtol (v, &e, 0);
if (e != v)
return TRUE;
}
-
+
return FALSE;
}
@@ -145,23 +145,23 @@ _cairo_xlib_init_screen_font_options (ca
if (!get_boolean_default (info->display, "antialias", &xft_antialias))
xft_antialias = TRUE;
-
+
if (!get_boolean_default (info->display, "hinting", &xft_hinting))
xft_hinting = TRUE;
-
+
if (!get_integer_default (info->display, "hintstyle", &xft_hintstyle))
xft_hintstyle = FC_HINT_FULL;
if (!get_integer_default (info->display, "rgba", &xft_rgba))
{
xft_rgba = FC_RGBA_UNKNOWN;
-
+
#if RENDER_MAJOR > 0 || RENDER_MINOR >= 6
if (info->has_render)
{
int render_order = XRenderQuerySubpixelOrder (info->display,
XScreenNumberOfScreen (info->screen));
-
+
switch (render_order)
{
default:
@@ -208,7 +208,7 @@ _cairo_xlib_init_screen_font_options (ca
} else {
hint_style = CAIRO_HINT_STYLE_NONE;
}
-
+
switch (xft_rgba) {
case FC_RGBA_RGB:
subpixel_order = CAIRO_SUBPIXEL_ORDER_RGB;
@@ -352,7 +352,7 @@ _cairo_xlib_screen_info_get (Display *dp
info = NULL;
goto out;
}
-
+
XESetCloseDisplay (dpy, codes->extension, _cairo_xlib_close_display);
}
@@ -360,15 +360,15 @@ _cairo_xlib_screen_info_get (Display *dp
info->screen = screen;
info->has_render = (XRenderQueryExtension (dpy, &event_base, &error_base) &&
(XRenderFindVisualFormat (dpy, DefaultVisual (dpy, DefaultScreen (dpy))) != 0));
-
+
_cairo_xlib_init_screen_font_options (info);
-
+
info->next = _cairo_xlib_screen_list;
_cairo_xlib_screen_list = info;
out:
CAIRO_MUTEX_UNLOCK (_xlib_screen_mutex);
-
+
return info;
}
diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
index 0a11611..5d22ae8 100644
--- a/src/cairo-xlib-surface.c
+++ b/src/cairo-xlib-surface.c
@@ -86,13 +86,13 @@ struct _cairo_xlib_surface {
Display *dpy;
cairo_xlib_screen_info_t *screen_info;
-
+
GC gc;
Drawable drawable;
Screen *screen;
cairo_bool_t owns_pixmap;
Visual *visual;
-
+
int use_pixmap;
int render_major;
@@ -225,11 +225,11 @@ _cairo_xlib_surface_create_similar_with_
if (!CAIRO_SURFACE_RENDER_HAS_COMPOSITE(src)) {
return cairo_image_surface_create (format, width, height);
}
-
+
pix = XCreatePixmap (dpy, RootWindowOfScreen (src->screen),
width <= 0 ? 1 : width, height <= 0 ? 1 : height,
depth);
-
+
surface = (cairo_xlib_surface_t *)
cairo_xlib_surface_create_with_xrender_format (dpy, pix, src->screen,
xrender_format,
@@ -238,7 +238,7 @@ _cairo_xlib_surface_create_similar_with_
_cairo_error (CAIRO_STATUS_NO_MEMORY);
return (cairo_surface_t*) &_cairo_surface_nil;
}
-
+
surface->owns_pixmap = TRUE;
return &surface->base;
@@ -315,7 +315,7 @@ _cairo_xlib_surface_create_similar (void
_cairo_error (CAIRO_STATUS_NO_MEMORY);
return (cairo_surface_t*) &_cairo_surface_nil;
}
-
+
surface->owns_pixmap = TRUE;
return &surface->base;
@@ -327,7 +327,7 @@ _cairo_xlib_surface_finish (void *abstra
cairo_xlib_surface_t *surface = abstract_surface;
if (surface->dst_picture != None)
XRenderFreePicture (surface->dpy, surface->dst_picture);
-
+
if (surface->src_picture != None)
XRenderFreePicture (surface->dpy, surface->src_picture);
@@ -440,14 +440,14 @@ _swap_ximage_bits (XImage *ximage)
for (j = ximage->height; j; j--) {
char *p = line;
-
+
for (i = line_bytes; i; i--) {
char b = *p;
b = ((b << 1) & 0xaa) | ((b >> 1) & 0x55);
b = ((b << 2) & 0xcc) | ((b >> 2) & 0x33);
b = ((b << 4) & 0xf0) | ((b >> 4) & 0x0f);
*p = b;
-
+
p++;
}
@@ -467,7 +467,7 @@ _swap_ximage_to_native (XImage *ximage)
if (ximage->bitmap_bit_order == ximage->byte_order)
return;
}
-
+
if (ximage->byte_order == native_byte_order)
return;
@@ -521,12 +521,12 @@ _get_image_surface (cairo_xlib_surface_t
if (interest_rect) {
cairo_rectangle_fixed_t rect;
-
+
rect.x = interest_rect->x;
rect.y = interest_rect->y;
rect.width = interest_rect->width;
rect.height = interest_rect->height;
-
+
if (rect.x > x1)
x1 = rect.x;
if (rect.y > y1)
@@ -556,7 +556,7 @@ _get_image_surface (cairo_xlib_surface_t
cairo_xlib_error_func_t old_handler;
old_handler = XSetErrorHandler (_noop_error_handler);
-
+
ximage = XGetImage (surface->dpy,
surface->drawable,
x1, y1,
@@ -564,7 +564,7 @@ _get_image_surface (cairo_xlib_surface_t
AllPlanes, ZPixmap);
XSetErrorHandler (old_handler);
-
+
/* If we get an error, the surface must have been a window,
* so retry with the safe code path.
*/
@@ -576,7 +576,7 @@ _get_image_surface (cairo_xlib_surface_t
surface->use_pixmap--;
ximage = NULL;
}
-
+
if (!ximage)
{
@@ -594,20 +594,20 @@ _get_image_surface (cairo_xlib_surface_t
XCopyArea (surface->dpy, surface->drawable, pixmap, surface->gc,
x1, y1, x2 - x1, y2 - y1, 0, 0);
-
+
ximage = XGetImage (surface->dpy,
pixmap,
0, 0,
x2 - x1, y2 - y1,
AllPlanes, ZPixmap);
-
+
XFreePixmap (surface->dpy, pixmap);
}
if (!ximage)
return CAIRO_STATUS_NO_MEMORY;
_swap_ximage_to_native (ximage);
-
+
/*
* Compute the pixel format masks from either a visual or a
* XRenderFormat, failing we assume the drawable is an
@@ -675,7 +675,7 @@ _get_image_surface (cairo_xlib_surface_t
_cairo_image_surface_assume_ownership_of_data (image);
ximage->data = NULL;
XDestroyImage (ximage);
-
+
*image_out = image;
return CAIRO_STATUS_SUCCESS;
@@ -693,7 +693,7 @@ _cairo_xlib_surface_ensure_src_picture (
surface->xrender_format,
0, NULL);
}
-
+
static void
_cairo_xlib_surface_set_picture_clip_rects (cairo_xlib_surface_t *surface)
{
@@ -713,7 +713,7 @@ _cairo_xlib_surface_set_gc_clip_rects (c
surface->clip_rects,
surface->num_clip_rects, YXSorted);
}
-
+
static void
_cairo_xlib_surface_ensure_dst_picture (cairo_xlib_surface_t *surface)
{
@@ -724,9 +724,9 @@ _cairo_xlib_surface_ensure_dst_picture (
0, NULL);
_cairo_xlib_surface_set_picture_clip_rects (surface);
}
-
+
}
-
+
static void
_cairo_xlib_surface_ensure_gc (cairo_xlib_surface_t *surface)
{
@@ -750,10 +750,10 @@ _draw_image_surface (cairo_xlib_surface_
XImage ximage;
int bpp, alpha, red, green, blue;
int native_byte_order = _native_byte_order_lsb () ? LSBFirst : MSBFirst;
-
+
pixman_format_get_masks (pixman_image_get_format (image->pixman_image),
&bpp, &alpha, &red, &green, &blue);
-
+
ximage.width = image->width;
ximage.height = image->height;
ximage.format = ZPixmap;
@@ -771,7 +771,7 @@ _draw_image_surface (cairo_xlib_surface_
ximage.xoffset = 0;
XInitImage (&ximage);
-
+
_cairo_xlib_surface_ensure_gc (surface);
XPutImage(surface->dpy, surface->drawable, surface->gc,
&ximage, 0, 0, dst_x, dst_y,
@@ -825,7 +825,7 @@ _cairo_xlib_surface_acquire_dest_image (
*image_out = image;
*image_extra = NULL;
-
+
return CAIRO_STATUS_SUCCESS;
}
@@ -869,25 +869,25 @@ _cairo_xlib_surface_clone_similar (void
if (_cairo_xlib_surface_same_screen (surface, xlib_src)) {
*clone_out = cairo_surface_reference (src);
-
+
return CAIRO_STATUS_SUCCESS;
}
} else if (_cairo_surface_is_image (src)) {
cairo_image_surface_t *image_src = (cairo_image_surface_t *)src;
-
+
clone = (cairo_xlib_surface_t *)
_cairo_xlib_surface_create_similar_with_format (surface, image_src->format,
image_src->width, image_src->height);
if (clone->base.status)
return CAIRO_STATUS_NO_MEMORY;
-
+
_draw_image_surface (clone, image_src, 0, 0);
-
+
*clone_out = &clone->base;
return CAIRO_STATUS_SUCCESS;
}
-
+
return CAIRO_INT_STATUS_UNSUPPORTED;
}
@@ -899,7 +899,7 @@ _cairo_xlib_surface_set_matrix (cairo_xl
if (!surface->src_picture)
return CAIRO_STATUS_SUCCESS;
-
+
xtransform.matrix[0][0] = _cairo_fixed_from_double (matrix->xx);
xtransform.matrix[0][1] = _cairo_fixed_from_double (matrix->xy);
xtransform.matrix[0][2] = _cairo_fixed_from_double (matrix->x0);
@@ -922,7 +922,7 @@ _cairo_xlib_surface_set_matrix (cairo_xl
if (memcmp (&xtransform, &identity, sizeof (XTransform)) == 0)
return CAIRO_STATUS_SUCCESS;
-
+
return CAIRO_INT_STATUS_UNSUPPORTED;
}
@@ -944,10 +944,10 @@ _cairo_xlib_surface_set_filter (cairo_xl
{
if (filter == CAIRO_FILTER_FAST || filter == CAIRO_FILTER_NEAREST)
return CAIRO_STATUS_SUCCESS;
-
+
return CAIRO_INT_STATUS_UNSUPPORTED;
}
-
+
switch (filter) {
case CAIRO_FILTER_FAST:
render_filter = FilterFast;
@@ -983,7 +983,7 @@ _cairo_xlib_surface_set_repeat (cairo_xl
if (!surface->src_picture)
return CAIRO_STATUS_SUCCESS;
-
+
mask = CPRepeat;
pa.repeat = repeat;
@@ -1003,7 +1003,7 @@ _cairo_xlib_surface_set_attributes (cair
status = _cairo_xlib_surface_set_matrix (surface, &attributes->matrix);
if (status)
return status;
-
+
switch (attributes->extend) {
case CAIRO_EXTEND_NONE:
_cairo_xlib_surface_set_repeat (surface, 0);
@@ -1034,7 +1034,7 @@ _surfaces_compatible (cairo_xlib_surface
/* same screen */
if (!_cairo_xlib_surface_same_screen (dst, src))
return FALSE;
-
+
/* same depth (for core) */
if (src->depth != dst->depth)
return FALSE;
@@ -1042,7 +1042,7 @@ _surfaces_compatible (cairo_xlib_surface
/* if Render is supported, match picture formats */
if (src->xrender_format != NULL && src->xrender_format == dst->xrender_format)
return TRUE;
-
+
/* Without Render, match visuals instead */
if (src->visual == dst->visual)
return TRUE;
@@ -1060,7 +1060,7 @@ _surface_has_alpha (cairo_xlib_surface_t
else
return FALSE;
} else {
-
+
/* In the no-render case, we never have alpha */
return FALSE;
}
@@ -1117,7 +1117,7 @@ _categorize_composite_operation (cairo_x
cairo_operator_t op,
cairo_pattern_t *src_pattern,
cairo_bool_t have_mask)
-
+
{
if (!dst->buggy_repeat)
return DO_RENDER;
@@ -1125,7 +1125,7 @@ _categorize_composite_operation (cairo_x
if (src_pattern->type == CAIRO_PATTERN_TYPE_SURFACE)
{
cairo_surface_pattern_t *surface_pattern = (cairo_surface_pattern_t *)src_pattern;
-
+
if (_cairo_matrix_is_integer_translation (&src_pattern->matrix, NULL, NULL) &&
src_pattern->extend == CAIRO_EXTEND_REPEAT)
{
@@ -1143,7 +1143,7 @@ _categorize_composite_operation (cairo_x
if (op == CAIRO_OPERATOR_OVER && _surface_has_alpha (src))
return DO_UNSUPPORTED;
-
+
/* If these are on the same screen but otherwise incompatible,
* make a copy as core drawing can't cross depths and doesn't
* work rightacross visuals of the same depth
@@ -1195,7 +1195,7 @@ _recategorize_composite_operation (cairo
if (!dst->buggy_repeat)
return DO_RENDER;
-
+
if (is_integer_translation &&
src_attr->extend == CAIRO_EXTEND_REPEAT &&
(src->width != 1 || src->height != 1))
@@ -1206,10 +1206,10 @@ _recategorize_composite_operation (cairo
{
return DO_XTILE;
}
-
+
return DO_UNSUPPORTED;
}
-
+
return DO_RENDER;
}
@@ -1282,7 +1282,7 @@ _cairo_xlib_surface_composite (cairo_ope
mask_pattern != NULL);
if (operation == DO_UNSUPPORTED)
return CAIRO_INT_STATUS_UNSUPPORTED;
-
+
status = _cairo_pattern_acquire_surfaces (src_pattern, mask_pattern,
&dst->base,
src_x, src_y,
@@ -1293,14 +1293,14 @@ _cairo_xlib_surface_composite (cairo_ope
&src_attr, &mask_attr);
if (status)
return status;
-
+
operation = _recategorize_composite_operation (dst, op, src, &src_attr,
mask_pattern != NULL);
if (operation == DO_UNSUPPORTED) {
status = CAIRO_INT_STATUS_UNSUPPORTED;
goto FAIL;
}
-
+
status = _cairo_xlib_surface_set_attributes (src, &src_attr);
if (status)
goto FAIL;
@@ -1313,7 +1313,7 @@ _cairo_xlib_surface_composite (cairo_ope
status = _cairo_xlib_surface_set_attributes (mask, &mask_attr);
if (status)
goto FAIL;
-
+
XRenderComposite (dst->dpy,
_render_operator (op),
src->src_picture,
@@ -1386,12 +1386,12 @@ _cairo_xlib_surface_composite (cairo_ope
src_x, src_y,
mask_x, mask_y,
dst_x, dst_y, width, height);
-
+
FAIL:
if (mask)
_cairo_pattern_release_surface (mask_pattern, &mask->base, &mask_attr);
-
+
_cairo_pattern_release_surface (src_pattern, &src->base, &src_attr);
return status;
@@ -1447,14 +1447,14 @@ _create_a8_picture (cairo_xlib_surface_t
pa.repeat = TRUE;
mask = CPRepeat;
}
-
+
picture = XRenderCreatePicture (surface->dpy, pixmap,
XRenderFindStandardFormat (surface->dpy, PictStandardA8),
mask, &pa);
XRenderFillRectangle (surface->dpy, PictOpSrc, picture, color,
0, 0, width, height);
XFreePixmap (surface->dpy, pixmap);
-
+
return picture;
}
@@ -1509,7 +1509,7 @@ _create_trapezoid_mask (cairo_xlib_surfa
pict_format,
0, 0,
offset_traps, num_traps);
-
+
XRenderFreePicture (dst->dpy, solid_picture);
free (offset_traps);
@@ -1545,7 +1545,7 @@ _cairo_xlib_surface_composite_trapezoids
operation = _categorize_composite_operation (dst, op, pattern, TRUE);
if (operation == DO_UNSUPPORTED)
return CAIRO_INT_STATUS_UNSUPPORTED;
-
+
status = _cairo_pattern_acquire_surface (pattern, &dst->base,
src_x, src_y, width, height,
(cairo_surface_t **) &src,
@@ -1567,7 +1567,7 @@ _cairo_xlib_surface_composite_trapezoids
pict_format = XRenderFindStandardFormat (dst->dpy, PictStandardA8);
break;
}
-
+
if (traps[0].left.p1.y < traps[0].left.p2.y) {
render_reference_x = _cairo_fixed_integer_floor (traps[0].left.p1.x);
render_reference_y = _cairo_fixed_integer_floor (traps[0].left.p1.y);
@@ -1612,9 +1612,9 @@ _cairo_xlib_surface_composite_trapezoids
0, 0,
dst_x, dst_y,
width, height);
-
+
XRenderFreePicture (dst->dpy, mask_picture);
-
+
status = _cairo_surface_composite_shape_fixup_unbounded (&dst->base,
&attributes, src->width, src->height,
width, height,
@@ -1622,7 +1622,7 @@ _cairo_xlib_surface_composite_trapezoids
0, 0,
dst_x, dst_y, width, height);
-
+
} else {
/* XXX: The XTrapezoid cast is evil and needs to go away somehow. */
XRenderCompositeTrapezoids (dst->dpy,
@@ -1657,7 +1657,7 @@ _cairo_xlib_surface_set_clip_region (voi
if (region == NULL) {
if (surface->gc)
XSetClipMask (surface->dpy, surface->gc, None);
-
+
if (surface->xrender_format && surface->dst_picture) {
XRenderPictureAttributes pa;
pa.clip_mask = None;
@@ -1668,7 +1668,7 @@ _cairo_xlib_surface_set_clip_region (voi
pixman_box16_t *boxes;
XRectangle *rects = NULL;
int n_boxes, i;
-
+
n_boxes = pixman_region_num_rects (region);
if (n_boxes > 0) {
rects = malloc (sizeof(XRectangle) * n_boxes);
@@ -1679,7 +1679,7 @@ _cairo_xlib_surface_set_clip_region (voi
}
boxes = pixman_region_rects (region);
-
+
for (i = 0; i < n_boxes; i++) {
rects[i].x = boxes[i].x1;
rects[i].y = boxes[i].y1;
@@ -1697,7 +1697,7 @@ _cairo_xlib_surface_set_clip_region (voi
if (surface->dst_picture)
_cairo_xlib_surface_set_picture_clip_rects (surface);
}
-
+
return CAIRO_STATUS_SUCCESS;
}
@@ -1721,7 +1721,7 @@ _cairo_xlib_surface_get_font_options (vo
cairo_font_options_t *options)
{
cairo_xlib_surface_t *surface = abstract_surface;
-
+
*options = surface->screen_info->font_options;
}
@@ -1862,7 +1862,7 @@ _cairo_xlib_surface_create_internal (Dis
surface->use_pixmap = 0;
surface->width = width;
surface->height = height;
-
+
surface->buggy_repeat = FALSE;
if (strstr (ServerVendor (dpy), "X.Org") != NULL) {
if (VendorRelease (dpy) <= 60802000)
@@ -1942,7 +1942,7 @@ cairo_xlib_surface_create (Display *
_cairo_error (CAIRO_STATUS_INVALID_VISUAL);
return (cairo_surface_t*) &_cairo_surface_nil;
}
-
+
return _cairo_xlib_surface_create_internal (dpy, drawable, screen,
visual, NULL, width, height, 0);
}
@@ -2065,17 +2065,17 @@ cairo_xlib_surface_set_drawable (cairo_s
/* XXX: and what about this case? */
if (surface->owns_pixmap)
return;
-
+
if (surface->drawable != drawable) {
if (surface->dst_picture)
XRenderFreePicture (surface->dpy, surface->dst_picture);
-
+
if (surface->src_picture)
XRenderFreePicture (surface->dpy, surface->src_picture);
-
+
surface->dst_picture = None;
surface->src_picture = None;
-
+
surface->drawable = drawable;
}
surface->width = width;
@@ -2297,7 +2297,7 @@ _cairo_xlib_surface_add_glyph (Display *
glyph_info.yOff = 0;
data = glyph_surface->data;
-
+
/* flip formats around */
switch (scaled_glyph->surface->format) {
case CAIRO_FORMAT_A1:
@@ -2306,7 +2306,7 @@ _cairo_xlib_surface_add_glyph (Display *
int c = glyph_surface->stride * glyph_surface->height;
unsigned char *d;
unsigned char *new, *n;
-
+
new = malloc (c);
if (!new) {
status = CAIRO_STATUS_NO_MEMORY;
@@ -2332,7 +2332,7 @@ _cairo_xlib_surface_add_glyph (Display *
int c = glyph_surface->stride * glyph_surface->height;
unsigned char *d;
unsigned char *new, *n;
-
+
new = malloc (c);
if (new == NULL) {
status = CAIRO_STATUS_NO_MEMORY;
@@ -2360,7 +2360,7 @@ _cairo_xlib_surface_add_glyph (Display *
/* XXX assume X server wants pixman padding. Xft assumes this as well */
glyph_index = _cairo_scaled_glyph_index (scaled_glyph);
-
+
XRenderAddGlyphs (dpy, font_private->glyphset,
&glyph_index, &(glyph_info), 1,
(char *) data,
@@ -2368,7 +2368,7 @@ _cairo_xlib_surface_add_glyph (Display *
if (data != glyph_surface->data)
free (data);
-
+
BAIL:
if (glyph_surface != scaled_glyph->surface)
cairo_surface_destroy (&glyph_surface->base);
diff --git a/src/cairo.c b/src/cairo.c
index e9a0f33..05f3ee9 100644
--- a/src/cairo.c
+++ b/src/cairo.c
@@ -227,7 +227,7 @@ cairo_reference (cairo_t *cr)
return cr;
assert (cr->ref_count > 0);
-
+
cr->ref_count++;
return cr;
@@ -251,7 +251,7 @@ cairo_destroy (cairo_t *cr)
return;
assert (cr->ref_count > 0);
-
+
cr->ref_count--;
if (cr->ref_count)
return;
@@ -1285,7 +1285,7 @@ cairo_curve_to (cairo_t *cr,
cairo_fixed_t x1_fixed, y1_fixed;
cairo_fixed_t x2_fixed, y2_fixed;
cairo_fixed_t x3_fixed, y3_fixed;
-
+
if (cr->status)
return;
@@ -1680,7 +1680,7 @@ cairo_paint_with_alpha (cairo_t *cr,
{
cairo_color_t color;
cairo_pattern_union_t pattern;
-
+
if (cr->status)
return;
@@ -1724,7 +1724,7 @@ cairo_mask (cairo_t *cr,
_cairo_set_error (cr, CAIRO_STATUS_NULL_POINTER);
return;
}
-
+
if (pattern->status) {
_cairo_set_error (cr, pattern->status);
return;
@@ -1765,7 +1765,7 @@ cairo_mask_surface (cairo_t *cr,
cairo_pattern_set_matrix (pattern, &matrix);
cairo_mask (cr, pattern);
-
+
cairo_pattern_destroy (pattern);
}
@@ -1918,7 +1918,7 @@ cairo_stroke_extents (cairo_t *cr,
{
if (cr->status)
return;
-
+
cr->status = _cairo_gstate_stroke_extents (cr->gstate,
&cr->path,
x1, y1, x2, y2);
@@ -1932,7 +1932,7 @@ cairo_fill_extents (cairo_t *cr,
{
if (cr->status)
return;
-
+
cr->status = _cairo_gstate_fill_extents (cr->gstate,
&cr->path,
x1, y1, x2, y2);
@@ -2325,7 +2325,7 @@ cairo_text_extents (cairo_t
_cairo_set_error (cr, cr->status);
return;
}
-
+
cr->status = _cairo_gstate_glyph_extents (cr->gstate, glyphs, num_glyphs, extents);
if (glyphs)
free (glyphs);
diff --git a/src/cairo.h b/src/cairo.h
index 387501c..9fa44dc 100644
--- a/src/cairo.h
+++ b/src/cairo.h
@@ -726,7 +726,7 @@ typedef enum _cairo_font_slant {
CAIRO_FONT_SLANT_ITALIC,
CAIRO_FONT_SLANT_OBLIQUE
} cairo_font_slant_t;
-
+
typedef enum _cairo_font_weight {
CAIRO_FONT_WEIGHT_NORMAL,
CAIRO_FONT_WEIGHT_BOLD
@@ -839,7 +839,7 @@ cairo_font_options_set_subpixel_order (c
cairo_subpixel_order_t subpixel_order);
cairo_public cairo_subpixel_order_t
cairo_font_options_get_subpixel_order (const cairo_font_options_t *options);
-
+
cairo_public void
cairo_font_options_set_hint_style (cairo_font_options_t *options,
cairo_hint_style_t hint_style);
@@ -1413,7 +1413,7 @@ cairo_pattern_reference (cairo_pattern_t
cairo_public void
cairo_pattern_destroy (cairo_pattern_t *pattern);
-
+
cairo_public cairo_status_t
cairo_pattern_status (cairo_pattern_t *pattern);
@@ -1507,7 +1507,7 @@ typedef enum _cairo_filter {
CAIRO_FILTER_BILINEAR,
CAIRO_FILTER_GAUSSIAN
} cairo_filter_t;
-
+
cairo_public void
cairo_pattern_set_filter (cairo_pattern_t *pattern, cairo_filter_t filter);
diff --git a/src/cairoint.h b/src/cairoint.h
index cebaa21..4d69178 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -451,18 +451,18 @@ struct _cairo_scaled_font {
/* useful bits for _cairo_scaled_font_nil */
cairo_status_t status;
int ref_count;
-
+
/* hash key members */
cairo_font_face_t *font_face; /* may be NULL */
cairo_matrix_t font_matrix; /* font space => user space */
cairo_matrix_t ctm; /* user space => device space */
cairo_font_options_t options;
-
+
/* "live" scaled_font members */
cairo_matrix_t scale; /* font space => device space */
cairo_font_extents_t extents; /* user space */
cairo_cache_t *glyphs; /* glyph index -> cairo_scaled_glyph_t */
-
+
/*
* One surface backend may store data in each glyph.
* Whichever surface manages to store its pointer here
@@ -470,7 +470,7 @@ struct _cairo_scaled_font {
*/
const cairo_surface_backend_t *surface_backend;
void *surface_private;
-
+
/* font backend managing this scaled font */
const cairo_scaled_font_backend_t *backend;
};
@@ -549,7 +549,7 @@ struct _cairo_scaled_font_backend {
const char *utf8,
cairo_glyph_t **glyphs,
int *num_glyphs);
-
+
unsigned long
(*ucs4_to_index) (void *scaled_font,
uint32_t ucs4);
@@ -566,7 +566,7 @@ struct _cairo_scaled_font_backend {
unsigned int height,
const cairo_glyph_t *glyphs,
int num_glyphs);
-
+
};
struct _cairo_font_face_backend {
@@ -655,7 +655,7 @@ struct _cairo_surface_backend {
(*clone_similar) (void *surface,
cairo_surface_t *src,
cairo_surface_t **clone_out);
-
+
/* XXX: dst should be the first argument for consistency */
cairo_int_status_t
(*composite) (cairo_operator_t op,
@@ -893,7 +893,7 @@ struct _cairo_image_surface {
unsigned char *data;
cairo_bool_t owns_data;
cairo_bool_t has_clip;
-
+
int width;
int height;
@@ -951,26 +951,26 @@ extern const cairo_private cairo_solid_p
typedef struct _cairo_surface_pattern {
cairo_pattern_t base;
-
+
cairo_surface_t *surface;
} cairo_surface_pattern_t;
typedef struct _cairo_gradient_pattern {
cairo_pattern_t base;
-
+
pixman_gradient_stop_t *stops;
int n_stops;
} cairo_gradient_pattern_t;
typedef struct _cairo_linear_pattern {
cairo_gradient_pattern_t base;
-
+
pixman_linear_gradient_t gradient;
} cairo_linear_pattern_t;
typedef struct _cairo_radial_pattern {
cairo_gradient_pattern_t base;
-
+
pixman_radial_gradient_t gradient;
} cairo_radial_pattern_t;
@@ -983,7 +983,7 @@ typedef union {
typedef union {
cairo_pattern_t base;
-
+
cairo_solid_pattern_t solid;
cairo_surface_pattern_t surface;
cairo_gradient_pattern_union_t gradient;
@@ -1272,7 +1272,7 @@ _cairo_gstate_set_font_size (cairo_gstat
cairo_private void
_cairo_gstate_get_font_matrix (cairo_gstate_t *gstate,
cairo_matrix_t *matrix);
-
+
cairo_private cairo_status_t
_cairo_gstate_set_font_matrix (cairo_gstate_t *gstate,
const cairo_matrix_t *matrix);
@@ -1280,7 +1280,7 @@ _cairo_gstate_set_font_matrix (cairo_gst
cairo_private void
_cairo_gstate_get_font_options (cairo_gstate_t *gstate,
cairo_font_options_t *options);
-
+
cairo_private cairo_status_t
_cairo_gstate_set_font_options (cairo_gstate_t *gstate,
const cairo_font_options_t *options);
@@ -1727,7 +1727,7 @@ _cairo_surface_show_glyphs (cairo_surfac
const cairo_glyph_t *glyphs,
int num_glyphs,
cairo_scaled_font_t *scaled_font);
-
+
cairo_private cairo_status_t
_cairo_surface_composite_trapezoids (cairo_operator_t op,
cairo_pattern_t *pattern,
@@ -1771,7 +1771,7 @@ _cairo_surface_release_dest_image (cairo
cairo_image_surface_t *image,
cairo_rectangle_fixed_t *image_rect,
void *image_extra);
-
+
cairo_private cairo_status_t
_cairo_surface_clone_similar (cairo_surface_t *surface,
cairo_surface_t *src,
diff --git a/src/test-fallback-surface.c b/src/test-fallback-surface.c
index 1504aa7..60c7749 100644
--- a/src/test-fallback-surface.c
+++ b/src/test-fallback-surface.c
@@ -108,7 +108,7 @@ _test_fallback_surface_finish (void *abs
test_fallback_surface_t *surface = abstract_surface;
cairo_surface_destroy (surface->backing);
-
+
return CAIRO_STATUS_SUCCESS;
}
@@ -142,7 +142,7 @@ _test_fallback_surface_acquire_dest_imag
void **image_extra)
{
test_fallback_surface_t *surface = abstract_surface;
-
+
return _cairo_surface_acquire_dest_image (surface->backing,
interest_rect,
image_out,
diff --git a/src/test-meta-surface.c b/src/test-meta-surface.c
index ade7105..541853c 100644
--- a/src/test-meta-surface.c
+++ b/src/test-meta-surface.c
@@ -110,7 +110,7 @@ _test_meta_surface_finish (void *abstrac
cairo_surface_destroy (surface->meta);
cairo_surface_destroy (surface->image);
-
+
return CAIRO_STATUS_SUCCESS;
}
diff --git a/test/cairo-test.c b/test/cairo-test.c
index 444fe32..fa9a0b0 100644
--- a/test/cairo-test.c
+++ b/test/cairo-test.c
@@ -122,7 +122,7 @@ xasprintf (char **strp, const char *fmt,
#ifdef HAVE_VASPRINTF
va_list va;
int ret;
-
+
va_start (va, fmt);
ret = vasprintf (strp, fmt, va);
va_end (va);
@@ -136,7 +136,7 @@ xasprintf (char **strp, const char *fmt,
va_list va;
char buffer[BUF_SIZE];
int ret;
-
+
va_start (va, fmt);
ret = vsnprintf (buffer, sizeof(buffer), fmt, va);
va_end (va);
@@ -145,12 +145,12 @@ xasprintf (char **strp, const char *fmt,
cairo_test_log ("Failure in vsnprintf\n");
exit (1);
}
-
+
if (strlen (buffer) == sizeof(buffer) - 1) {
cairo_test_log ("Overflowed fixed buffer\n");
exit (1);
}
-
+
*strp = strdup (buffer);
if (!*strp) {
cairo_test_log ("Out of memory\n");
@@ -496,7 +496,7 @@ create_cairo_glitz_glx_surface (cairo_te
width = 1;
if (height == 0)
height = 1;
-
+
gxtc->dpy = XOpenDisplay (getenv("CAIRO_TEST_GLITZ_DISPLAY"));
if (!gxtc->dpy) {
cairo_test_log ("Failed to open display: %s\n", XDisplayName(0));
@@ -1007,7 +1007,7 @@ create_xcb_surface (cairo_test_t *test,
cairo_test_log ("Invalid content for XCB test: %d\n", content);
return NULL;
}
-
+
render_format = _format_from_cairo (c, format);
if (render_format.id.xid == 0)
return NULL;
@@ -1087,7 +1087,7 @@ create_xlib_surface (cairo_test_t *test
cairo_test_log ("X server does not have the Render extension.\n");
return NULL;
}
-
+
xtc->pixmap = XCreatePixmap (dpy, DefaultRootWindow (dpy),
width, height, xrender_format->depth);
@@ -1250,7 +1250,7 @@ create_pdf_surface (cairo_test_t *test,
ptc->width = width;
ptc->height = height;
-
+
xasprintf (&ptc->filename, "%s-pdf-%s-out.pdf",
test->name, _cairo_test_content_name (content));
@@ -1360,10 +1360,10 @@ create_svg_surface (cairo_test_t *test,
ptc->width = width;
ptc->height = height;
-
+
xasprintf (&ptc->filename, "%s-svg-%s-out.svg",
test->name, _cairo_test_content_name (content));
-
+
surface = cairo_svg_surface_create (ptc->filename, width, height);
if (cairo_surface_status (surface)) {
free (ptc->filename);
@@ -1419,7 +1419,7 @@ svg_surface_write_to_png (cairo_surface_
if (system (command) != 0)
return CAIRO_STATUS_WRITE_ERROR;
-
+
return CAIRO_STATUS_SUCCESS;
}
@@ -1457,7 +1457,7 @@ cairo_test_for_target (cairo_test_t *tes
xasprintf (&offset_str, "-%d", dev_offset);
else
offset_str = strdup("");
-
+
if (dev_offset)
xasprintf (&offset_str, "-%d", dev_offset);
else
diff --git a/test/caps-joins.c b/test/caps-joins.c
index abc6568..d424145 100644
--- a/test/caps-joins.c
+++ b/test/caps-joins.c
@@ -57,7 +57,7 @@ draw (cairo_t *cr, int width, int height
cairo_set_source_rgb (cr, 1.0, 1.0, 1.0); /* white */
cairo_paint (cr);
cairo_restore (cr);
-
+
cairo_set_line_width (cr, LINE_WIDTH);
cairo_translate (cr, PAD, PAD);
diff --git a/test/clip-all.c b/test/clip-all.c
index 0fbcc4a..d432030 100644
--- a/test/clip-all.c
+++ b/test/clip-all.c
@@ -46,7 +46,7 @@ draw (cairo_t *cr, int width, int height
cairo_clip (cr);
cairo_rectangle (cr, 3*CLIP_SIZE, 3*CLIP_SIZE, CLIP_SIZE, CLIP_SIZE);
cairo_clip (cr);
-
+
cairo_translate (cr, .5, .5);
cairo_reset_clip (cr);
diff --git a/test/clip-nesting.c b/test/clip-nesting.c
index 8019780..1f27c8f 100644
--- a/test/clip-nesting.c
+++ b/test/clip-nesting.c
@@ -48,7 +48,7 @@ draw (cairo_t *cr, int width, int height
cr2 = cairo_create (target_surface);
/* Draw a diagonal line and clip to it */
-
+
cairo_move_to (cr2, BORDER, BORDER);
cairo_line_to (cr2, BORDER + LINE_WIDTH, BORDER);
cairo_line_to (cr2, SIZE - BORDER, SIZE - BORDER);
@@ -86,7 +86,7 @@ draw (cairo_t *cr, int width, int height
BORDER, BORDER,
LINE_WIDTH, SIZE - 2 * BORDER);
cairo_fill (cr);
-
+
return CAIRO_TEST_SUCCESS;
}
diff --git a/test/clip-operator.c b/test/clip-operator.c
index 378d6bd..c11f33d 100644
--- a/test/clip-operator.c
+++ b/test/clip-operator.c
@@ -43,7 +43,7 @@ draw_mask (cairo_t *cr, int x, int y)
double height = (int)(0.9 * HEIGHT);
x += 0.05 * WIDTH;
y += 0.05 * HEIGHT;
-
+
mask_surface = cairo_surface_create_similar (cairo_get_target (cr),
CAIRO_CONTENT_ALPHA,
width, height);
@@ -73,7 +73,7 @@ draw_glyphs (cairo_t *cr, int x, int y)
cairo_text_extents_t extents;
cairo_set_font_size (cr, 0.8 * HEIGHT);
-
+
cairo_text_extents (cr, "FG", &extents);
cairo_move_to (cr,
x + (WIDTH - extents.width) / 2 - extents.x_bearing,
@@ -88,7 +88,7 @@ draw_polygon (cairo_t *cr, int x, int y)
double height = (int)(0.9 * HEIGHT);
x += 0.05 * WIDTH;
y += 0.05 * HEIGHT;
-
+
cairo_new_path (cr);
cairo_move_to (cr, x, y);
cairo_line_to (cr, x, y + height);
@@ -161,7 +161,7 @@ draw (cairo_t *cr, int width, int height
for (op = CAIRO_OPERATOR_CLEAR; op < N_OPERATORS; op++) {
x = op * (WIDTH + PAD) + PAD;
y = j * (HEIGHT + PAD) + PAD;
-
+
cairo_save (cr);
pattern = cairo_pattern_create_linear (x + WIDTH, y,
@@ -172,7 +172,7 @@ draw (cairo_t *cr, int width, int height
0.0, 0.0, 1.0, 0.0); /* Transparent blue */
cairo_set_source (cr, pattern);
cairo_pattern_destroy (pattern);
-
+
cairo_rectangle (cr, x, y, WIDTH, HEIGHT);
cairo_fill (cr);
@@ -187,7 +187,7 @@ draw (cairo_t *cr, int width, int height
draw_funcs[j] (cr, x, y);
if (cairo_status (cr))
cairo_test_log ("%d %d HERE!\n", op, j);
-
+
cairo_restore (cr);
}
}
diff --git a/test/dash-offset-negative.c b/test/dash-offset-negative.c
index 82f55ca..dd99d58 100644
--- a/test/dash-offset-negative.c
+++ b/test/dash-offset-negative.c
@@ -55,7 +55,7 @@ draw (cairo_t *cr, int width, int height
/* Basic 1-1 dash pattern */
cairo_set_dash (cr, dashes, 1, 0.);
-
+
cairo_move_to (cr, 1, 2);
cairo_line_to (cr, 18, 2);
cairo_stroke (cr);
@@ -69,7 +69,7 @@ draw (cairo_t *cr, int width, int height
/* Offset dash by 0.5, rather than the path */
cairo_set_dash (cr, dashes, 1, 0.5);
-
+
cairo_move_to (cr, 1, 8);
cairo_line_to (cr, 18, 8);
cairo_stroke (cr);
@@ -78,7 +78,7 @@ draw (cairo_t *cr, int width, int height
/* Basic 1-1 dash pattern dashing */
cairo_set_dash (cr, dashes, 1, -4);
-
+
cairo_move_to (cr, 1, 11);
cairo_line_to (cr, 18, 11);
cairo_stroke (cr);
@@ -90,7 +90,7 @@ draw (cairo_t *cr, int width, int height
/* Offset dash by 0.5 */
cairo_set_dash (cr, dashes, 1, -3.5);
-
+
cairo_move_to (cr, 1, 17);
cairo_line_to (cr, 18, 17);
cairo_stroke (cr);
diff --git a/test/fill-and-stroke.c b/test/fill-and-stroke.c
index 6765538..c3e295d 100644
--- a/test/fill-and-stroke.c
+++ b/test/fill-and-stroke.c
@@ -52,7 +52,7 @@ draw (cairo_t *cr, int width, int height
cairo_fill_preserve (cr);
cairo_set_source_rgb (cr, 0, 0, 1);
cairo_stroke (cr);
-
+
return CAIRO_TEST_SUCCESS;
}
diff --git a/test/filter-nearest-offset.c b/test/filter-nearest-offset.c
index f664fbf..1c608a4 100644
--- a/test/filter-nearest-offset.c
+++ b/test/filter-nearest-offset.c
@@ -89,7 +89,7 @@ draw (cairo_t *cr, int width, int height
PAD + j * (STAMP_HEIGHT + PAD) + j_step);
cairo_pattern_set_filter (cairo_get_source (cr), CAIRO_FILTER_NEAREST);
cairo_paint (cr);
-
+
cairo_restore (cr);
}
}
diff --git a/test/font-face-get-type.c b/test/font-face-get-type.c
index c21d5c2..31dccd3 100644
--- a/test/font-face-get-type.c
+++ b/test/font-face-get-type.c
@@ -61,4 +61,4 @@ main (void)
-
+
diff --git a/test/get-and-set.c b/test/get-and-set.c
index d0da5ca..a4faa8f 100644
--- a/test/get-and-set.c
+++ b/test/get-and-set.c
@@ -116,7 +116,7 @@ get_and_set (cairo_t *cr, int width, int
settings_t check;
settings_set (cr, &settings[0]);
-
+
cairo_save (cr);
{
settings_set (cr, &settings[1]);
diff --git a/test/gradient-alpha.c b/test/gradient-alpha.c
index 3015728..6ae06aa 100644
--- a/test/gradient-alpha.c
+++ b/test/gradient-alpha.c
@@ -50,7 +50,7 @@ draw (cairo_t *cr, int width, int height
cairo_paint (cr);
cairo_pattern_destroy (gradient);
-
+
return CAIRO_TEST_SUCCESS;
}
diff --git a/test/linear-gradient.c b/test/linear-gradient.c
index 686a56c..8d09df3 100644
--- a/test/linear-gradient.c
+++ b/test/linear-gradient.c
@@ -71,15 +71,15 @@ draw_unit (cairo_t *cr,
cairo_rectangle (cr, 0, 0, 1, 1);
cairo_clip (cr);
cairo_new_path(cr);
-
+
cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
cairo_rectangle (cr, 0, 0, 1, 1);
cairo_fill (cr);
-
+
cairo_translate (cr, 0.5, 0.5);
cairo_scale (cr, 1 / 1.5, 1 / 1.5);
cairo_rotate (cr, rotate_angle);
-
+
pattern = cairo_pattern_create_linear (-0.5 * cos (gradient_angle), -0.5 * sin (gradient_angle),
0.5 * cos (gradient_angle), 0.5 * sin (gradient_angle));
@@ -119,7 +119,7 @@ draw (cairo_t *cr, int width, int height
PAD + (PAD + UNIT_SIZE) * i,
PAD + (PAD + UNIT_SIZE) * (N_ROTATE_ANGLES * k + j));
cairo_scale (cr, UNIT_SIZE, UNIT_SIZE);
-
+
draw_unit (cr,
gradient_angles[i] * M_PI / 180.,
rotate_angles[j] * M_PI / 180.,
diff --git a/test/mask.c b/test/mask.c
index 2f0349d..33e7ead 100644
--- a/test/mask.c
+++ b/test/mask.c
@@ -86,7 +86,7 @@ mask_polygon (cairo_t *cr, int x, int y)
cairo_restore (cr2);
cairo_set_source_rgb (cr2, 1, 1, 1); /* white */
-
+
cairo_new_path (cr2);
cairo_move_to (cr2, 0, 0);
cairo_line_to (cr2, 0, HEIGHT);
@@ -126,7 +126,7 @@ mask_gradient (cairo_t *cr, int x, int y
1, 1, 1, 0);
cairo_mask (cr, pattern);
-
+
cairo_pattern_destroy (pattern);
}
@@ -139,7 +139,7 @@ static void
clip_rects (cairo_t *cr, int x, int y)
{
int height = HEIGHT / 3;
-
+
cairo_new_path (cr);
cairo_rectangle (cr, x, y, WIDTH, height);
cairo_rectangle (cr, x, y + 2 * height, WIDTH, height);
@@ -211,7 +211,7 @@ draw (cairo_t *cr, int width, int height
for (i = 0; i < ARRAY_SIZE (pattern_funcs); i++) {
int x = i * (WIDTH + PAD) + PAD;
int y = (ARRAY_SIZE (mask_funcs) * k + j) * (HEIGHT + PAD) + PAD;
-
+
/* Clear intermediate surface we are going to be drawing onto */
cairo_save (cr2);
cairo_set_operator (cr2, CAIRO_OPERATOR_CLEAR);
diff --git a/test/operator-clear.c b/test/operator-clear.c
index ca6d235..34f1a85 100644
--- a/test/operator-clear.c
+++ b/test/operator-clear.c
@@ -62,7 +62,7 @@ draw_mask (cairo_t *cr, int x, int y)
double height = (int)(0.9 * HEIGHT);
x += 0.05 * WIDTH;
y += 0.05 * HEIGHT;
-
+
mask_surface = cairo_surface_create_similar (cairo_get_target (cr),
CAIRO_CONTENT_ALPHA,
width, height);
@@ -86,7 +86,7 @@ draw_glyphs (cairo_t *cr, int x, int y)
cairo_text_extents_t extents;
cairo_set_font_size (cr, 0.8 * HEIGHT);
-
+
cairo_text_extents (cr, "FG", &extents);
cairo_move_to (cr,
x + (WIDTH - extents.width) / 2 - extents.x_bearing,
@@ -101,7 +101,7 @@ draw_polygon (cairo_t *cr, int x, int y)
double height = (int)(0.9 * HEIGHT);
x += 0.05 * WIDTH;
y += 0.05 * HEIGHT;
-
+
cairo_new_path (cr);
cairo_move_to (cr, x, y);
cairo_line_to (cr, x, y + height);
@@ -175,7 +175,7 @@ draw (cairo_t *cr, int width, int height
for (i = 0; i < ARRAY_SIZE (pattern_funcs); i++) {
x = i * (WIDTH + PAD) + PAD;
y = j * (HEIGHT + PAD) + PAD;
-
+
cairo_save (cr);
pattern = cairo_pattern_create_linear (x + WIDTH, y,
@@ -186,7 +186,7 @@ draw (cairo_t *cr, int width, int height
0.0, 0.0, 1.0, 0.0); /* Transparent blue */
cairo_set_source (cr, pattern);
cairo_pattern_destroy (pattern);
-
+
cairo_rectangle (cr, x, y, WIDTH, HEIGHT);
cairo_fill_preserve (cr);
cairo_clip (cr);
@@ -196,7 +196,7 @@ draw (cairo_t *cr, int width, int height
draw_funcs[j] (cr, x, y);
if (cairo_status (cr))
cairo_test_log ("%d %d HERE!\n", i, j);
-
+
cairo_restore (cr);
}
}
diff --git a/test/operator-source.c b/test/operator-source.c
index 26b41f6..b61a6c5 100644
--- a/test/operator-source.c
+++ b/test/operator-source.c
@@ -68,7 +68,7 @@ set_surface_pattern (cairo_t *cr, int x,
double height = (int)(0.6 * HEIGHT);
x += 0.2 * WIDTH;
y += 0.2 * HEIGHT;
-
+
source_surface = cairo_surface_create_similar (cairo_get_target (cr),
CAIRO_CONTENT_COLOR_ALPHA,
width, height);
@@ -99,7 +99,7 @@ draw_mask (cairo_t *cr, int x, int y)
double height = (int)(0.9 * HEIGHT);
x += 0.05 * WIDTH;
y += 0.05 * HEIGHT;
-
+
mask_surface = cairo_surface_create_similar (cairo_get_target (cr),
CAIRO_CONTENT_ALPHA,
width, height);
@@ -123,7 +123,7 @@ draw_glyphs (cairo_t *cr, int x, int y)
cairo_text_extents_t extents;
cairo_set_font_size (cr, 0.8 * HEIGHT);
-
+
cairo_text_extents (cr, "FG", &extents);
cairo_move_to (cr,
x + (WIDTH - extents.width) / 2 - extents.x_bearing,
@@ -138,7 +138,7 @@ draw_polygon (cairo_t *cr, int x, int y)
double height = (int)(0.9 * HEIGHT);
x += 0.05 * WIDTH;
y += 0.05 * HEIGHT;
-
+
cairo_new_path (cr);
cairo_move_to (cr, x, y);
cairo_line_to (cr, x, y + height);
@@ -214,7 +214,7 @@ draw (cairo_t *cr, int width, int height
for (i = 0; i < ARRAY_SIZE (pattern_funcs); i++) {
x = i * (WIDTH + PAD) + PAD;
y = j * (HEIGHT + PAD) + PAD;
-
+
cairo_save (cr);
pattern = cairo_pattern_create_linear (x + WIDTH, y,
@@ -225,7 +225,7 @@ draw (cairo_t *cr, int width, int height
0.0, 0.0, 1.0, 0.0); /* Transparent blue */
cairo_set_source (cr, pattern);
cairo_pattern_destroy (pattern);
-
+
cairo_rectangle (cr, x, y, WIDTH, HEIGHT);
cairo_fill_preserve (cr);
cairo_clip (cr);
@@ -235,7 +235,7 @@ draw (cairo_t *cr, int width, int height
draw_funcs[j] (cr, x, y);
if (cairo_status (cr))
cairo_test_log ("%d %d HERE!\n", i, j);
-
+
cairo_restore (cr);
}
}
diff --git a/test/ps-features.c b/test/ps-features.c
index 577d706..d8a5b6e 100644
--- a/test/ps-features.c
+++ b/test/ps-features.c
@@ -133,7 +133,7 @@ main (void)
snprintf (dsc, 255, "%%IncludeFeature: *MediaType Glossy");
cairo_ps_surface_dsc_comment (surface, dsc);
}
-
+
cairo_move_to (cr, TEXT_SIZE, TEXT_SIZE);
cairo_show_text (cr, pages[i].page_size);
cairo_show_text (cr, " - ");
diff --git a/test/rectangle-rounding-error.c b/test/rectangle-rounding-error.c
index 6ec6cf4..7ce22d5 100644
--- a/test/rectangle-rounding-error.c
+++ b/test/rectangle-rounding-error.c
@@ -49,7 +49,7 @@ draw (cairo_t *cr, int width, int height
cairo_translate(cr, -300, -300);
cairo_scale(cr, 677.0/26, 677.0/26);
cairo_translate(cr, 1, 1);
-
+
/* this should draw a seamless 2x2 rectangle */
cairo_rectangle(cr, 11, 11, 1, 1);
cairo_rectangle(cr, 11, 12, 1, 1);
diff --git a/test/rel-path.c b/test/rel-path.c
index 72a7076..3083cda 100644
--- a/test/rel-path.c
+++ b/test/rel-path.c
@@ -43,9 +43,9 @@ draw (cairo_t *cr, int width, int height
SIZE/2, -SIZE/2,
SIZE*2/3, -SIZE/3,
SIZE/2, -SIZE);
-
+
cairo_stroke (cr);
-
+
return CAIRO_TEST_SUCCESS;
}
diff --git a/test/self-copy.c b/test/self-copy.c
index 5f4398b..b0f0432 100644
--- a/test/self-copy.c
+++ b/test/self-copy.c
@@ -40,7 +40,7 @@ draw (cairo_t *cr, int width, int height
{
cairo_pattern_t *pattern;
cairo_matrix_t matrix;
-
+
/* Paint a diagonal division as a test image */
cairo_set_source_rgb (cr, 1, 1, 1); /* White */
cairo_paint (cr);
@@ -56,10 +56,10 @@ draw (cairo_t *cr, int width, int height
* offset by SIZE/2
*/
pattern = cairo_pattern_create_for_surface (cairo_get_target (cr));
-
+
cairo_matrix_init_translate (&matrix, - SIZE / 2, - SIZE / 2);
cairo_pattern_set_matrix (pattern, &matrix);
-
+
cairo_set_source (cr, pattern);
cairo_pattern_destroy (pattern);
diff --git a/test/source-clip.c b/test/source-clip.c
index f479e48..c0f4172 100644
--- a/test/source-clip.c
+++ b/test/source-clip.c
@@ -68,7 +68,7 @@ draw (cairo_t *cr, int width, int height
cairo_paint (cr);
/* As the clip shouldn't matter, the result should be solid black */
-
+
cairo_destroy (cr2);
cairo_pattern_destroy (pattern);
cairo_surface_destroy (source_surface);
diff --git a/test/surface-pattern.c b/test/surface-pattern.c
index 4f91d43..3dbdf83 100644
--- a/test/surface-pattern.c
+++ b/test/surface-pattern.c
@@ -46,7 +46,7 @@ draw (cairo_t *cr, int width, int height
cairo_rectangle (cr2, 3, 3, 3, 3);
cairo_set_source_rgb (cr2, 1, 1, 0);
cairo_fill (cr2);
-
+
cairo_rectangle (cr2, 3, 0, 3, 3);
cairo_rectangle (cr2, 0, 3, 3, 3);
cairo_set_source_rgb (cr2, 0, 0, 1);
diff --git a/test/svg-clip.c b/test/svg-clip.c
index 3ed5f5d..d4d98db 100644
--- a/test/svg-clip.c
+++ b/test/svg-clip.c
@@ -69,7 +69,7 @@ test_clip (cairo_t *cr, double width, do
cairo_move_to (cr, 600, 0);
cairo_curve_to (cr, 300, 600, 0, 300, 600, 0);
cairo_clip (cr);
-
+
cairo_rectangle (cr, 0, 0, 600, 600);
cairo_set_source_rgb (cr, 0, 0, 1);
cairo_fill (cr);
diff --git a/test/text-pattern.c b/test/text-pattern.c
index ba4e869..a641234 100644
--- a/test/text-pattern.c
+++ b/test/text-pattern.c
@@ -41,17 +41,17 @@ draw (cairo_t *cr, int width, int height
cairo_pattern_t *pat;
font_options = cairo_font_options_create ();
-
+
cairo_font_options_set_hint_style (font_options, CAIRO_HINT_STYLE_NONE);
cairo_font_options_set_antialias (font_options, CAIRO_ANTIALIAS_GRAY);
-
+
cairo_set_font_options (cr, font_options);
cairo_font_options_destroy (font_options);
-
+
cairo_select_font_face (cr, "Bitstream Vera Sans",
CAIRO_FONT_SLANT_NORMAL,
CAIRO_FONT_WEIGHT_NORMAL);
-
+
cairo_scale (cr, width, height);
pat = cairo_pattern_create_linear (0.0, 0.0, 1, 1);
@@ -62,7 +62,7 @@ draw (cairo_t *cr, int width, int height
/* test rectangle - make sure the gradient is set correctly */
cairo_rectangle (cr, 0, 0, 0.1, 1);
cairo_fill (cr);
-
+
cairo_set_font_size (cr, 0.4);
cairo_move_to (cr, 0.1, 0.6);
cairo_show_text (cr, "cairo");
diff --git a/test/text-rotate.c b/test/text-rotate.c
index d1985e5..c71a3e3 100644
--- a/test/text-rotate.c
+++ b/test/text-rotate.c
@@ -125,7 +125,7 @@ draw (cairo_t *cr, int width, int height
y_off = - floor (0.5 + extents.height / 2.0);
x_off = floor (0.5 + (extents.height+1) / (2 * tan (M_PI/NUM_TEXT)));
}
-
+
for (i=0; i < NUM_TEXT; i++) {
cairo_save (cr);
cairo_rotate (cr, 2*M_PI*i/NUM_TEXT);
diff --git a/test/transforms.c b/test/transforms.c
index 7e0e025..ade26e2 100644
--- a/test/transforms.c
+++ b/test/transforms.c
@@ -94,7 +94,7 @@ draw (cairo_t *cr, int width, int height
cairo_restore (cr);
cairo_translate (cr, 5, 10);
-
+
cairo_save (cr);
{
cairo_matrix_t skew_x = {
diff --git a/test/trap-clip.c b/test/trap-clip.c
index 75b06a8..2e9cbc6 100644
--- a/test/trap-clip.c
+++ b/test/trap-clip.c
@@ -81,7 +81,7 @@ draw_rects (cairo_t *cr, int x, int y)
{
int width = WIDTH / 3;
int height = HEIGHT / 2;
-
+
cairo_new_path (cr);
cairo_rectangle (cr, x, y, width, height);
cairo_rectangle (cr, x + width, y + height, width, height);
@@ -122,7 +122,7 @@ static void
clip_rects (cairo_t *cr, int x, int y)
{
int height = HEIGHT / 3;
-
+
cairo_new_path (cr);
cairo_rectangle (cr, x, y, WIDTH, height);
cairo_rectangle (cr, x, y + 2 * height, WIDTH, height);
diff --git a/test/unbounded-operator.c b/test/unbounded-operator.c
index a053ca3..853627b 100644
--- a/test/unbounded-operator.c
+++ b/test/unbounded-operator.c
@@ -42,7 +42,7 @@ draw_mask (cairo_t *cr, int x, int y)
double height = (int)(0.9 * HEIGHT);
x += 0.05 * WIDTH;
y += 0.05 * HEIGHT;
-
+
mask_surface = cairo_surface_create_similar (cairo_get_target (cr),
CAIRO_CONTENT_ALPHA,
width, height);
@@ -72,7 +72,7 @@ draw_glyphs (cairo_t *cr, int x, int y)
cairo_text_extents_t extents;
cairo_set_font_size (cr, 0.8 * HEIGHT);
-
+
cairo_text_extents (cr, "FG", &extents);
cairo_move_to (cr,
x + (WIDTH - extents.width) / 2 - extents.x_bearing,
@@ -87,7 +87,7 @@ draw_polygon (cairo_t *cr, int x, int y)
double height = (int)(0.9 * HEIGHT);
x += 0.05 * WIDTH;
y += 0.05 * HEIGHT;
-
+
cairo_new_path (cr);
cairo_move_to (cr, x, y);
cairo_line_to (cr, x, y + height);
@@ -161,7 +161,7 @@ draw (cairo_t *cr, int width, int height
for (i = 0; i < ARRAY_SIZE (operators); i++) {
x = i * (WIDTH + PAD) + PAD;
y = j * (HEIGHT + PAD) + PAD;
-
+
cairo_save (cr);
pattern = cairo_pattern_create_linear (x + WIDTH, y,
@@ -172,7 +172,7 @@ draw (cairo_t *cr, int width, int height
0.0, 0.0, 1.0, 0.0); /* Transparent blue */
cairo_set_source (cr, pattern);
cairo_pattern_destroy (pattern);
-
+
cairo_rectangle (cr, x, y, WIDTH, HEIGHT);
cairo_fill_preserve (cr);
cairo_clip (cr);
@@ -183,7 +183,7 @@ draw (cairo_t *cr, int width, int height
draw_funcs[j] (cr, x, y);
if (cairo_status (cr))
cairo_test_log ("%d %d HERE!\n", i, j);
-
+
cairo_restore (cr);
}
}
diff --git a/test/user-data.c b/test/user-data.c
index d17b933..187e765 100644
--- a/test/user-data.c
+++ b/test/user-data.c
@@ -63,7 +63,7 @@ main (void)
assert (cairo_surface_set_user_data (surface, &key2, NULL, NULL)
== CAIRO_STATUS_SUCCESS);
assert (data2 == 2);
-
+
data1 = 0;
assert (cairo_surface_set_user_data (surface, &key1, &data1, NULL)
== CAIRO_STATUS_SUCCESS);
diff --git a/test/write-png.c b/test/write-png.c
index f5a2747..3cb023d 100644
--- a/test/write-png.c
+++ b/test/write-png.c
@@ -63,7 +63,7 @@ write_png_argb32 (unsigned char *buffer,
png_info *info;
png_byte **rows;
png_color_16 white;
-
+
rows = malloc (height * sizeof(png_byte*));
for (i = 0; i < height; i++) {
diff --git a/test/xlib-surface.c b/test/xlib-surface.c
index 09b53c8..7179781 100644
--- a/test/xlib-surface.c
+++ b/test/xlib-surface.c
@@ -53,13 +53,13 @@ draw_pattern (cairo_surface_t *surface)
for (i = 1; i <= 3; i++) {
int inset = SIZE / 8 * i;
-
+
cairo_rectangle (cr,
inset, inset,
SIZE - 2 * inset, SIZE - 2 * inset);
cairo_fill (cr);
}
-
+
cairo_destroy (cr);
}
@@ -70,7 +70,7 @@ erase_pattern (cairo_surface_t *surface)
cairo_set_source_rgb (cr, 0.0, 0.0, 0.0); /* black */
cairo_paint (cr);
-
+
cairo_destroy (cr);
}
@@ -126,7 +126,7 @@ do_test (Display *dpy,
if (set_size)
cairo_xlib_surface_set_size (surface, SIZE, SIZE);
-
+
draw_pattern (surface);
test_surface = cairo_image_surface_create_for_data (test_data,
@@ -154,7 +154,7 @@ do_test (Display *dpy,
if (offscreen) {
size_t offset = 4 * (SIZE * OFFSCREEN_OFFSET + OFFSCREEN_OFFSET);
-
+
result = !buffer_diff_noalpha (reference_data + offset,
test_data + offset,
diff_data + offset,
@@ -190,7 +190,7 @@ static cairo_bool_t
check_visual (Display *dpy)
{
Visual *visual = DefaultVisual (dpy, DefaultScreen (dpy));
-
+
if ((visual->red_mask == 0xff0000 &&
visual->green_mask == 0x00ff00 &&
visual->blue_mask == 0x0000ff) ||
@@ -201,7 +201,7 @@ check_visual (Display *dpy)
else
return 0;
}
-
+
int
main (void)
{
@@ -238,7 +238,7 @@ main (void)
reference_data = malloc (SIZE * SIZE * 4);
test_data = malloc (SIZE * SIZE * 4);
diff_data = malloc (SIZE * SIZE * 4);
-
+
reference_surface = cairo_image_surface_create_for_data (reference_data,
CAIRO_FORMAT_RGB24,
SIZE, SIZE,
@@ -274,6 +274,6 @@ main (void)
cairo_debug_reset_static_data ();
fclose (log_file);
-
+
return result;
}
More information about the cairo-commit
mailing list