*** orig/src/frame.h --- mod/src/frame.h *************** *** 880,919 **** canonical char width is to be used. X must be a Lisp integer or float. Value is a C integer. */ ! #define FRAME_PIXEL_X_FROM_CANON_X(F, X) \ ! (INTEGERP (X) \ ! ? XINT (X) * FRAME_COLUMN_WIDTH (F) \ ! : (int) (XFLOAT_DATA (X) * FRAME_COLUMN_WIDTH (F))) /* Convert canonical value Y to pixels. F is the frame whose canonical character height is to be used. X must be a Lisp integer or float. Value is a C integer. */ #define FRAME_PIXEL_Y_FROM_CANON_Y(F, Y) \ ! (INTEGERP (Y) \ ! ? XINT (Y) * FRAME_LINE_HEIGHT (F) \ ! : (int) (XFLOAT_DATA (Y) * FRAME_LINE_HEIGHT (F))) /* Convert pixel-value X to canonical units. F is the frame whose canonical character width is to be used. X is a C integer. Result is a Lisp float if X is not a multiple of the canon width, otherwise it's a Lisp integer. */ ! #define FRAME_CANON_X_FROM_PIXEL_X(F, X) \ ! ((X) % FRAME_COLUMN_WIDTH (F) != 0 \ ! ? make_float ((double) (X) / FRAME_COLUMN_WIDTH (F)) \ ! : make_number ((X) / FRAME_COLUMN_WIDTH (F))) /* Convert pixel-value Y to canonical units. F is the frame whose canonical character height is to be used. Y is a C integer. Result is a Lisp float if Y is not a multiple of the canon width, otherwise it's a Lisp integer. */ ! #define FRAME_CANON_Y_FROM_PIXEL_Y(F, Y) \ ! ((Y) % FRAME_LINE_HEIGHT (F) \ ! ? make_float ((double) (Y) / FRAME_LINE_HEIGHT (F)) \ ! : make_number ((Y) / FRAME_LINE_HEIGHT (F))) ! /* Manipulating pixel sizes and character sizes. --- 880,924 ---- canonical char width is to be used. X must be a Lisp integer or float. Value is a C integer. */ ! #define FRAME_PIXEL_X_FROM_CANON_X(F, X) \ ! (FRAME_INTERNAL_BORDER_WIDTH (F) + \ ! (INTEGERP (X) \ ! ? XINT (X) * FRAME_COLUMN_WIDTH (F) \ ! : (int) (XFLOAT_DATA (X) * FRAME_COLUMN_WIDTH (F)))) /* Convert canonical value Y to pixels. F is the frame whose canonical character height is to be used. X must be a Lisp integer or float. Value is a C integer. */ #define FRAME_PIXEL_Y_FROM_CANON_Y(F, Y) \ ! (FRAME_INTERNAL_BORDER_WIDTH (F) + \ ! (INTEGERP (Y) \ ! ? XINT (Y) * FRAME_LINE_HEIGHT (F) \ ! : (int) (XFLOAT_DATA (Y) * FRAME_LINE_HEIGHT (F)))) /* Convert pixel-value X to canonical units. F is the frame whose canonical character width is to be used. X is a C integer. Result is a Lisp float if X is not a multiple of the canon width, otherwise it's a Lisp integer. */ ! #define FRAME_CANON_X_FROM_PIXEL_X(F, X) \ ! ((X - FRAME_INTERNAL_BORDER_WIDTH (F)) % FRAME_COLUMN_WIDTH (F) != 0 \ ! ? make_float ((double) (X - FRAME_INTERNAL_BORDER_WIDTH (F)) / \ ! FRAME_COLUMN_WIDTH (F)) \ ! : make_number ((X - FRAME_INTERNAL_BORDER_WIDTH (F)) / \ ! FRAME_COLUMN_WIDTH (F))) /* Convert pixel-value Y to canonical units. F is the frame whose canonical character height is to be used. Y is a C integer. Result is a Lisp float if Y is not a multiple of the canon width, otherwise it's a Lisp integer. */ ! #define FRAME_CANON_Y_FROM_PIXEL_Y(F, Y) \ ! ((Y - FRAME_INTERNAL_BORDER_WIDTH (F)) % FRAME_LINE_HEIGHT (F) != 0 \ ! ? make_float ((double) (Y - FRAME_INTERNAL_BORDER_WIDTH (F)) / \ ! FRAME_LINE_HEIGHT (F)) \ ! : make_number ((Y - FRAME_INTERNAL_BORDER_WIDTH (F)) / \ ! FRAME_LINE_HEIGHT (F))) /* Manipulating pixel sizes and character sizes.