[cairo-commit] 2 commits - src/cairo-win32-printing-surface.c
Vladimir Vukicevic
vladimir at kemper.freedesktop.org
Wed Oct 10 14:06:09 PDT 2007
src/cairo-win32-printing-surface.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
New commits:
diff-tree 8eb9fcf67336a8e4f95366956ae6f1880af4a93e (from 3545ebc1357969616e2f4fa6b36565f211ea36b3)
Author: Vladimir Vukicevic <vladimir at pobox.com>
Date: Wed Oct 10 14:05:22 2007 -0700
[win32] mask win32 printing vertex colors with 0xff00 per docs
The range for the vertex color structures is 0x0000 .. 0xff00; I
think that this is an error in the docs, but strip out the low bits
just in case.
diff --git a/src/cairo-win32-printing-surface.c b/src/cairo-win32-printing-surface.c
index 3b262aa..26b0cfd 100644
--- a/src/cairo-win32-printing-surface.c
+++ b/src/cairo-win32-printing-surface.c
@@ -399,10 +399,13 @@ FINISH:
static void
vertex_set_color (TRIVERTEX *vert, cairo_color_t *color)
{
- vert->Alpha = 0xffff;
- vert->Red = color->red_short;
- vert->Green = color->green_short;
- vert->Blue = color->blue_short;
+ /* MSDN says that the range here is 0x0000 .. 0xff00;
+ * that may well be a typo, but just chop the low bits
+ * here. */
+ vert->Alpha = 0xff00;
+ vert->Red = color->red_short & 0xff00;
+ vert->Green = color->green_short & 0xff00;
+ vert->Blue = color->blue_short & 0xff00;
}
static cairo_int_status_t
diff-tree 3545ebc1357969616e2f4fa6b36565f211ea36b3 (from 0b65c301a72836f46cdcda8b8fa1e995100c7727)
Author: Vladimir Vukicevic <vladimir at pobox.com>
Date: Wed Oct 10 14:01:30 2007 -0700
Fix win32 printing surface copyright notice
Bad copy-and-paste of license.
diff --git a/src/cairo-win32-printing-surface.c b/src/cairo-win32-printing-surface.c
index 8e044a4..3b262aa 100644
--- a/src/cairo-win32-printing-surface.c
+++ b/src/cairo-win32-printing-surface.c
@@ -1,7 +1,7 @@
/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
/* Cairo - a vector graphics library with display and print output
*
- * Copyright © 2005 Red Hat, Inc.
+ * Copyright © 2007 Adrian Johnson
*
* This library is free software; you can redistribute it and/or
* modify it either under the terms of the GNU Lesser General Public
@@ -28,7 +28,7 @@
*
* The Original Code is the cairo graphics library.
*
- * The Initial Developer of the Original Code is Red Hat, Inc.
+ * The Initial Developer of the Original Code is Adrian Johnson.
*
* Contributor(s):
* Adrian Johnson <ajohnson at redneon.com>
More information about the cairo-commit
mailing list