emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch] add "underwave" face attribute


From: Juanma Barranquero
Subject: Re: [patch] add "underwave" face attribute
Date: Thu, 2 Feb 2012 01:52:32 +0100

On Thu, Feb 2, 2012 at 01:18, Aurélien Aptel
<address@hidden> wrote:

> Someone who can build emacs on windows/mac osx needs to try it and report back

On Windows,

+void
+w32_draw_underwave (HDC hdc, COLORREF *color,

that should be COLORREF, not COLORREF *.

+                    int x0, int y0,
+                    int width,
+                    int wave_height, int wave_length)
+{
+  HPEN hp, oldhp;
+  int dx = wave_length, dy = wave_height-1;
+  int x1, y1, x2, y2;
+  double coef = dy/(double)dx;
+
+  hp = CreatePen (PS_SOLID, 0, color);
+  oldhb = SelectObject (hdc, hb);

oldhb and hb are not declared, and this line is not needed, I think.

Other than that, the patch works but there's still a few problems. See
attached image, after M-: (set-face-attribute 'default nil :underline
'(:color "red" :style wave))

1) The wave is drawn past the characters. Note that each row in the
image seems to have extra space.
2) Moving the cursor leaves some screen artifacts (these are the
vertical lines at the end of some rows of text).

    Juanma

Attachment: bug.png
Description: PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]