all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Po Lu <luangruo@yahoo.com>
To: "Elijah G." <eg642616@gmail.com>
Cc: emacs-devel@gnu.org,  Eli Zaretskii <eliz@gnu.org>
Subject: Re: Stipples support in MS-Windows port
Date: Tue, 14 May 2024 13:28:01 +0800	[thread overview]
Message-ID: <87frulynby.fsf@yahoo.com> (raw)
In-Reply-To: <86le4dvxx9.fsf@gmail.com> (Elijah G.'s message of "Mon, 13 May 2024 22:07:30 -0600")

"Elijah G." <eg642616@gmail.com> writes:

> I'm a bit stuck here, i could make to use the stipple bitmap, however it
> doesn't uses background and foreground color from propertized string,
> (and looks very weird).
>
> The drawing works fine, but the problem is trying to get stipple bitmap,
> and makes it work well.
>
> One way that i thought for fix this is redefining bitmap stipple for
> using same string fg and bg colors and bitmap width and height, but for
> this i need the bitmap bits.
>
> I found that image_create_bitmap_from_data also makes stipple bitmap
> (https://git.savannah.gnu.org/cgit/emacs.git/tree/src/image.c#n601);
> i tried to found bitmap bits by using stipple bitmap id but some
> functions/macros are only for X11 (e.g x_bitmap_height and
> x_bitmap_width).
>
> I would be happy to read any advice or feedback.
>
> I've attached to this email a patch for the work that i've done and some
> screenshots for the final results.
>
> Thanks.

I don't follow your question, but on the assumption that you've run into
difficulties with replacing the background and foreground of the pattern
with those of your choosing, perhaps you must set the "text" and
"background" colors of the DC as suggested by the documentation:

  A brush created by using a monochrome (1 bit per pixel) bitmap has the
  text and background colors of the device context to which it is drawn.
  Pixels represented by a 0 bit are drawn with the current text color;
  pixels represented by a 1 bit are drawn with the current background
  color.

?  Manipulating the stipple bitmap directly should not be necessary, not
with these facilities.



  reply	other threads:[~2024-05-14  5:28 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-03  2:53 Stipples support in MS-Windows port Elijah G
2024-05-03  6:09 ` Eli Zaretskii
2024-05-03  7:30 ` Po Lu
2024-05-05  3:43   ` Elijah G
2024-05-05  4:04     ` Po Lu
2024-05-05  4:30       ` Po Lu
2024-05-06  5:17         ` Elijah G
2024-05-11  5:10         ` Elijah G
2024-05-11  5:27           ` Po Lu
2024-05-11  8:24             ` Eli Zaretskii
2024-05-12 23:06               ` Elijah G.
2024-05-14  4:07                 ` Elijah G.
2024-05-14  5:28                   ` Po Lu [this message]
2024-05-15  1:43                     ` Elijah G.
2024-05-19 22:37                     ` Elijah G.
2024-05-20 11:15                       ` Eli Zaretskii
2024-05-20 11:19                         ` Po Lu
2024-05-20 12:32                           ` Eli Zaretskii
2024-05-20 13:12                             ` Po Lu
2024-05-20 19:44                         ` Elijah G.
2024-05-21  2:00                           ` Elijah G.
2024-05-21 11:49                             ` Eli Zaretskii
2024-05-22  2:06                               ` Elijah G.
2024-05-24  1:55                                 ` Elijah G.
2024-05-24  6:24                                   ` Po Lu
2024-05-25  7:24                                 ` Eli Zaretskii
2024-05-25 11:30                                   ` Arash Esbati
2024-05-26  2:37                                     ` Po Lu
2024-05-27 15:32                                       ` Arash Esbati
2024-05-26  0:27                                   ` Elijah G.
2024-05-26  8:09                                     ` Yuri Khan
2024-05-27  2:05                                       ` Elijah G.
2024-05-27  6:20                                         ` Yuri Khan
2024-05-28  2:06                                           ` Elijah G.
2024-05-26  8:51                                     ` Eli Zaretskii
2024-05-28  0:23                                       ` Elijah G.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87frulynby.fsf@yahoo.com \
    --to=luangruo@yahoo.com \
    --cc=eg642616@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.