[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/dispnew.c [emacs-unicode-2]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/src/dispnew.c [emacs-unicode-2] |
Date: |
Mon, 28 Jun 2004 03:56:02 -0400 |
Index: emacs/src/dispnew.c
diff -c emacs/src/dispnew.c:1.318.2.3 emacs/src/dispnew.c:1.318.2.4
*** emacs/src/dispnew.c:1.318.2.3 Fri Apr 16 12:50:46 2004
--- emacs/src/dispnew.c Mon Jun 28 07:29:19 2004
***************
*** 5716,5721 ****
--- 5716,5724 ----
struct text_pos startp;
Lisp_Object string;
struct glyph_row *row;
+ #ifdef HAVE_WINDOW_SYSTEM
+ struct image *img = 0;
+ #endif
int x0, x1;
current_buffer = XBUFFER (w->buffer);
***************
*** 5741,5747 ****
#ifdef HAVE_WINDOW_SYSTEM
if (it.what == IT_IMAGE)
{
- struct image *img;
if ((img = IMAGE_FROM_ID (it.f, it.image_id)) != NULL
&& !NILP (img->spec))
*object = img->spec;
--- 5744,5749 ----
***************
*** 5754,5765 ****
if (it.hpos < row->used[TEXT_AREA])
{
struct glyph *glyph = row->glyphs[TEXT_AREA] + it.hpos;
- *width = glyph->pixel_width;
- *height = glyph->ascent + glyph->descent;
#ifdef HAVE_WINDOW_SYSTEM
! if (glyph->type == IMAGE_GLYPH)
! *dy -= row->ascent - glyph->ascent;
#endif
}
else
{
--- 5756,5777 ----
if (it.hpos < row->used[TEXT_AREA])
{
struct glyph *glyph = row->glyphs[TEXT_AREA] + it.hpos;
#ifdef HAVE_WINDOW_SYSTEM
! if (img)
! {
! *dy -= row->ascent - glyph->ascent;
! *dx += glyph->slice.x;
! *dy += glyph->slice.y;
! /* Image slices positions are still relative to the entire image
*/
! *width = img->width;
! *height = img->height;
! }
! else
#endif
+ {
+ *width = glyph->pixel_width;
+ *height = glyph->ascent + glyph->descent;
+ }
}
else
{
***************
*** 5925,5930 ****
--- 5937,5944 ----
if (img != NULL)
*object = img->spec;
y0 -= row->ascent - glyph->ascent;
+ x0 += glyph->slice.x;
+ y0 += glyph->slice.y;
}
#endif
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/src/dispnew.c [emacs-unicode-2],
Miles Bader <=