From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: JD Smith Newsgroups: gmane.emacs.devel Subject: Re: Drawing UI elements behind text Date: Tue, 26 Nov 2024 21:31:22 -0500 Message-ID: <69747847-1C64-476A-8D41-6EE176A304D6@gmail.com> Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35429"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel To: Cecilio Pardo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 27 03:32:20 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tG7qm-00096f-Gy for ged-emacs-devel@m.gmane-mx.org; Wed, 27 Nov 2024 03:32:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tG7q8-0007Xk-SR; Tue, 26 Nov 2024 21:31:40 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tG7q5-0007XP-FZ for emacs-devel@gnu.org; Tue, 26 Nov 2024 21:31:37 -0500 Original-Received: from mail-qt1-x82d.google.com ([2607:f8b0:4864:20::82d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tG7q4-00017n-0j for emacs-devel@gnu.org; Tue, 26 Nov 2024 21:31:37 -0500 Original-Received: by mail-qt1-x82d.google.com with SMTP id d75a77b69052e-46375ac25fbso46692471cf.0 for ; Tue, 26 Nov 2024 18:31:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732674693; x=1733279493; darn=gnu.org; h=to:cc:message-id:subject:date:mime-version:from :content-transfer-encoding:from:to:cc:subject:date:message-id :reply-to; bh=pm1KJxXyDmAZFseye3LHKreRWr3DbFvUFjE3k0gZuLA=; b=TcsavY3TMcCWLB7Uw5NJvvO6PKjvEjv1i8MTQGkL8LVICFuunaxcSKYlh/LG3Cc+Rl 28Sgg2g3EqqWr+B3u7GkkI2TZqJwiIsWajZaPCNhptGH2aYNSQzkrH+jvO4xHMd0dJ5z pZ3k/9jQEC37UQu0Ye/Fb2n0lOeOe9j0Hh4DdUIxVepGYexflrfuuhvyaoZfdWDpCAYv 8gZpSuJxpx7Mv5Uz67L3j0poCXgz7siN9uFVkMaMoKr6VgZnMYra7vU+zQtG6hl/HITT lEu/GeFkPDwmltswvi1nDYpF5FlVq92nVGyn15ICom+wqHraUb8TMdS3cEObnVAjQYc4 oyvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732674693; x=1733279493; h=to:cc:message-id:subject:date:mime-version:from :content-transfer-encoding:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=pm1KJxXyDmAZFseye3LHKreRWr3DbFvUFjE3k0gZuLA=; b=r5lOXi+/f2qwwqYXnirB6OuYEXUvXr1xSXQNKqCi8BS22LuiEd0Cw+VV7a2nP34ecU JAlSn7qHd0cpO8yikYZ7kJbrgpY4Nn1eUDlOhaJanZLwwOSARw5rel4ZRW+1eC7Svw+U Fixz51me3j82yHo8YCx7U9d6aSR7NaEfGUMsRcGJL9fD0tBjIxwyjZW+eOBsXmYbXN0T LOdaaYwHt6JIhTmMYWExvpR6SJVFh+EKC5B2ZG0CnYmm06Y3ZlxtP3mpKs34VUthEocY K2+XNkG0IHVdfOI2SJ06HJcXMjl76leDrgcjskUKKO7azUnqBQAm0lrQ2ybkFYYZQFDo m77A== X-Gm-Message-State: AOJu0Yz2RzQPPLx7ECqhZwrfbV+hJCjdU1Uf9+2N9mGY7vftqsxBv5fC dq4vx5PgNcUZ80lrZNfowogSDZzBZjI+jcxFG5fNLQ/c3dpt+Y5fSrjrUQ== X-Gm-Gg: ASbGncvtDqGLQkx1aQJ4yjpK3qQWec6eccbM4LAmrUisCgSGqwr4WGwsqYwINL3X5J6 1x4dsUru3EgyYCOLDjN75Fe4mYSI4n8XQ6FZYZYmhNgk59rfyOD/HMdy0ZDnkJl46stiGM55TN4 jGqA4/AyaD3YlC2atvJ+wWiIgmvEm/fuHvha1+z8rFjsFB3nsFriOsGDYYTQk0U5Jitre+v4PVA P8E/sQK9oy3Fhfo81YELzQkYDhgwxuy4mrAQbbvfpQfdoM1Zsm7N4aas/vD5ZSOz8wNGrzUH66X Br+vDAwBznGRcXiBNEbH6pTEXnlUEgMSFkANVQ== X-Google-Smtp-Source: AGHT+IGzIda3UWRCWaC1RC4CwZzOmFLcaphn3I7zlMPYWLsIN5ERnSDM6vGEKhS2pMHFt5D209SZ2Q== X-Received: by 2002:ad4:4ea2:0:b0:6d3:a8a0:24a with SMTP id 6a1803df08f44-6d864d1e926mr17614616d6.16.1732674693408; Tue, 26 Nov 2024 18:31:33 -0800 (PST) Original-Received: from smtpclient.apple (d-204-195-179-171.mdde.cpe.atlanticbb.net. [204.195.179.171]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6d451b4ce3esm61662866d6.103.2024.11.26.18.31.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 Nov 2024 18:31:32 -0800 (PST) X-Mailer: iPhone Mail (22A3370) Received-SPF: pass client-ip=2607:f8b0:4864:20::82d; envelope-from=jdtsmith@gmail.com; helo=mail-qt1-x82d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:325733 Archived-At: -- > On Nov 26, 2024, at 6:19=E2=80=AFPM, Cecilio Pardo wr= ote: >=20 > =EF=BB=BFOn 25/11/2024 0:37, JD Smith wrote: >> I support this idea. For indent-bars, I use display :stipple as a "separ= ate band" of graphical information that can lie atop text in a buffer, but r= emain independent of it. Stipples are flexible and very performant, but hav= e a few issues: >> - There is inconsistent stipple support across emacs versions. >> - Stipple patterns begin at the frame origin, so up-to-date window-specif= ic remapping is required to prevent unwanted pattern aliasing. >> - Aligning stipples vertically requires fixed space content. >=20 > Stipples also disable the scrolling of buffer pixels, affecting performanc= e of redisplay. On all ports? I didn=E2=80=99t know this, though haven=E2=80=99t had any re= lated issues.=20 >> More commonly, modes also make use of :box styling, e.g. for producing bo= xed "labels", as in org-modern. >> An API for drawing simple styled lines, rounded corners, boxes etc. =E2=80= =94 either in absolute window coordinates, or associated with, but "behind" t= ext in the buffer =E2=80=94 would represent a real step forward. >=20 > I haven't found a way to draw behind the text that is not too complicated o= r affects redisplay too much. So now the idea is drawing over the text. For t= he applications I have in mind this works equally well. For mine as well that would work, but features like this are added so rarely= it makes sense to make it robust for various uses, if possible. =20 > The starting drawing elements are going to be vertical and horizontal segm= ents, with color (maybe with alpha), width and different patterns. Nice. Is there a patch to try? Bit patterns or similar are the most flexib= le. =20 > They can be placed on pixel positions or character positions when using fi= xed size fonts, using floating point numbers so you can put, for example, in= dent lines in the middle of characters. Would they be associated with buffer text and move with it (aka :box), or fi= xed to the buffer window? What API did you have in mind?=