aboutsummaryrefslogtreecommitdiffstats
path: root/mac/src
diff options
context:
space:
mode:
authorAndrew Choi2001-08-21 10:06:09 +0000
committerAndrew Choi2001-08-21 10:06:09 +0000
commitf9e25d0c969f4d9fda329bab70c6d0a30dafb15f (patch)
treed7ed1be09bbfbd28eee026a13716dbf34d430738 /mac/src
parent6ea3db8a109343832a5da4458bb5259481c3058e (diff)
downloademacs-f9e25d0c969f4d9fda329bab70c6d0a30dafb15f.tar.gz
emacs-f9e25d0c969f4d9fda329bab70c6d0a30dafb15f.zip
2001-08-21 Andrew Choi <akochoi@cse.cuhk.edu.hk>
* src/macterm.c (mac_scroll_area): Call CopyBits with local coordinates and portBits instead of global coordinates and screenBits. Set fore color and back color to black and white, respectively, before calling CopyBits. * src/macterm.c (local_to_global_coord): Comment out.
Diffstat (limited to 'mac/src')
-rw-r--r--mac/src/macterm.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/mac/src/macterm.c b/mac/src/macterm.c
index 09feea3b373..549b2369121 100644
--- a/mac/src/macterm.c
+++ b/mac/src/macterm.c
@@ -836,6 +836,7 @@ mac_copy_area (display, src, dest, gc, src_x, src_y, width, height, dest_x,
836} 836}
837 837
838 838
839#if 0
839/* Convert a pair of local coordinates to global (screen) coordinates. 840/* Convert a pair of local coordinates to global (screen) coordinates.
840 Assume graphic port has been properly set. */ 841 Assume graphic port has been properly set. */
841static void 842static void
@@ -851,7 +852,7 @@ local_to_global_coord (short *h, short *v)
851 *h = p.h; 852 *h = p.h;
852 *v = p.v; 853 *v = p.v;
853} 854}
854 855#endif
855 856
856/* Mac replacement for XCopyArea: used only for scrolling. */ 857/* Mac replacement for XCopyArea: used only for scrolling. */
857 858
@@ -867,11 +868,14 @@ mac_scroll_area (display, w, gc, src_x, src_y, width, height, dest_x, dest_y)
867 Rect src_r, dest_r; 868 Rect src_r, dest_r;
868 869
869 SetPort (w); 870 SetPort (w);
871#if 0
870 mac_set_colors (gc); 872 mac_set_colors (gc);
873#endif
871 874
872 SetRect (&src_r, src_x, src_y, src_x + width, src_y + height); 875 SetRect (&src_r, src_x, src_y, src_x + width, src_y + height);
873 SetRect (&dest_r, dest_x, dest_y, dest_x + width, dest_y + height); 876 SetRect (&dest_r, dest_x, dest_y, dest_x + width, dest_y + height);
874 877
878#if 0
875 /* Need to use global coordinates and screenBits since src and dest 879 /* Need to use global coordinates and screenBits since src and dest
876 areas overlap in general. */ 880 areas overlap in general. */
877 local_to_global_coord (&src_r.left, &src_r.top); 881 local_to_global_coord (&src_r.left, &src_r.top);
@@ -880,6 +884,15 @@ mac_scroll_area (display, w, gc, src_x, src_y, width, height, dest_x, dest_y)
880 local_to_global_coord (&dest_r.right, &dest_r.bottom); 884 local_to_global_coord (&dest_r.right, &dest_r.bottom);
881 885
882 CopyBits (&qd.screenBits, &qd.screenBits, &src_r, &dest_r, srcCopy, 0); 886 CopyBits (&qd.screenBits, &qd.screenBits, &src_r, &dest_r, srcCopy, 0);
887#else
888 /* In Color QuickDraw, set ForeColor and BackColor as follows to avoid
889 color mapping in CopyBits. Otherwise, it will be slow. */
890 ForeColor (blackColor);
891 BackColor (whiteColor);
892 CopyBits (&(w->portBits), &(w->portBits), &src_r, &dest_r, srcCopy, 0);
893
894 mac_set_colors (gc);
895#endif
883} 896}
884 897
885 898