diff options
author | Andrew Choi <akochoi@shaw.ca> | 2001-08-21 10:06:09 +0000 |
---|---|---|
committer | Andrew Choi <akochoi@shaw.ca> | 2001-08-21 10:06:09 +0000 |
commit | f9e25d0c969f4d9fda329bab70c6d0a30dafb15f (patch) | |
tree | d7ed1be09bbfbd28eee026a13716dbf34d430738 /mac | |
parent | 6ea3db8a109343832a5da4458bb5259481c3058e (diff) | |
download | emacs-f9e25d0c969f4d9fda329bab70c6d0a30dafb15f.tar.gz |
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')
-rw-r--r-- | mac/ChangeLog | 9 | ||||
-rw-r--r-- | mac/src/macterm.c | 15 |
2 files changed, 23 insertions, 1 deletions
diff --git a/mac/ChangeLog b/mac/ChangeLog index a009e66060c..e927b53bc91 100644 --- a/mac/ChangeLog +++ b/mac/ChangeLog @@ -1,3 +1,12 @@ +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. + 2001-07-26 Andrew Choi <akochoi@i-cable.com> * inc/macterm.h (x_display_list): Declare extern. 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, } +#if 0 /* Convert a pair of local coordinates to global (screen) coordinates. Assume graphic port has been properly set. */ static void @@ -851,7 +852,7 @@ local_to_global_coord (short *h, short *v) *h = p.h; *v = p.v; } - +#endif /* Mac replacement for XCopyArea: used only for scrolling. */ @@ -867,11 +868,14 @@ mac_scroll_area (display, w, gc, src_x, src_y, width, height, dest_x, dest_y) Rect src_r, dest_r; SetPort (w); +#if 0 mac_set_colors (gc); +#endif SetRect (&src_r, src_x, src_y, src_x + width, src_y + height); SetRect (&dest_r, dest_x, dest_y, dest_x + width, dest_y + height); +#if 0 /* Need to use global coordinates and screenBits since src and dest areas overlap in general. */ 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) local_to_global_coord (&dest_r.right, &dest_r.bottom); CopyBits (&qd.screenBits, &qd.screenBits, &src_r, &dest_r, srcCopy, 0); +#else + /* In Color QuickDraw, set ForeColor and BackColor as follows to avoid + color mapping in CopyBits. Otherwise, it will be slow. */ + ForeColor (blackColor); + BackColor (whiteColor); + CopyBits (&(w->portBits), &(w->portBits), &src_r, &dest_r, srcCopy, 0); + + mac_set_colors (gc); +#endif } |