emacs-devel
[Top][All Lists]
Advanced

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

Re: Stipples support in MS-Windows port


From: Eli Zaretskii
Subject: Re: Stipples support in MS-Windows port
Date: Fri, 03 May 2024 09:09:41 +0300

> From: Elijah G <eg642616@gmail.com>
> Date: Thu, 2 May 2024 20:53:17 -0600
> 
> Hi, i'm starting this thread to discuss the
> support for stipples in windows port.

Thank you for working on this.

> My ideas in how this can be done is using
> the w32term.c functions for drawing rects,
> i tested using w32_fill_rect but it doesn't
> work, i don't know how it works.
> 
> The elisp snippet that i'm using for test this is this:
> ```
> (let* ((w (window-font-width))
>        (stipple `(,w 1 ,(apply #'unibyte-string
>                    (append (make-list (1- (/ (+ w 7) 8)) ?\0)
>                        '(1))))))
>   (insert "\n" (propertize "      " 'face `(:background "red"
> :foreground "blue" :stipple ,stipple))))
> ```
> The closest thing i got was using w32_draw_rectangle
> inside w32_draw_glyph_string_background
> but for some reason it freezes and crashes after evaling
> the snippet, I'm not sure if it is related to the way I did it or is
> anything related to GC.
> 
> Below this mail can you get the patch for test it
> (Also i'm sorry if the patch is too long i accidentally
> formatted it with clang-format)

Please undo the reformatting, it resulted in an ocean of unrelated
changes that completely drown your real changes, and make it very
hard, almost impossible, to review the patch.  Especially since you
are asking why the code crashes, the answer to which is likely to be
in some subtle aspect of the code.

> Also can i ask what is the purpose of this line?
> ```
> # include "bitmaps/gray.xbm"
> ```

It comes from xterm.c, and defines gray_bits, gray_width, and
gray_height, which xterm.c uses for implementing the stipple.  See in
xterm.c for the details.



reply via email to

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