Commit 1938bc36 authored by Kim F. Storm's avatar Kim F. Storm
Browse files

(image_ascent): Add slice arg; calculate ascent for

image slice (or full image).
parent cedd7cd9
......@@ -1076,13 +1076,21 @@ prepare_image_for_display (f, img)
drawn in face FACE. */
image_ascent (img, face)
image_ascent (img, face, slice)
struct image *img;
struct face *face;
struct glyph_slice *slice;
int height = img->height + img->vmargin;
int height;
int ascent;
if (slice->height == img->height)
height = img->height + img->vmargin;
else if (slice->y == 0)
height = slice->height + img->vmargin;
height = slice->height;
if (img->ascent == CENTERED_IMAGE_ASCENT)
if (face->font)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment