emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/Attic/macterm.c, v [EMACS_22_BASE]


From: YAMAMOTO Mitsuharu
Subject: [Emacs-diffs] Changes to emacs/src/Attic/macterm.c, v [EMACS_22_BASE]
Date: Sat, 30 Aug 2008 08:07:49 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Branch:         EMACS_22_BASE
Changes by:     YAMAMOTO Mitsuharu <mituharu>   08/08/30 08:07:49

Index: macterm.c
===================================================================
RCS file: /sources/emacs/emacs/src/Attic/macterm.c,v
retrieving revision 1.214.2.28
retrieving revision 1.214.2.29
diff -u -b -r1.214.2.28 -r1.214.2.29
--- macterm.c   30 Aug 2008 04:54:55 -0000      1.214.2.28
+++ macterm.c   30 Aug 2008 08:07:48 -0000      1.214.2.29
@@ -1012,7 +1012,6 @@
   else
     {
       static CGContextRef context;
-      CGFloat port_height = FRAME_PIXEL_HEIGHT (f);
       static const ATSUAttributeTag tags[] = {kATSUCGContextTag};
       static const ByteCount sizes[] = {sizeof (CGContextRef)};
       static const ATSUAttributeValuePtr values[] = {&context};
@@ -1026,7 +1025,7 @@
       QDBeginCGContext (port, &context);
       if (gc->n_clip_rects || bg_width)
        {
-         CGContextTranslateCTM (context, 0, port_height);
+         CGContextTranslateCTM (context, 0, FRAME_PIXEL_HEIGHT (f));
          CGContextScaleCTM (context, 1, -1);
          if (gc->n_clip_rects)
            CGContextClipToRects (context, gc->clip_rects,
@@ -1042,7 +1041,6 @@
                                                FONT_HEIGHT (GC_FONT (gc))));
            }
          CGContextScaleCTM (context, 1, -1);
-         CGContextTranslateCTM (context, 0, -port_height);
 #if !USE_CG_DRAWING
        }
 #endif
@@ -1054,11 +1052,11 @@
        {
          ATSUDrawText (text_layout,
                        kATSUFromTextBeginning, kATSUToTextEnd,
-                       Long2Fix (x), Long2Fix (port_height - y));
+                       Long2Fix (x), Long2Fix (-y));
          if (overstrike_p)
            ATSUDrawText (text_layout,
                          kATSUFromTextBeginning, kATSUToTextEnd,
-                         Long2Fix (x + 1), Long2Fix (port_height - y));
+                         Long2Fix (x + 1), Long2Fix (-y));
        }
 #if USE_CG_DRAWING
       mac_end_cg_clip (f);
@@ -1383,7 +1381,7 @@
      XChar2b *buf;
      int nchars, bg_width, overstrike_p;
 {
-  CGFloat port_height, gx, gy;
+  CGFloat gx, gy;
   int i;
   CGContextRef context;
   CGGlyph *glyphs;
@@ -1392,9 +1390,8 @@
   if (!mac_use_core_graphics || GC_FONT (gc)->cg_font == NULL)
     return 0;
 
-  port_height = FRAME_PIXEL_HEIGHT (f);
   gx = x;
-  gy = port_height - y;
+  gy = -y;
   glyphs = (CGGlyph *)buf;
   advances = alloca (sizeof (CGSize) * nchars);
   if (advances == NULL)
@@ -1415,7 +1412,7 @@
   QDBeginCGContext (GetWindowPort (FRAME_MAC_WINDOW (f)), &context);
   if (gc->n_clip_rects || bg_width)
     {
-      CGContextTranslateCTM (context, 0, port_height);
+      CGContextTranslateCTM (context, 0, FRAME_PIXEL_HEIGHT (f));
       CGContextScaleCTM (context, 1, -1);
       if (gc->n_clip_rects)
        CGContextClipToRects (context, gc->clip_rects, gc->n_clip_rects);
@@ -1429,7 +1426,6 @@
                            bg_width, FONT_HEIGHT (GC_FONT (gc))));
        }
       CGContextScaleCTM (context, 1, -1);
-      CGContextTranslateCTM (context, 0, -port_height);
 #if !USE_CG_DRAWING
     }
 #endif




reply via email to

[Prev in Thread] Current Thread [Next in Thread]