all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Clément Pit--Claudel" <clement.pit@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Help writing a patch to allow transparent backgrounds?
Date: Sat, 13 Feb 2016 15:51:46 +0200	[thread overview]
Message-ID: <83oabk67m5.fsf@gnu.org> (raw)
In-Reply-To: <56BB913C.4050305@gmail.com> (message from Clément Pit--Claudel on Wed, 10 Feb 2016 14:36:28 -0500)

> Cc: emacs-devel@gnu.org
> From: Clément Pit--Claudel <clement.pit@gmail.com>
> Date: Wed, 10 Feb 2016 14:36:28 -0500
> 
> Thanks! I'll be happy to try to implement this feature, with some help to navigate my way around the C source.

Look at xterm.c:x_draw_glyph_string_background.  This is the function
that draws the background of text before that text is drawn in the
foreground color.  The other function to look at is
x_draw_glyph_string_bg_rect in the same file -- this one is used to
draw the background of display elements that are not text: images and
stretches of white space.

A word about "glyph strings": these are structures built by the Emacs
display engine in preparation for actually redrawing portions of the
display which need that.  Each glyph string is the longest possible
collection of glyphs that are to be drawn in the same face, so the
terminal-specific back-end (such as xterm.c) could set up the
necessary settings once, and then draw all of the glyphs of the glyph
string in one go.  For displaying text, the glyph string includes a
run of characters in the same face (font, colors, etc.) specified by
their glyph indices in the font.

HTH



      reply	other threads:[~2016-02-13 13:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-09 15:22 Help writing a patch to allow transparent backgrounds? Clément Pit--Claudel
2016-02-10 18:35 ` Eli Zaretskii
2016-02-10 18:46   ` Clément Pit--Claudel
2016-02-10 19:23     ` Eli Zaretskii
2016-02-10 19:36       ` Clément Pit--Claudel
2016-02-13 13:51         ` Eli Zaretskii [this message]

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=83oabk67m5.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=clement.pit@gmail.com \
    --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.