[cairo-commit] Branch '1.0' - pixman/src src/cairo-atsui-font.c src/cairo-quartz-surface.c

Christian Biesinger biesi at kemper.freedesktop.org
Sat Mar 4 06:43:24 PST 2006


 pixman/src/fbcompose.c             |    6 +++---
 pixman/src/pixman-xserver-compat.h |    2 +-
 src/cairo-atsui-font.c             |   31 +++++++++++++++++--------------
 src/cairo-quartz-surface.c         |   11 ++++++-----
 4 files changed, 27 insertions(+), 23 deletions(-)

New commits:
diff-tree 30d4aa863124075c59e8ebf2ce2c085d64290347 (from 7d498ca91279a4e793d704c5b878f070be4c878f)
Author: Christian Biesinger <cbiesinger at web.de>
Date:   Sat Mar 4 15:43:15 2006 +0100

    Use C-style comments rather than C++-style in C files

diff --git a/pixman/src/fbcompose.c b/pixman/src/fbcompose.c
index fe07662..4598ab2 100644
--- a/pixman/src/fbcompose.c
+++ b/pixman/src/fbcompose.c
@@ -33,9 +33,9 @@
 
 #include "pixregionint.h"
 
-// #define PIXMAN_CONVOLUTION
-// #define PIXMAN_GRADIENTS
-// #define PIXMAN_INDEXED_FORMATS
+/* #define PIXMAN_CONVOLUTION */
+/* #define PIXMAN_GRADIENTS */
+/* #define PIXMAN_INDEXED_FORMATS */
 
 static Bool
 PictureTransformPoint3d (pixman_transform_t *transform,
diff --git a/pixman/src/pixman-xserver-compat.h b/pixman/src/pixman-xserver-compat.h
index 46e2825..5113abd 100644
--- a/pixman/src/pixman-xserver-compat.h
+++ b/pixman/src/pixman-xserver-compat.h
@@ -72,8 +72,8 @@ typedef pixman_triangle_t	xTriangle;
 #define FB_SHIFT IC_SHIFT 
 #define FB_MASK IC_MASK
 #define FB_ALLONES IC_ALLONES
+#define FbMaskBits IcMaskBits
 */
-//#define FbMaskBits IcMaskBits
 
 /* XXX: We changed some function and field names which makes for some
  * ugly hacks... */
diff --git a/src/cairo-atsui-font.c b/src/cairo-atsui-font.c
index 9014057..4d441c0 100644
--- a/src/cairo-atsui-font.c
+++ b/src/cairo-atsui-font.c
@@ -80,7 +80,7 @@ CreateSizedCopyOfStyle(ATSUStyle inStyle
     OSStatus err;
 
 
-    // Set the style's size
+    /* Set the style's size */
     CGAffineTransform theTransform =
         CGAffineTransformMakeWithCairoFontScale(scale);
     Fixed theSize =
@@ -148,7 +148,7 @@ _cairo_atsui_font_create_toy(cairo_toy_f
                                kFontNoLanguageCode, &fontID);
 
     if (err != noErr) {
-	// couldn't get the font - remap css names and try again
+	/* couldn't get the font - remap css names and try again */
 
 	if (!strcmp(family, "serif"))
 	    family = "Times";
@@ -160,7 +160,7 @@ _cairo_atsui_font_create_toy(cairo_toy_f
 	    family = "Gadget";
 	else if (!strcmp(family, "monospace"))
 	    family = "Courier";
-	else // anything else - return error instead?
+	else /* anything else - return error instead? */
 	    family = "Courier";
 
 	err = ATSUFindFontFromName(family, strlen(family),
@@ -247,7 +247,7 @@ _cairo_atsui_font_text_to_glyphs(void		*
     UniChar *theText;
     cairo_status_t status;
 
-    // liberal estimate of size
+    /* liberal estimate of size */
     charCount = strlen(utf8);
 
     if (charCount == 0) {
@@ -266,11 +266,11 @@ _cairo_atsui_font_text_to_glyphs(void		*
                                      theText, 0, charCount, charCount);
 
 
-    // Set the style for all of the text
+    /* Set the style for all of the text */
     err = ATSUSetRunStyle(textLayout,
                           font->unscaled_style, kATSUFromTextBeginning, kATSUToTextEnd);
 
-    // Get the glyphs from the text layout object
+    /* Get the glyphs from the text layout object */
     err = ATSUDirectGetLayoutDataArrayPtrFromTextLayout(textLayout,
                                                         0,
                                                         kATSUDirectDataLayoutRecordATSLayoutRecordCurrent,
@@ -315,7 +315,7 @@ _cairo_atsui_font_font_extents(void *abs
     ATSFontMetrics metrics;
     OSStatus err;
 
-    // TODO - test this
+    /* TODO - test this */
 
     atsFont = FMGetATSFontRefFromFont(font->fontID);
 
@@ -330,7 +330,9 @@ _cairo_atsui_font_font_extents(void *abs
             extents->height = metrics.capHeight;
             extents->max_x_advance = metrics.maxAdvanceWidth;
 
-            // The FT backend doesn't handle max_y_advance either, so we'll ignore it for now. 
+            /* The FT backend doesn't handle max_y_advance either, so we'll
+             * ignore it for now.
+             */
             extents->max_y_advance = 0.0;
 
             return CAIRO_STATUS_SUCCESS;
@@ -458,7 +460,7 @@ _cairo_atsui_font_show_glyphs(void *abst
 				      &rect,
 				      &extra);
 
-    // Create a CGBitmapContext for the dest surface for drawing into
+    /* Create a CGBitmapContext for the dest surface for drawing into */
     colorSpace = CGColorSpaceCreateDeviceRGB();
 
     myBitmapContext = CGBitmapContextCreate(destImageSurface->data,
@@ -496,11 +498,12 @@ _cairo_atsui_font_show_glyphs(void *abst
 	CGContextSetRGBFillColor(myBitmapContext, 0.0f, 0.0f, 0.0f, 0.0f);
     }
 
-    // TODO - bold and italic text
-    //
-    // We could draw the text using ATSUI and get bold, italics
-    // etc. for free, but ATSUI does a lot of text layout work
-    // that we don't really need...
+    /* TODO - bold and italic text
+     *
+     * We could draw the text using ATSUI and get bold, italics
+     * etc. for free, but ATSUI does a lot of text layout work
+     * that we don't really need...
+     */
 
 
     for (i = 0; i < num_glyphs; i++) {
diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c
index b023d34..79d2bd7 100644
--- a/src/cairo-quartz-surface.c
+++ b/src/cairo-quartz-surface.c
@@ -83,10 +83,11 @@ _cairo_quartz_surface_acquire_source_ima
     UInt32 imageDataSize, rowBytes;
     CGDataProviderRef dataProvider;
 
-    // We keep a cached (cairo_image_surface_t *) in the cairo_quartz_surface_t
-    // struct. If the window is ever drawn to without going through Cairo, then
-    // we would need to refetch the pixel data from the window into the cached
-    // image surface. 
+    /* We keep a cached (cairo_image_surface_t *) in the cairo_quartz_surface_t
+     * struct. If the window is ever drawn to without going through Cairo, then
+     * we would need to refetch the pixel data from the window into the cached
+     * image surface.
+     */
     if (surface->image) {
         cairo_surface_reference(&surface->image->base);
 
@@ -245,7 +246,7 @@ cairo_surface_t *cairo_quartz_surface_cr
     surface->image = NULL;
     surface->cgImage = NULL;
 
-    // Set up the image surface which Cairo draws into and we blit to & from.
+    /* Set up the image surface which Cairo draws into and we blit to & from. */
     void *foo;
     _cairo_quartz_surface_acquire_source_image(surface, &surface->image, &foo);
 


More information about the cairo-commit mailing list