From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Evgeny Zajcev Newsgroups: gmane.emacs.devel Subject: Re: Hollow cursor under images Date: Tue, 5 Mar 2019 13:19:51 +0300 Message-ID: References: <83bm2qea01.fsf@gnu.org> <20190304223605.GA22198@breton.holly.idiocy.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000054757505835637ff" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="265445"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Eli Zaretskii , emacs-devel To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 05 11:20:50 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 1h17Bp-0016sc-WB for ged-emacs-devel@m.gmane.org; Tue, 05 Mar 2019 11:20:50 +0100 Original-Received: from localhost ([127.0.0.1]:40786 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h17Bo-0002SR-PX for ged-emacs-devel@m.gmane.org; Tue, 05 Mar 2019 05:20:48 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:52510) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h17BA-0002SB-TH for emacs-devel@gnu.org; Tue, 05 Mar 2019 05:20:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h17B8-0004sx-Af for emacs-devel@gnu.org; Tue, 05 Mar 2019 05:20:08 -0500 Original-Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]:37952) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h17B6-0004oc-E0; Tue, 05 Mar 2019 05:20:04 -0500 Original-Received: by mail-lj1-x232.google.com with SMTP id 199so7105654ljj.5; Tue, 05 Mar 2019 02:20:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+Ctr8673BSK6g7srYdlTfEPH38o9PZfdqw5l1HQsGxI=; b=k1RrDudo1T9J0npWnqAUhI7txTfnGsZuYAC6xl7sP/i/ERMZFbiT+Ejep7qgBrDA1s op+EPIVJ0OiSyCvG6mHR4wuJsFscZNp7Khi323/fpE5znv7zy+O8aa572oTRrkAo6YaX X0g/Df3iy6iU4RHo2NsrKsvIQ6QbPlqUVyQjYT7G7m4GO7pEcanLZxnF6YiZjgLtWtWJ C5fCtwrTKVbKFXp/OImFQlZMGmBAnK0e4ZFbtESpR5KSe8gibXVUF6COYdVAUUVeKhHW 9uSg/PbKuNa9DSfVsq2Wp+LfLIY2q1jAmIuOIJZoVTczDy3weXfnoYp54sA1NHJV+vK8 Ymmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+Ctr8673BSK6g7srYdlTfEPH38o9PZfdqw5l1HQsGxI=; b=K5V32dERGlgLpf2mix/Vn2UhL3k8p+byfH8r9NLposmcEhE0HekFy99bGVAA6OP6yW jTl/uyKRXCPS7ryb3hvhJlmR+V2bwN3CbCfpLMInB3/I/HxMuk0tMgI5qFP5o1qvm/L4 alVfywwkNstXJ2/aFhCgZjLmE78AXL9O3UQTc7vJGg0YRBLtuRfZpBxSJDWsufwNWLTk rML6sBlaRTco8lgTYJv3xJoXDXBfg3MXRps0znKac0RWi7TlnNeIbTfdjdRZM89SnIeS wnXzYwsAZVn9KeajtdIF7FyP7LZlvZ2ryoTQxQaegZKw3pTDP/S5KiMXTB2daME6TzBD r95Q== X-Gm-Message-State: APjAAAXtVshZxz2sW6eXE+xo3wH1GDUUUrN5WEXmwkkMYRbdrxKzfZZA IKwhBzMbrMy9gOOSjQRD0UKl/KbzeVAiRnBy0RKfvx8t X-Google-Smtp-Source: APXvYqw0LGTdbu8+ikyW3sURnk33MsX4WFYLBywurfREPgg4temKd/rTEDnbVKwQDiFXCxS+nTcB/TrHC3P078gv0gk= X-Received: by 2002:a2e:9916:: with SMTP id v22mr13089610lji.68.1551781202259; Tue, 05 Mar 2019 02:20:02 -0800 (PST) In-Reply-To: <20190304223605.GA22198@breton.holly.idiocy.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::232 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:233845 Archived-At: --00000000000054757505835637ff Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =D0=B2=D1=82, 5 =D0=BC=D0=B0=D1=80. 2019 =D0=B3. =D0=B2 01:36, Alan Third <= alan@idiocy.org>: > 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, suc= h > 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 n= ot > > fit into single char > > I can confirm this happens on X. I can see it in a build from 2017, so > it=E2=80=99s not been caused by my image resizing code, which was my init= ial > 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=E2=80=99t= . > > In my case 32 for width is the trigger and `(frame-char-height) =3D=3D 53' = for height triggers the hollow cursor behaviour. Looks like a bug --=20 lg --00000000000054757505835637ff Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=D0=B2=D1=82, 5 =D0= =BC=D0=B0=D1=80. 2019 =D0=B3. =D0=B2 01:36, Alan Third <alan@idiocy.org>:
On Mon, Mar 04, 2019 at 11:04:10PM +0300, Evgen= y Zajcev wrote:
>
> I have text property `face' attached to the region which image occ= upies,
> consider:
>
> (let ((svg (svg-create (frame-char-width) (* 2 (frame-char-height)))))=
>=C2=A0 =C2=A0(svg-circle svg 10 10 10 :fill-color "red")
>=C2=A0 =C2=A0(insert (propertize "X" 'face 'region >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0'display (list '(slice 0.0 0.0 1.0 0.5)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (svg-image s= vg :scale 1.0
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:ascent 'center
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0:mask 'heuristic)))))
>
> Background of the image gets color from `region' face, but when th= e 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, su= ch as:
>
> (let ((svg (svg-create (frame-char-width) (frame-char-height))))
>=C2=A0 =C2=A0(svg-circle svg 10 10 10 :fill-color "red")
>=C2=A0 =C2=A0(insert (propertize "X" 'face 'region >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0'display (svg-image svg :scale 1.0
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0:ascent 'center
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0:mask 'heuristic))))
>
> Then cursor behaves as expected initially!=C2=A0 It does not get hollo= w type and
> background gets cursor color.=C2=A0 I expected the same for images tha= t do not
> fit into single char

I can confirm this happens on X. I can see it in a build from 2017, so
it=E2=80=99s not been caused by my image resizing code, which was my initia= l
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=E2=80=99t.<= br>

In my case 32 for width is the trigger= and `(frame-char-height) =3D=3D 53' for height triggers=C2=A0the hollo= w cursor behaviour.

Looks like a bug
--
lg
--00000000000054757505835637ff--