From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.devel Subject: Re: Hollow cursor under images Date: Mon, 4 Mar 2019 22:36:05 +0000 Message-ID: <20190304223605.GA22198@breton.holly.idiocy.org> References: <83bm2qea01.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="151377"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.11.3 (2019-02-01) Cc: Eli Zaretskii , emacs-devel To: Evgeny Zajcev Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 04 23:36:20 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h0wC3-000d98-Ha for ged-emacs-devel@m.gmane.org; Mon, 04 Mar 2019 23:36:19 +0100 Original-Received: from localhost ([127.0.0.1]:34183 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h0wC2-0002iM-E5 for ged-emacs-devel@m.gmane.org; Mon, 04 Mar 2019 17:36:18 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50117) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h0wBw-0002iF-DP for emacs-devel@gnu.org; Mon, 04 Mar 2019 17:36:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h0wBv-00040o-NM for emacs-devel@gnu.org; Mon, 04 Mar 2019 17:36:12 -0500 Original-Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:44273) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h0wBu-0003yD-D9; Mon, 04 Mar 2019 17:36:10 -0500 Original-Received: by mail-wr1-x433.google.com with SMTP id w2so7308177wrt.11; Mon, 04 Mar 2019 14:36:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=DCQFFDzQAc0lOwqpH1nlUANQfD7bC38z+L1bSYiFW8M=; b=ibO4vYWRwl46i7K1ZbyvhHdCsympoYvdEcjhNpPbAfYVRvR3dgDUvWPbkXIob29ujG nDL6kAq0AYiQI3bpa2A5Jztmd9rVqC1bdjZ2HKyAVECy599h8RLfgrHbS4rojQMpLEFV 3yY5HhGaBNIXpRmlTp63y+ipozVxykNrK1K6wkw8W9k9ai06ZltVQ6FAfJ50AseUnzoj Dk40n+PPeGstuI81yp4cKG/siTxkh2K7D1qG+fj2blthCIa3NGiLLIG7aiX0H4mWa/F2 Iez5Nr4xlg2+TN4Yq/rH2/nXPEOWIvL7abotI0N1qOZ5AnD1flfzCWMDP6++qRvOUuAy 4YQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=DCQFFDzQAc0lOwqpH1nlUANQfD7bC38z+L1bSYiFW8M=; b=Qp2otbTZIGmKBFuHYjBHgfQsQvKoHtw6Sh1y1c+zKpkzc73e92ewSYx/rH65v4IzVl ZC2If9Tw6pBkPiN4MCwo0Ktfv04RxjArBuqLn7MJ7sOhDXyo26AJ7vWLEwxfGYG/ifRK sBAHQjm1tYgiuWtUAPSyyO5omoBpoYTDLoe/JdbLJWMzWHYcuUahz0YmMbFghp3AEPBj /MMpzn+CI45cCuPRsJLavlkyXU0ueEIym7PybId4Rw9AWa1X/nIKvXSnSwBmLtCZkqIr 9xctLik6usUnOUxe2gBtiAXD3+eLYXLpgluEHmC8ET1DbewTBgjHwg/pSCWELiQmYtvN Eiuw== X-Gm-Message-State: APjAAAWvbL4EMkJZj2exkab2IzwUn5B5aphAHqfpMvlPi28cq+AnMyoT Yw4zF1Aa+BYOW7vAt2vuW+0= X-Google-Smtp-Source: APXvYqyNn1DAALaP8m43PMNzOW/CvqcvE0BcO/1Ftw9JlsnvzA5qMogcNGU+vh41suA9rd5xKXU+OQ== X-Received: by 2002:a5d:6592:: with SMTP id q18mr13585217wru.230.1551738968704; Mon, 04 Mar 2019 14:36:08 -0800 (PST) Original-Received: from breton.holly.idiocy.org (ip6-2001-08b0-03f8-8129-a434-efbf-3a29-731e.holly.idiocy.org. [2001:8b0:3f8:8129:a434:efbf:3a29:731e]) by smtp.gmail.com with ESMTPSA id g202sm7201319wme.26.2019.03.04.14.36.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Mar 2019 14:36:07 -0800 (PST) Content-Disposition: inline In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::433 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:233833 Archived-At: On Mon, Mar 04, 2019 at 11:04:10PM +0300, Evgeny Zajcev wrote: > > I have text property `face' attached to the region which image occupies, > consider: > > (let ((svg (svg-create (frame-char-width) (* 2 (frame-char-height))))) > (svg-circle svg 10 10 10 :fill-color "red") > (insert (propertize "X" 'face 'region > 'display (list '(slice 0.0 0.0 1.0 0.5) > (svg-image svg :scale 1.0 > :ascent 'center > :mask 'heuristic))))) > > Background of the image gets color from `region' face, but when the cursor > is under the image it gets hollow type and still background of `region' > face is visible. > > I just realized, that if I create image that fits into single char, such as: > > (let ((svg (svg-create (frame-char-width) (frame-char-height)))) > (svg-circle svg 10 10 10 :fill-color "red") > (insert (propertize "X" 'face 'region > 'display (svg-image svg :scale 1.0 > :ascent 'center > :mask 'heuristic)))) > > Then cursor behaves as expected initially! It does not get hollow type and > background gets cursor color. I expected the same for images that do not > fit into single char I can confirm this happens on X. I can see it in a build from 2017, so it’s not been caused by my image resizing code, which was my initial thought. The key image dimension appears to be 32 pixels. At 32 and below the cursor shows through the background colour. At 33 and above, the background remains white and the cursor appears as a box round the image. So a 32x32 image shows the cursor, a 33x32 or 32x33 image doesn’t. I can’t see what makes 32 special. -- Alan Third