emacs-devel
[Top][All Lists]
Advanced

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

Re: display-mm-height for MacOS?


From: YAMAMOTO Mitsuharu
Subject: Re: display-mm-height for MacOS?
Date: Tue, 23 Mar 2004 09:51:09 +0900
User-agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 Emacs/21.3.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On 22 Mar 2004 13:08:11 +0100, David Kastrup <address@hidden> said:

> On MacOS, it would appear that this results in awfully large images,
> so one of the three above stated dimensions would seem to be quite
> wrong.

Could you try this patch?

                                     YAMAMOTO Mitsuharu
                                address@hidden

Index: src/macfns.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/macfns.c,v
retrieving revision 1.31
diff -c -r1.31 macfns.c
*** src/macfns.c        11 Mar 2004 22:43:18 -0000      1.31
--- src/macfns.c        23 Mar 2004 00:42:32 -0000
***************
*** 3025,3035 ****
    /* MAC_TODO: this is an approximation, and only of the main display */
  
    struct mac_display_info *dpyinfo = check_x_display_info (display);
-   short h, v;
  
!   ScreenRes (&h, &v);
! 
!   return make_number ((int) (v / 72.0 * 25.4));
  }
  
  DEFUN ("x-display-mm-width", Fx_display_mm_width, Sx_display_mm_width, 0, 1, 
0,
--- 3025,3032 ----
    /* MAC_TODO: this is an approximation, and only of the main display */
  
    struct mac_display_info *dpyinfo = check_x_display_info (display);
  
!   return make_number ((int) (dpyinfo->height * 25.4 / dpyinfo->resy));
  }
  
  DEFUN ("x-display-mm-width", Fx_display_mm_width, Sx_display_mm_width, 0, 1, 
0,
***************
*** 3043,3053 ****
    /* MAC_TODO: this is an approximation, and only of the main display */
  
    struct mac_display_info *dpyinfo = check_x_display_info (display);
-   short h, v;
- 
-   ScreenRes (&h, &v);
  
!   return make_number ((int) (h / 72.0 * 25.4));
  }
  
  DEFUN ("x-display-backing-store", Fx_display_backing_store,
--- 3040,3047 ----
    /* MAC_TODO: this is an approximation, and only of the main display */
  
    struct mac_display_info *dpyinfo = check_x_display_info (display);
  
!   return make_number ((int) (dpyinfo->width * 25.4 / dpyinfo->resx));
  }
  
  DEFUN ("x-display-backing-store", Fx_display_backing_store,




reply via email to

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