[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: More enhancements to fringe bitmaps.
From: |
YAMAMOTO Mitsuharu |
Subject: |
Re: More enhancements to fringe bitmaps. |
Date: |
Mon, 09 Feb 2004 11:48:39 +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 09 Feb 2004 02:01:48 +0100, address@hidden (Kim F. Storm) said:
> There is some code (adapted to w32 and mac) which aim to use the
> text cursor color when the cursor is in the right fringe, but as I
> have no way of testing this -- so I didn't enable it.
For the mac port, the above change seems to work fine as far as I
tested with "M-x set-cursor-color RET red RET". Sometimes a box
cursor appears as a hollow cursor in the fringe area, but I think this
is not related to the above change.
> There is also some code which (on X) sets the clipmask for drawing
> the bitmap to the bitmap itself when "overlay_p" is set in the
> parameter block; the intention is that the bitmap should be drawn
> with a transparent background over another bitmap. I don't know
> anything about clipping on W32 or MAC, so I have no clue how to
> accomplish this on those platforms -- so I need help.
In mac, the easiest way to do this would be to use the "srcOr" bitmap
transfer mode (draw only foreground), instead of the "srcCopy" mode
(draw both foreground and background).
YAMAMOTO Mitsuharu
address@hidden
*** src/macterm.c.~1.58.~ Mon Feb 9 09:57:53 2004
--- src/macterm.c Mon Feb 9 11:19:05 2004
***************
*** 467,478 ****
/* Mac replacement for XCopyArea. */
static void
! mac_draw_bitmap (display, w, gc, x, y, bitmap)
Display *display;
WindowPtr w;
GC gc;
int x, y;
BitMap *bitmap;
{
Rect r;
--- 467,479 ----
/* Mac replacement for XCopyArea. */
static void
! mac_draw_bitmap (display, w, gc, x, y, bitmap, overlay_p)
Display *display;
WindowPtr w;
GC gc;
int x, y;
BitMap *bitmap;
+ int overlay_p;
{
Rect r;
***************
*** 491,501 ****
LockPortBits (GetWindowPort (w));
pmh = GetPortPixMap (GetWindowPort (w));
! CopyBits (bitmap, (BitMap *) *pmh, &(bitmap->bounds), &r, srcCopy, 0);
UnlockPortBits (GetWindowPort (w));
}
#else /* not TARGET_API_MAC_CARBON */
! CopyBits (bitmap, &(w->portBits), &(bitmap->bounds), &r, srcCopy, 0);
#endif /* not TARGET_API_MAC_CARBON */
}
--- 492,504 ----
LockPortBits (GetWindowPort (w));
pmh = GetPortPixMap (GetWindowPort (w));
! CopyBits (bitmap, (BitMap *) *pmh, &(bitmap->bounds), &r,
! overlay_p ? srcOr : srcCopy, 0);
UnlockPortBits (GetWindowPort (w));
}
#else /* not TARGET_API_MAC_CARBON */
! CopyBits (bitmap, &(w->portBits), &(bitmap->bounds), &r,
! overlay_p ? srcOr : srcCopy, 0);
#endif /* not TARGET_API_MAC_CARBON */
}
***************
*** 1345,1373 ****
BitMap bitmap;
mac_create_bitmap_from_bitmap_data (&bitmap, bits, p->wd, p->h);
- gcv.foreground = face->foreground;
- gcv.background = face->background;
-
- #if 0 /* TODO: fringe overlay_p and cursor_p */
gcv.foreground = (p->cursor_p
? (p->overlay_p ? face->background
: f->output_data.mac->cursor_pixel)
! : face->foreground));
!
! if (p->overlay_p)
! {
! clipmask = XCreatePixmapFromBitmapData (display,
! FRAME_X_DISPLAY_INFO
(f)->root_window,
! bits, p->wd, p->h,
! 1, 0, 1);
! gcv.clip_mask = clipmask;
! gcv.clip_x_origin = p->x;
! gcv.clip_y_origin = p->y;
! XChangeGC (display, gc, GCClipMask | GCClipXOrigin | GCClipYOrigin,
&gcv);
! }
! #endif
!
! mac_draw_bitmap (display, window, &gcv, p->x, p->y, &bitmap);
mac_free_bitmap (&bitmap);
#if 0 /* TODO: fringe overlay_p and cursor_p */
--- 1348,1360 ----
BitMap bitmap;
mac_create_bitmap_from_bitmap_data (&bitmap, bits, p->wd, p->h);
gcv.foreground = (p->cursor_p
? (p->overlay_p ? face->background
: f->output_data.mac->cursor_pixel)
! : face->foreground);
! gcv.background = face->background;
! mac_draw_bitmap (display, window, &gcv, p->x, p->y, &bitmap,
! p->overlay_p);
mac_free_bitmap (&bitmap);
#if 0 /* TODO: fringe overlay_p and cursor_p */
- More enhancements to fringe bitmaps., Kim F. Storm, 2004/02/08
- Re: More enhancements to fringe bitmaps.,
YAMAMOTO Mitsuharu <=
- Re: More enhancements to fringe bitmaps., Kim F. Storm, 2004/02/09
- Re: More enhancements to fringe bitmaps., YAMAMOTO Mitsuharu, 2004/02/10
- Re: More enhancements to fringe bitmaps., Kim F. Storm, 2004/02/11
- Re: More enhancements to fringe bitmaps., YAMAMOTO Mitsuharu, 2004/02/11
- Re: More enhancements to fringe bitmaps., Stefan Monnier, 2004/02/11
- Re: More enhancements to fringe bitmaps., YAMAMOTO Mitsuharu, 2004/02/11
- Re: More enhancements to fringe bitmaps., Kim F. Storm, 2004/02/13
- Re: More enhancements to fringe bitmaps., Harald Maier, 2004/02/14