]> git.eshelyaron.com Git - emacs.git/commitdiff
Invert y coord of NS image files (bug#7847)
authorAlan Third <alan@idiocy.org>
Sat, 10 Sep 2016 22:46:09 +0000 (23:46 +0100)
committerAlan Third <alan@idiocy.org>
Sat, 10 Sep 2016 22:49:02 +0000 (23:49 +0100)
* src/nsterm.m (ns_dumpglyphs_image): Invert y co-ordinate of the image
when compositing.

src/nsterm.m

index ceda30bd46f08139211089fc977e8701523e5110..26977e47fbd0d231dd7b8c18019b2edcb1dcf511 100644 (file)
@@ -3478,7 +3478,8 @@ ns_dumpglyphs_image (struct glyph_string *s, NSRect r)
     {
 #ifdef NS_IMPL_COCOA
       NSRect dr = NSMakeRect (x, y, s->slice.width, s->slice.height);
-      NSRect ir = NSMakeRect (s->slice.x, s->slice.y,
+      NSRect ir = NSMakeRect (s->slice.x,
+                              s->img->height - s->slice.y - s->slice.height,
                               s->slice.width, s->slice.height);
       [img drawInRect: dr
              fromRect: ir