unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Reitter <david.reitter@gmail.com>
To: emacs- devel <emacs-devel@gnu.org>
Subject: Re: png images in tool-bar / alpha mask
Date: Sun, 6 Apr 2008 14:42:08 +0100	[thread overview]
Message-ID: <71EB5929-B9CC-489C-AEFD-4E11924C49FB@gmail.com> (raw)
In-Reply-To: <wlfxtz3db2.wl%mituharu@math.s.chiba-u.ac.jp>

[-- Attachment #1: Type: text/plain, Size: 1207 bytes --]

On 6 Apr 2008, at 03:52, YAMAMOTO Mitsuharu wrote:

> This is not the only place where NULL-check of img->mask is used for
> determining the existence of the image mask.  At least, xdisp.c and
> macterm.c also assume that.

Yes, but doesn't that happen in order to check whether there is a  
bitmap mask that will be used for something?

x_draw_image_foreground actually uses that mask to draw the image, and  
my understanding is that we want to use the original (platform  
specific) image data for that, including its alpha channel.  As we  
can't do that (yet) on X or W32, we don't set the platform specific  
image data in the first place there.
In macterm.c, we want to call mac_copy_area rather than  
mac_copy_area_with_mask, right?

In x_draw_image_foreground (macterm.c), it is always safe to draw a  
rectangle around given that we don't know what the alpha channel  
specifies, but one could go through Fimage_mask_pp to get the same  
semantics.

As for image.c: I don't understand all of the code.  In general, it  
appears safe to assume we don't have a mask on the C level.

The alternative would be to acquire a bitmap mask from the PNG when  
loading it. Maybe that would be cleaner. 
   

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 2193 bytes --]

  reply	other threads:[~2008-04-06 13:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-01 17:14 png images in tool-bar / alpha mask David Reitter
2008-04-01 21:41 ` YAMAMOTO Mitsuharu
2008-04-01 23:10   ` David Reitter
2008-04-02 12:39     ` YAMAMOTO Mitsuharu
2008-04-03 15:09       ` David Reitter
2008-04-03 21:15         ` YAMAMOTO Mitsuharu
2008-04-03 21:42           ` David Reitter
2008-04-03 21:55             ` YAMAMOTO Mitsuharu
2008-04-03 22:42               ` David Reitter
2008-04-03 23:12                 ` YAMAMOTO Mitsuharu
2008-04-04 11:24                   ` David Reitter
2008-04-04 12:20                     ` YAMAMOTO Mitsuharu
2008-04-05 10:58                       ` David Reitter
2008-04-06  2:52                         ` YAMAMOTO Mitsuharu
2008-04-06 13:42                           ` David Reitter [this message]
2008-04-06 14:09                             ` YAMAMOTO Mitsuharu

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=71EB5929-B9CC-489C-AEFD-4E11924C49FB@gmail.com \
    --to=david.reitter@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).