From debbugs-submit-bounces@debbugs.gnu.org Thu May 23 21:27:55 2024 Received: (at submit) by debbugs.gnu.org; 24 May 2024 01:27:55 +0000 Received: from localhost ([127.0.0.1]:33983 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAJit-0001dh-5l for submit@debbugs.gnu.org; Thu, 23 May 2024 21:27:55 -0400 Received: from lists.gnu.org ([209.51.188.17]:34234) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sAJip-0001db-8v for submit@debbugs.gnu.org; Thu, 23 May 2024 21:27:53 -0400 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 1sAJih-0006i3-Q2 for bug-gnu-emacs@gnu.org; Thu, 23 May 2024 21:27:44 -0400 Received: from mail-ot1-x343.google.com ([2607:f8b0:4864:20::343]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sAJid-0001GY-Ew for bug-gnu-emacs@gnu.org; Thu, 23 May 2024 21:27:43 -0400 Received: by mail-ot1-x343.google.com with SMTP id 46e09a7af769-6f1016f41e2so3294264a34.1 for ; Thu, 23 May 2024 18:27:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716514046; x=1717118846; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=9Q4dql+ixBALZW9/G2PCWQIA37zIA2/SfKjzi8/uKDA=; b=Hmcxhh/hkmXwNeVCMCAL4uXFJApyIov5Mo7G8cn2pwzr8a/2asOc6J0EP0J+917mlp JNNyxjCcgCuSP1QkRQNBjGxVSBWEuFQyV7EnnqsaCqlZzsbbmZYMmpLobwvIP1EszCh6 Xw2cS3xZSLB7i5EgmEu5SDxmnZpX858zqIxMOR4P5R+/QZw00LnFEwn3XR5bfJ8/KQjI 7qAJnGhZvb99M65a0PgF8JJ9lZCesXXY4Am2ApnpaTyUqf3FL62qKt2pBxERvbf/gcyV JKnkzMit9mY4iUmh10SDjR97AMnrfAECSEycAoN0fOhR8dBhxiWhagXqFHgwRMyUFh6/ Z7/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716514046; x=1717118846; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=9Q4dql+ixBALZW9/G2PCWQIA37zIA2/SfKjzi8/uKDA=; b=lPrfTDJ4xEv9a6QcYbjUNZOGQcHm98MDhF3vI9GnIGaY9UcrNi5qEunaBgqnJ7p+IU VOShtCCvYcB3LZZbkdhkE83oKHxersQK3LuyIS9RS7u+dGNOKD/cHWRKDfp27JHgcG3R nyPeWZG6hKImLfzZ8pg0IwV7+buZ2wIKRMUVP+DR1YDmae/6EII1enbEC29teDvxIXj7 PW8mMRoTiA5dGenresbfVo3xHVas1NqTBcDhVLSpoqchM70zwQUxPrET8ziBBaqzDiZW ueOCFZr5qEGm6CLUX1X3YE9bU5uo2xrTgLrWpcU2Y2OvM7v2DrvXC9d7npz7idUwFYPr 2qvA== X-Gm-Message-State: AOJu0YynxPegSBQh/VtrzF+8tTEPI7U4tagTa0KOYGRlRZYd4ATDy1/P S9GiSlvrYMncHNbrCOGZqqYvGYqOaaLOlNk2X/D4Y+u+H7IaULGAPuFrER0X X-Google-Smtp-Source: AGHT+IHT/MSYOW4crX7XDeCOjFbiSrymYO1aZRtfK6c7xs0OYbdhGpOEgBWEazBuerWvVhBiVyOcjA== X-Received: by 2002:a05:6830:43a3:b0:6f0:44d9:6a80 with SMTP id 46e09a7af769-6f8d0b48b1fmr1154990a34.32.1716514046224; Thu, 23 May 2024 18:27:26 -0700 (PDT) Received: from LIBERO ([187.184.24.187]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-5b96c461ef3sm118479eaf.3.2024.05.23.18.27.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 18:27:25 -0700 (PDT) From: "Elijah G." To: bug-gnu-emacs@gnu.org Subject: [PATCH] Stipple support for MS Windows Date: Thu, 23 May 2024 19:27:19 -0600 Message-ID: <86cypcuhhk.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::343; envelope-from=eg642616@gmail.com; helo=mail-ot1-x343.google.com X-Spam_score_int: 1 X-Spam_score: 0.1 X-Spam_bar: / X-Spam_report: (0.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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, PDS_OTHER_BAD_TLD=1.999, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) --=-=-= Content-Type: text/plain This patch add stipple bitmap support to MS Windows. I tested this patch with gnus.xbm file and other stipple pattern from its bitmap data. If anyone have a feedback i would gladly read it. Thanks. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Stipple-support-for-MS-Windows.patch Content-Description: [PATCH] Stipple support for MS Windows >From da8f1bb3591851c044c8fd7029bbfb9a05f947f1 Mon Sep 17 00:00:00 2001 From: "Elias G. Perez" Date: Fri, 10 May 2024 20:36:42 -0600 Subject: [PATCH] Stipple support for MS Windows * src/w32term.h (w32_bitmap_record): Add stipple value. * src/w32term.c: (w32_fill_stipple_pattern): New function. (w32_draw_glyph_string_background, w32_draw_glyph_string_bg_rect) (w32_draw_stretch_glyph_string): Use new stipple function. * src/image.c: (image_create_bitmap_from_data): Create stipple bitmap. (image_create_bitmap_from_file): Add suuport for pixmap and create stipple bitmap. --- src/image.c | 56 ++++++++++++++++++++++++++++++++++++++++++++----- src/w32term.c | 58 +++++++++++++++++++++++++++++++++------------------ src/w32term.h | 1 + 3 files changed, 90 insertions(+), 25 deletions(-) diff --git a/src/image.c b/src/image.c index e93fc3183af..e2c6b29b332 100644 --- a/src/image.c +++ b/src/image.c @@ -214,6 +214,13 @@ #define n_planes n_image_planes static unsigned long *colors_in_color_table (int *n); #endif +#ifdef HAVE_NTGUI +static HBITMAP w32_create_pixmap_from_bitmap_data (int width, + int height, + char *data); + +#endif + #if defined (HAVE_WEBP) || defined (HAVE_GIF) static void anim_prune_animation_cache (Lisp_Object); #endif @@ -602,7 +609,12 @@ image_create_bitmap_from_data (struct frame *f, char *bits, FRAME_DISPLAY_INFO (XFRAME (frame))->n_planes, FRAME_DISPLAY_INFO (XFRAME (frame))->n_cbits, bits); - if (! bitmap) + Emacs_Pixmap stipple; + + /* Convert X bitmap to W32 bitmap */ + stipple = w32_create_pixmap_from_bitmap_data (width, height, bits); + + if (!bitmap || !stipple) return -1; #endif /* HAVE_NTGUI */ @@ -681,6 +693,7 @@ image_create_bitmap_from_data (struct frame *f, char *bits, #ifdef HAVE_NTGUI dpyinfo->bitmaps[id - 1].pixmap = bitmap; + dpyinfo->bitmaps[id - 1].stipple = stipple; dpyinfo->bitmaps[id - 1].hinst = NULL; dpyinfo->bitmaps[id - 1].depth = 1; #endif /* HAVE_NTGUI */ @@ -699,7 +712,7 @@ image_create_bitmap_from_data (struct frame *f, char *bits, #endif /* defined HAVE_ANDROID && !defined ANDROID_STUBIFY */ #if defined HAVE_HAIKU || defined HAVE_NS || defined HAVE_PGTK \ - || defined HAVE_ANDROID + || defined HAVE_ANDROID || defined HAVE_NTGUI static char *slurp_file (image_fd, ptrdiff_t *); static Lisp_Object image_find_image_fd (Lisp_Object, image_fd *); static bool xbm_read_bitmap_data (struct frame *, char *, char *, @@ -711,10 +724,43 @@ image_create_bitmap_from_data (struct frame *f, char *bits, ptrdiff_t image_create_bitmap_from_file (struct frame *f, Lisp_Object file) { -#if defined (HAVE_NTGUI) - return -1; /* W32_TODO : bitmap support */ -#else Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f); + +#ifdef HAVE_NTGUI + ptrdiff_t id, size; + int width, height, rc; + image_fd fd; + char *contents, *data; + Emacs_Pixmap bitmap; + + if (!STRINGP (image_find_image_fd (file, &fd))) + return -1; + + contents = slurp_file (fd, &size); + + if (!contents) + return -1; + + rc = xbm_read_bitmap_data (f, contents, contents + size, + &width, &height, &data, 0); + + if (!rc) + { + xfree (contents); + return -1; + } + + id = image_allocate_bitmap_record (f); + bitmap = w32_create_pixmap_from_bitmap_data (width, height, data); + + dpyinfo->bitmaps[id - 1].height = width; + dpyinfo->bitmaps[id - 1].width = height; + dpyinfo->bitmaps[id - 1].stipple = bitmap; + dpyinfo->bitmaps[id - 1].file = xlispstrdup (file); + + xfree (contents); + xfree (data); + return id; #endif #ifdef HAVE_NS diff --git a/src/w32term.c b/src/w32term.c index a9aff304771..b68f0b4e3d6 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -1248,6 +1248,37 @@ w32_clear_glyph_string_rect (struct glyph_string *s, real_w, real_h); } +/* Fill background with bitmap pattern from S at specified position + given by X and Y. WIDTH and HEIGHT specifies bitmap size, GC is + used to get foreground and background color context and HDC where + fill it. */ + +static void +w32_fill_stipple_pattern (HDC hdc, struct glyph_string *s, Emacs_GC *gc, + int x, int y, unsigned int width, unsigned int height) +{ + /* BUG: stipple bitmap has the inverted colors, inverting + those 2 functions color must fix this. */ + + SetTextColor (hdc, gc->background); + SetBkColor (hdc, gc->foreground); + + Emacs_Pixmap bm; + HBRUSH hb; + RECT r; + + bm = FRAME_DISPLAY_INFO (s->f)->bitmaps[s->face->stipple - 1].stipple; + hb = CreatePatternBrush (bm); + + r.left = x; + r.top = y; + r.right = x + width; + r.bottom = y + height; + + FillRect (hdc, &r, hb); + + DeleteObject (hb); +} /* Draw the background of glyph_string S. If S->background_filled_p is non-zero don't draw it. FORCE_P non-zero means draw the @@ -1264,21 +1295,16 @@ w32_draw_glyph_string_background (struct glyph_string *s, bool force_p) { int box_line_width = max (s->face->box_horizontal_line_width, 0); -#if 0 /* TODO: stipple */ if (s->stippled_p) { /* Fill background with a stipple pattern. */ - XSetFillStyle (s->display, s->gc, FillOpaqueStippled); - XFillRectangle (s->display, FRAME_W32_WINDOW (s->f), s->gc, s->x, - s->y + box_line_width, - s->background_width, - s->height - 2 * box_line_width); - XSetFillStyle (s->display, s->gc, FillSolid); + w32_fill_stipple_pattern (s->hdc, s, s->gc, s->x, + s->y + box_line_width, + s->background_width, + s->height - 2 * box_line_width); s->background_filled_p = true; } - else -#endif - if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width + else if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width /* When xdisp.c ignores FONT_HEIGHT, we cannot trust font dimensions, since the actual glyphs might be much smaller. So in that case we always clear the @@ -2286,16 +2312,12 @@ w32_draw_image_foreground_1 (struct glyph_string *s, HBITMAP pixmap) static void w32_draw_glyph_string_bg_rect (struct glyph_string *s, int x, int y, int w, int h) { -#if 0 /* TODO: stipple */ if (s->stippled_p) { /* Fill background with a stipple pattern. */ - XSetFillStyle (s->display, s->gc, FillOpaqueStippled); - XFillRectangle (s->display, FRAME_W32_WINDOW (s->f), s->gc, x, y, w, h); - XSetFillStyle (s->display, s->gc, FillSolid); + w32_fill_stipple_pattern (s->hdc, s, s->gc, x, y, w, h); } else -#endif w32_clear_glyph_string_rect (s, x, y, w, h); } @@ -2500,16 +2522,12 @@ w32_draw_stretch_glyph_string (struct glyph_string *s) get_glyph_string_clip_rect (s, &r); w32_set_clip_rectangle (hdc, &r); -#if 0 /* TODO: stipple */ if (s->face->stipple) { /* Fill background with a stipple pattern. */ - XSetFillStyle (s->display, gc, FillOpaqueStippled); - XFillRectangle (s->display, FRAME_W32_WINDOW (s->f), gc, x, y, w, h); - XSetFillStyle (s->display, gc, FillSolid); + w32_fill_stipple_pattern (s->hdc, s, gc, x, y, w, h); } else -#endif { w32_fill_area (s->f, s->hdc, gc->background, x, y, w, h); } diff --git a/src/w32term.h b/src/w32term.h index 3120c8bd71f..1eb6a660248 100644 --- a/src/w32term.h +++ b/src/w32term.h @@ -58,6 +58,7 @@ #define CP_DEFAULT 1004 { Emacs_Pixmap pixmap; char *file; + Emacs_Pixmap stipple; HINSTANCE hinst; /* Used to load the file */ int refcount; /* Record some info about this pixmap. */ -- 2.44.0.windows.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed May 29 19:28:32 2024 Received: (at 71159) by debbugs.gnu.org; 29 May 2024 23:28:32 +0000 Received: from localhost ([127.0.0.1]:32846 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sCSid-0003ty-8p for submit@debbugs.gnu.org; Wed, 29 May 2024 19:28:32 -0400 Received: from mail-oo1-f68.google.com ([209.85.161.68]:58626) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sCSia-0003tf-VQ for 71159@debbugs.gnu.org; Wed, 29 May 2024 19:28:29 -0400 Received: by mail-oo1-f68.google.com with SMTP id 006d021491bc7-5b2cc8c4b8aso137822eaf.1 for <71159@debbugs.gnu.org>; Wed, 29 May 2024 16:28:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717025233; x=1717630033; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:to:from:from:to:cc:subject:date:message-id:reply-to; bh=2UZljRb4sAfc1Zyedb8kNtFbjA+SGIfLUkCEo6kG6yE=; b=dDoJ92stnhKXCjJ+putvHBUINnF2TwYUDiw9QQWswqu8jhoGJqmz+HdhJu53gd0g47 UNq/e76sDcmPWibCQ8FW5qyt+bHd8cC7n2bktNcZvQCMJHol8L7bZLTygcTzTUMW5Uxs SCdWMcR7I6IHW6e+i/VIyxwmMm3tx7DwbPBholX30EmbQsLD/+p0rq5BzBj2ruTBks96 WiuneRSKedSIyp3BcwublxRpzBm5CalCIakPs3AQSAt6GE5kD8cO//1olPziC9FfqcGg 6fU2fMEb5HG8v6/gxGMK6tz3t/xwtcSWXKyrMjMhRf1gRFuF4Jm4El4NnAchRsZ43SYB +CYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717025233; x=1717630033; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2UZljRb4sAfc1Zyedb8kNtFbjA+SGIfLUkCEo6kG6yE=; b=YnH/Kvcyjs4tNDP62BEZHRoHEuuLAWRbtjXPz/7I4Zcsbvo9Dc84iyz6EJcVT1qc8U xs1ni/euX7xU7MMqCRMH9vZOGO9l3hK2oBFCsr9emu5W/tM0fa7LmZooGXI8+I/LTAfb hH4Y7Ob2mmD7+ZI5Ooire6dTjReG9Fr2rFba7tFdddxv/jCz3WIGHElZClHEFj6za5r6 MYHpBfcIH7AIBqz8Oige6OVsnSqaKdjyYeoKwwGKUOVfXtZmKOLOvErS6DF11afjX/nX I/Wun5gq5okGaZZQVdN0bViuCahITR/ApFyVacaqV07FWVPeBW0TJbL9haTELUdx/iEw r6+Q== X-Gm-Message-State: AOJu0Yysj0oGfFGL6X/groLgW19dZil4T4+9XLFgB10EjPIFgDmw4qf0 ETgtctM77xx3HlP1CPpV/JWYPkYzOmPp64csUVvu+RjZlFhthvY0 X-Google-Smtp-Source: AGHT+IFb+FpGe76mRRTuigfDdoEcq7m1E/T9KKe7T+fsGgwFBtcOup7HczFxnYa6yWxUa0xpZb0qHA== X-Received: by 2002:a05:6820:827:b0:5b7:3502:6543 with SMTP id 006d021491bc7-5b9ec7d0e2cmr656932eaf.7.1717025232824; Wed, 29 May 2024 16:27:12 -0700 (PDT) Received: from LIBERO ([187.184.27.251]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-5b96c461e88sm2992638eaf.8.2024.05.29.16.27.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 16:27:12 -0700 (PDT) From: "Elijah G." To: 71159@debbugs.gnu.org, Eli Zaretskii Subject: Re: bug#71159: [PATCH] Stipple support for MS Windows In-Reply-To: <86cypcuhhk.fsf@gmail.com> (Elijah G.'s message of "Thu, 23 May 2024 19:27:19 -0600") References: <86cypcuhhk.fsf@gmail.com> Date: Wed, 29 May 2024 17:25:19 -0600 Message-ID: <86jzjcgq00.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (windows-nt) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 2.3 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: I'm sending here the fixed patch, now there is no problem with fg and bg color. From e222f44f2677550b107bb1c84fbe63069b81208c Mon Sep 17 00:00:00 2001 From: "Elias G. Perez" Date: Fri, 10 May 2024 20:36:42 -0600 Subject: [PATCH] Stipple support for MS Windows Content analysis details: (2.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: r.top (top)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (eg642616[at]gmail.com) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (eg642616[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.161.68 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.161.68 listed in wl.mailspike.net] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: 71159 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: I'm sending here the fixed patch, now there is no problem with fg and bg color. From e222f44f2677550b107bb1c84fbe63069b81208c Mon Sep 17 00:00:00 2001 From: "Elias G. Perez" Date: Fri, 10 May 2024 20:36:42 -0600 Subject: [PATCH] Stipple support for MS Windows Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.161.68 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.161.68 listed in list.dnswl.org] 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: r.top (top)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (eg642616[at]gmail.com) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (eg642616[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager --=-=-= Content-Type: text/plain I'm sending here the fixed patch, now there is no problem with fg and bg color. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Stipple-support-for-MS-Windows.patch >From e222f44f2677550b107bb1c84fbe63069b81208c Mon Sep 17 00:00:00 2001 From: "Elias G. Perez" Date: Fri, 10 May 2024 20:36:42 -0600 Subject: [PATCH] Stipple support for MS Windows * etc/NEWS: Announce support for stipples in MS-Windows. * src/w32term.h (w32_bitmap_record): Add stipple value. * src/w32term.c: (w32_fill_stipple_pattern): New function. (w32_draw_glyph_string_background, w32_draw_glyph_string_bg_rect) (w32_draw_stretch_glyph_string): Use new stipple function. * src/image.c: (image_create_bitmap_from_data): Create stipple bitmap. (image_create_bitmap_from_file): Add suuport for pixmap and create stipple bitmap. --- etc/NEWS | 3 ++ src/image.c | 98 ++++++++++++++++++++++++++++++++++++++++++--------- src/w32term.c | 55 ++++++++++++++++++----------- src/w32term.h | 1 + 4 files changed, 121 insertions(+), 36 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index a79a5844a22..ff1932d42ca 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2779,6 +2779,9 @@ title bars' and scroll bars' appearance. If the new user option will disregard the system's Dark mode and will always use the default Light mode. +--- +*** Emacs on MS-Windows now supports the :stipple face attribute + ---------------------------------------------------------------------- This file is part of GNU Emacs. diff --git a/src/image.c b/src/image.c index 3138ef25a63..427b530cb3a 100644 --- a/src/image.c +++ b/src/image.c @@ -130,6 +130,12 @@ #define NO_PIXMAP 0 #define PIX_MASK_RETAIN 0 #define PIX_MASK_DRAW 1 +#define XBM_BIT_SHUFFLE(b) (~(b)) + +#else + +#define XBM_BIT_SHUFFLE(b) (b) + #endif /* HAVE_NTGUI */ #ifdef HAVE_NS @@ -214,6 +220,13 @@ #define n_planes n_image_planes static unsigned long *colors_in_color_table (int *n); #endif +#ifdef HAVE_NTGUI +static HBITMAP w32_create_pixmap_from_bitmap_data (int width, + int height, + char *data); + +#endif + #if defined (HAVE_WEBP) || defined (HAVE_GIF) static void anim_prune_animation_cache (Lisp_Object); #endif @@ -596,13 +609,29 @@ image_create_bitmap_from_data (struct frame *f, char *bits, #endif /* HAVE_ANDROID && !defined ANDROID_STUBIFY */ #ifdef HAVE_NTGUI - Lisp_Object frame UNINIT; /* The value is not used. */ - Emacs_Pixmap bitmap; + Emacs_Pixmap stipple, bitmap; bitmap = CreateBitmap (width, height, - FRAME_DISPLAY_INFO (XFRAME (frame))->n_planes, - FRAME_DISPLAY_INFO (XFRAME (frame))->n_cbits, + dpyinfo->n_planes, + dpyinfo->n_cbits, bits); - if (! bitmap) + + /* Convert X bitmap to W32 bitmap. */ + /* Windows mono bitmaps are reversed compared with X. */ + { + USE_SAFE_ALLOCA; + char *invertedBits; + int nbytes, i; + + invertedBits = bits; + nbytes = (width + CHAR_BIT - 1) / CHAR_BIT * height; + + SAFE_NALLOCA (bits, 1, nbytes); + + for (i = 0; i < nbytes; i++) + bits[i] = XBM_BIT_SHUFFLE(invertedBits[i]); + } + stipple = w32_create_pixmap_from_bitmap_data (width, height, bits); + if (!bitmap || !stipple) return -1; #endif /* HAVE_NTGUI */ @@ -681,6 +710,7 @@ image_create_bitmap_from_data (struct frame *f, char *bits, #ifdef HAVE_NTGUI dpyinfo->bitmaps[id - 1].pixmap = bitmap; + dpyinfo->bitmaps[id - 1].stipple = stipple; dpyinfo->bitmaps[id - 1].hinst = NULL; dpyinfo->bitmaps[id - 1].depth = 1; #endif /* HAVE_NTGUI */ @@ -699,7 +729,7 @@ image_create_bitmap_from_data (struct frame *f, char *bits, #endif /* defined HAVE_ANDROID && !defined ANDROID_STUBIFY */ #if defined HAVE_HAIKU || defined HAVE_NS || defined HAVE_PGTK \ - || defined HAVE_ANDROID + || defined HAVE_ANDROID || defined HAVE_NTGUI static char *slurp_file (image_fd, ptrdiff_t *); static Lisp_Object image_find_image_fd (Lisp_Object, image_fd *); static bool xbm_read_bitmap_data (struct frame *, char *, char *, @@ -711,10 +741,53 @@ image_create_bitmap_from_data (struct frame *f, char *bits, ptrdiff_t image_create_bitmap_from_file (struct frame *f, Lisp_Object file) { -#if defined (HAVE_NTGUI) - return -1; /* W32_TODO : bitmap support */ -#else Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f); + +#ifdef HAVE_NTGUI + ptrdiff_t id, size; + int width, height, rc; + image_fd fd; + char *contents, *data; + Emacs_Pixmap bitmap; + + if (!STRINGP (image_find_image_fd (file, &fd))) + return -1; + + contents = slurp_file (fd, &size); + + if (!contents) + return -1; + + rc = xbm_read_bitmap_data (f, contents, contents + size, + &width, &height, &data, 0); + + if (!rc) + { + xfree (contents); + return -1; + } + + { + /* Windows mono bitmaps are reversed compared with X. */ + + int nbytes, i; + nbytes = (width + CHAR_BIT - 1) / CHAR_BIT * height; + + for (i = 0; i < nbytes; i++) + data[i] = XBM_BIT_SHUFFLE(data[i]); + } + + id = image_allocate_bitmap_record (f); + bitmap = w32_create_pixmap_from_bitmap_data (width, height, data); + + dpyinfo->bitmaps[id - 1].height = width; + dpyinfo->bitmaps[id - 1].width = height; + dpyinfo->bitmaps[id - 1].stipple = bitmap; + dpyinfo->bitmaps[id - 1].file = xlispstrdup (file); + + xfree (contents); + xfree (data); + return id; #endif #ifdef HAVE_NS @@ -4747,7 +4820,6 @@ w32_create_pixmap_from_bitmap_data (int width, int height, char *data) int i, j, w1, w2; unsigned char *bits, *p; HBITMAP bmp; - w1 = (width + 7) / 8; /* nb of 8bits elt in X bitmap */ w2 = ((width + 15) / 16) * 2; /* nb of 16bits elt in W32 bitmap */ bits = alloca (height * w2); @@ -4800,12 +4872,6 @@ convert_mono_to_color_image (struct frame *f, struct image *img, img->pixmap = new_pixmap; } -#define XBM_BIT_SHUFFLE(b) (~(b)) - -#else - -#define XBM_BIT_SHUFFLE(b) (b) - #endif /* HAVE_NTGUI */ diff --git a/src/w32term.c b/src/w32term.c index 2bcd5d86a38..8a0cea417ca 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -1248,6 +1248,34 @@ w32_clear_glyph_string_rect (struct glyph_string *s, real_w, real_h); } +/* Fill background with bitmap pattern from S at specified position + given by X and Y. WIDTH and HEIGHT specifies bitmap size, GC is + used to get foreground and background color context and HDC where + fill it. */ + +static void +w32_fill_stipple_pattern (HDC hdc, struct glyph_string *s, Emacs_GC *gc, + int x, int y, unsigned int width, unsigned int height) +{ + SetTextColor (hdc, gc->foreground); + SetBkColor (hdc, gc->background); + + RECT r; + Emacs_Pixmap bm; + HBRUSH hb + + r.left = x; + r.top = y; + r.right = x + width; + r.bottom = y + height; + + bm = FRAME_DISPLAY_INFO (s->f)->bitmaps[s->face->stipple - 1].stipple; + + hb = CreatePatternBrush (bm); + FillRect (hdc, &r, hb); + + DeleteObject (hb); +} /* Draw the background of glyph_string S. If S->background_filled_p is non-zero don't draw it. FORCE_P non-zero means draw the @@ -1264,21 +1292,16 @@ w32_draw_glyph_string_background (struct glyph_string *s, bool force_p) { int box_line_width = max (s->face->box_horizontal_line_width, 0); -#if 0 /* TODO: stipple */ if (s->stippled_p) { /* Fill background with a stipple pattern. */ - XSetFillStyle (s->display, s->gc, FillOpaqueStippled); - XFillRectangle (s->display, FRAME_W32_WINDOW (s->f), s->gc, s->x, - s->y + box_line_width, - s->background_width, - s->height - 2 * box_line_width); - XSetFillStyle (s->display, s->gc, FillSolid); + w32_fill_stipple_pattern (s->hdc, s, s->gc, s->x, + s->y + box_line_width, + s->background_width, + s->height - 2 * box_line_width); s->background_filled_p = true; } - else -#endif - if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width + else if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width /* When xdisp.c ignores FONT_HEIGHT, we cannot trust font dimensions, since the actual glyphs might be much smaller. So in that case we always clear the @@ -2286,16 +2309,12 @@ w32_draw_image_foreground_1 (struct glyph_string *s, HBITMAP pixmap) static void w32_draw_glyph_string_bg_rect (struct glyph_string *s, int x, int y, int w, int h) { -#if 0 /* TODO: stipple */ if (s->stippled_p) { /* Fill background with a stipple pattern. */ - XSetFillStyle (s->display, s->gc, FillOpaqueStippled); - XFillRectangle (s->display, FRAME_W32_WINDOW (s->f), s->gc, x, y, w, h); - XSetFillStyle (s->display, s->gc, FillSolid); + w32_fill_stipple_pattern (s->hdc, s, s->gc, x, y, w, h); } else -#endif w32_clear_glyph_string_rect (s, x, y, w, h); } @@ -2500,16 +2519,12 @@ w32_draw_stretch_glyph_string (struct glyph_string *s) get_glyph_string_clip_rect (s, &r); w32_set_clip_rectangle (hdc, &r); -#if 0 /* TODO: stipple */ if (s->face->stipple) { /* Fill background with a stipple pattern. */ - XSetFillStyle (s->display, gc, FillOpaqueStippled); - XFillRectangle (s->display, FRAME_W32_WINDOW (s->f), gc, x, y, w, h); - XSetFillStyle (s->display, gc, FillSolid); + w32_fill_stipple_pattern (s->hdc, s, gc, x, y, w, h); } else -#endif { w32_fill_area (s->f, s->hdc, gc->background, x, y, w, h); } diff --git a/src/w32term.h b/src/w32term.h index 3120c8bd71f..1eb6a660248 100644 --- a/src/w32term.h +++ b/src/w32term.h @@ -58,6 +58,7 @@ #define CP_DEFAULT 1004 { Emacs_Pixmap pixmap; char *file; + Emacs_Pixmap stipple; HINSTANCE hinst; /* Used to load the file */ int refcount; /* Record some info about this pixmap. */ -- 2.44.0.windows.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu May 30 20:14:26 2024 Received: (at 71159) by debbugs.gnu.org; 31 May 2024 00:14:26 +0000 Received: from localhost ([127.0.0.1]:52840 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sCpub-0006Xi-Ok for submit@debbugs.gnu.org; Thu, 30 May 2024 20:14:26 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:51490) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sCpuZ-0006XV-LC for 71159@debbugs.gnu.org; Thu, 30 May 2024 20:14:24 -0400 Received: by mail-ot1-f67.google.com with SMTP id 46e09a7af769-6f8d0a1e500so1121344a34.3 for <71159@debbugs.gnu.org>; Thu, 30 May 2024 17:14:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717114387; x=1717719187; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=VUYkoYz4W02Yi9bu6JsquLioQi6gXi2DzUBTALVn6gM=; b=S4lDIw/jRqJaAn647tYepIDFjNUXh9srcl5dsb4YNaNqLcd0hDImLSaCrW4STn7QER 8ADiiIct/u7U94Ac28RJiuYAOBu1GBhp5dzZFUv7iOFcswv7BkB7rhFbaMIXH6lhw0i9 e9dUt5YkR6fe4r/MGhaqOGfdfpNV7oCGB25UXLc8uDajFNmJU9mC7gr+/WQYSSxkgkSb ma0+IxnfJSRoIFS1AWVS7XOeA9ljhXZg5g7xMxdsNTA18kEEdMd/6MJGqEVJTTYJ1ZTu b8EYIogu09GECXE/3yjNWTrcwWIF5kT+e8yBPAwxpj3iqMoYPQFyItddexerIrbLVca6 79/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717114387; x=1717719187; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=VUYkoYz4W02Yi9bu6JsquLioQi6gXi2DzUBTALVn6gM=; b=eUjR2P9ufaq4QF7+aila05cP2kPzqOrMhpJjF0Se+CfAxONFVmPYnPzTol6s9CoKhs jdKMTaAiCIpFFQJQqljMhZm29veniT/Gh1QOsk+baDlCaa8Y27a4XEa+k/mZyL7K5LZw W94CUP2pfEaGQtamu57K4cSCdt1VB15LByzftxyNRWk4wqejuJVeeugifBvhuiVH0uDN y6xtBJYF8plFo1Tfc2KcvPEFXNvPdRq+Ew7zYggYqrxThnN2nT9bJq5K5KNYapw1iQjK D0U4N5DVbsc9zXxyMlg3hPANhoFP7hFdf1YOO0JDCLkjkWVZyg5LqnWoI+EtY1EhVFgr xn6A== X-Gm-Message-State: AOJu0YyrtpCSZC4TTnBiuouDrTSk3xFUUygNEIY+nyV8vRcl9Ei9tcRu cfwRf9Jkb5yNwxdU8Oci6GhK/8nNpt6hWzwvKQeYv0PYim1k6uUkDap5c3Y8 X-Google-Smtp-Source: AGHT+IEU0UNCK4RIc+7qLqQ3ZtyJ1H4SSHP05u5EWNIZd9lYXX6Q5ZCzMLlBGDsXZkC+HIFfXZ7rBA== X-Received: by 2002:a05:6871:68c:b0:250:8970:499d with SMTP id 586e51a60fabf-2508b7de0cdmr566951fac.3.1717114386913; Thu, 30 May 2024 17:13:06 -0700 (PDT) Received: from LIBERO ([187.184.27.251]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-25085023833sm204906fac.26.2024.05.30.17.12.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 17:12:46 -0700 (PDT) From: "Elijah G." To: 71159@debbugs.gnu.org Subject: Re: bug#71159: [PATCH] Stipple support for MS Windows In-Reply-To: <86jzjcgq00.fsf@gmail.com> (Elijah G.'s message of "Wed, 29 May 2024 17:25:19 -0600") References: <86cypcuhhk.fsf@gmail.com> <86jzjcgq00.fsf@gmail.com> Date: Thu, 30 May 2024 18:12:42 -0600 Message-ID: <86sexydekl.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (windows-nt) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 2.3 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: I've updated the patch for delete all the conflicts generated by ae7d0e86b37eabc434c48f85f56df0a221e0e7c7 commit. From e52e8200df7f41b709de892f3789b14fcc994882 Mon Sep 17 00:00:00 2001 From: "Elias G. Perez" Date: Fri, 10 May 2024 20:36:42 -0600 Subject: [PATCH] Stipple support for MS Windows Content analysis details: (2.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: r.top (top)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (eg642616[at]gmail.com) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (eg642616[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.210.67 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.210.67 listed in wl.mailspike.net] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: 71159 Cc: Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: I've updated the patch for delete all the conflicts generated by ae7d0e86b37eabc434c48f85f56df0a221e0e7c7 commit. From e52e8200df7f41b709de892f3789b14fcc994882 Mon Sep 17 00:00:00 2001 From: "Elias G. Perez" Date: Fri, 10 May 2024 20:36:42 -0600 Subject: [PATCH] Stipple support for MS Windows Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.210.67 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.210.67 listed in list.dnswl.org] 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: r.top (top)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (eg642616[at]gmail.com) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (eg642616[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager --=-=-= Content-Type: text/plain I've updated the patch for delete all the conflicts generated by ae7d0e86b37eabc434c48f85f56df0a221e0e7c7 commit. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Stipple-support-for-MS-Windows.patch Content-Description: Final Patch >From e52e8200df7f41b709de892f3789b14fcc994882 Mon Sep 17 00:00:00 2001 From: "Elias G. Perez" Date: Fri, 10 May 2024 20:36:42 -0600 Subject: [PATCH] Stipple support for MS Windows * etc/NEWS: Announce support for stipples in MS-Windows. * src/w32term.h (w32_bitmap_record): Add stipple value. * src/w32term.c: (w32_fill_stipple_pattern): New function. (w32_draw_glyph_string_background, w32_draw_glyph_string_bg_rect) (w32_draw_stretch_glyph_string): Use new stipple function. * src/image.c: (image_create_bitmap_from_data): Create stipple bitmap. (image_create_bitmap_from_file): Add suuport for pixmap and create stipple bitmap. --- etc/NEWS | 3 ++ src/image.c | 99 ++++++++++++++++++++++++++++++++++++++++++--------- src/w32term.c | 55 +++++++++++++++++----------- src/w32term.h | 1 + 4 files changed, 122 insertions(+), 36 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 3c672ffed8f..f0aec17371f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2827,6 +2827,9 @@ thumbnail images and show them in the thumbnail buffer. Unlike with using 'convert', this fallback method is synchronous, so Emacs will wait until all the thumbnails are created and displayed, before showing them. +--- +*** Emacs on MS-Windows now supports the :stipple face attribute + ---------------------------------------------------------------------- This file is part of GNU Emacs. diff --git a/src/image.c b/src/image.c index 3138ef25a63..941d85d3a0b 100644 --- a/src/image.c +++ b/src/image.c @@ -130,6 +130,12 @@ #define NO_PIXMAP 0 #define PIX_MASK_RETAIN 0 #define PIX_MASK_DRAW 1 +#define XBM_BIT_SHUFFLE(b) (~(b)) + +#else + +#define XBM_BIT_SHUFFLE(b) (b) + #endif /* HAVE_NTGUI */ #ifdef HAVE_NS @@ -214,6 +220,13 @@ #define n_planes n_image_planes static unsigned long *colors_in_color_table (int *n); #endif +#ifdef HAVE_NTGUI +static HBITMAP w32_create_pixmap_from_bitmap_data (int width, + int height, + char *data); + +#endif + #if defined (HAVE_WEBP) || defined (HAVE_GIF) static void anim_prune_animation_cache (Lisp_Object); #endif @@ -596,13 +609,30 @@ image_create_bitmap_from_data (struct frame *f, char *bits, #endif /* HAVE_ANDROID && !defined ANDROID_STUBIFY */ #ifdef HAVE_NTGUI - Lisp_Object frame UNINIT; /* The value is not used. */ - Emacs_Pixmap bitmap; + Emacs_Pixmap stipple, bitmap; bitmap = CreateBitmap (width, height, - FRAME_DISPLAY_INFO (XFRAME (frame))->n_planes, - FRAME_DISPLAY_INFO (XFRAME (frame))->n_cbits, + dpyinfo->n_planes, + dpyinfo->n_cbits, bits); - if (! bitmap) + + /* Convert X bitmap to W32 bitmap. */ + /* Windows mono bitmaps are reversed compared with X. */ + { + char *invertedBits; + int nbytes, i; + ptrdiff_t sa_avail; /* Used only for SAFE_NALLOCA. */ + + invertedBits = bits; + nbytes = (width + CHAR_BIT - 1) / CHAR_BIT * height; + sa_avail = MAX_ALLOCA + + SAFE_NALLOCA (bits, 1, nbytes); + + for (i = 0; i < nbytes; i++) + bits[i] = XBM_BIT_SHUFFLE(invertedBits[i]); + } + stipple = w32_create_pixmap_from_bitmap_data (width, height, bits); + if (!bitmap || !stipple) return -1; #endif /* HAVE_NTGUI */ @@ -681,6 +711,7 @@ image_create_bitmap_from_data (struct frame *f, char *bits, #ifdef HAVE_NTGUI dpyinfo->bitmaps[id - 1].pixmap = bitmap; + dpyinfo->bitmaps[id - 1].stipple = stipple; dpyinfo->bitmaps[id - 1].hinst = NULL; dpyinfo->bitmaps[id - 1].depth = 1; #endif /* HAVE_NTGUI */ @@ -699,7 +730,7 @@ image_create_bitmap_from_data (struct frame *f, char *bits, #endif /* defined HAVE_ANDROID && !defined ANDROID_STUBIFY */ #if defined HAVE_HAIKU || defined HAVE_NS || defined HAVE_PGTK \ - || defined HAVE_ANDROID + || defined HAVE_ANDROID || defined HAVE_NTGUI static char *slurp_file (image_fd, ptrdiff_t *); static Lisp_Object image_find_image_fd (Lisp_Object, image_fd *); static bool xbm_read_bitmap_data (struct frame *, char *, char *, @@ -711,10 +742,53 @@ image_create_bitmap_from_data (struct frame *f, char *bits, ptrdiff_t image_create_bitmap_from_file (struct frame *f, Lisp_Object file) { -#if defined (HAVE_NTGUI) - return -1; /* W32_TODO : bitmap support */ -#else Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f); + +#ifdef HAVE_NTGUI + ptrdiff_t id, size; + int width, height, rc; + image_fd fd; + char *contents, *data; + Emacs_Pixmap bitmap; + + if (!STRINGP (image_find_image_fd (file, &fd))) + return -1; + + contents = slurp_file (fd, &size); + + if (!contents) + return -1; + + rc = xbm_read_bitmap_data (f, contents, contents + size, + &width, &height, &data, 0); + + if (!rc) + { + xfree (contents); + return -1; + } + + { + /* Windows mono bitmaps are reversed compared with X. */ + + int nbytes, i; + nbytes = (width + CHAR_BIT - 1) / CHAR_BIT * height; + + for (i = 0; i < nbytes; i++) + data[i] = XBM_BIT_SHUFFLE(data[i]); + } + + id = image_allocate_bitmap_record (f); + bitmap = w32_create_pixmap_from_bitmap_data (width, height, data); + + dpyinfo->bitmaps[id - 1].height = width; + dpyinfo->bitmaps[id - 1].width = height; + dpyinfo->bitmaps[id - 1].stipple = bitmap; + dpyinfo->bitmaps[id - 1].file = xlispstrdup (file); + + xfree (contents); + xfree (data); + return id; #endif #ifdef HAVE_NS @@ -4747,7 +4821,6 @@ w32_create_pixmap_from_bitmap_data (int width, int height, char *data) int i, j, w1, w2; unsigned char *bits, *p; HBITMAP bmp; - w1 = (width + 7) / 8; /* nb of 8bits elt in X bitmap */ w2 = ((width + 15) / 16) * 2; /* nb of 16bits elt in W32 bitmap */ bits = alloca (height * w2); @@ -4800,12 +4873,6 @@ convert_mono_to_color_image (struct frame *f, struct image *img, img->pixmap = new_pixmap; } -#define XBM_BIT_SHUFFLE(b) (~(b)) - -#else - -#define XBM_BIT_SHUFFLE(b) (b) - #endif /* HAVE_NTGUI */ diff --git a/src/w32term.c b/src/w32term.c index 2bcd5d86a38..3ef6d0f11f1 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -1248,6 +1248,34 @@ w32_clear_glyph_string_rect (struct glyph_string *s, real_w, real_h); } +/* Fill background with bitmap pattern from S at specified position + given by X and Y. WIDTH and HEIGHT specifies bitmap size, GC is + used to get foreground and background color context and HDC where + fill it. */ + +static void +w32_fill_stipple_pattern (HDC hdc, struct glyph_string *s, Emacs_GC *gc, + int x, int y, unsigned int width, unsigned int height) +{ + SetTextColor (hdc, gc->foreground); + SetBkColor (hdc, gc->background); + + RECT r; + Emacs_Pixmap bm; + HBRUSH hb; + + r.left = x; + r.top = y; + r.right = x + width; + r.bottom = y + height; + + bm = FRAME_DISPLAY_INFO (s->f)->bitmaps[s->face->stipple - 1].stipple; + + hb = CreatePatternBrush (bm); + FillRect (hdc, &r, hb); + + DeleteObject (hb); +} /* Draw the background of glyph_string S. If S->background_filled_p is non-zero don't draw it. FORCE_P non-zero means draw the @@ -1264,21 +1292,16 @@ w32_draw_glyph_string_background (struct glyph_string *s, bool force_p) { int box_line_width = max (s->face->box_horizontal_line_width, 0); -#if 0 /* TODO: stipple */ if (s->stippled_p) { /* Fill background with a stipple pattern. */ - XSetFillStyle (s->display, s->gc, FillOpaqueStippled); - XFillRectangle (s->display, FRAME_W32_WINDOW (s->f), s->gc, s->x, - s->y + box_line_width, - s->background_width, - s->height - 2 * box_line_width); - XSetFillStyle (s->display, s->gc, FillSolid); + w32_fill_stipple_pattern (s->hdc, s, s->gc, s->x, + s->y + box_line_width, + s->background_width, + s->height - 2 * box_line_width); s->background_filled_p = true; } - else -#endif - if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width + else if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width /* When xdisp.c ignores FONT_HEIGHT, we cannot trust font dimensions, since the actual glyphs might be much smaller. So in that case we always clear the @@ -2286,16 +2309,12 @@ w32_draw_image_foreground_1 (struct glyph_string *s, HBITMAP pixmap) static void w32_draw_glyph_string_bg_rect (struct glyph_string *s, int x, int y, int w, int h) { -#if 0 /* TODO: stipple */ if (s->stippled_p) { /* Fill background with a stipple pattern. */ - XSetFillStyle (s->display, s->gc, FillOpaqueStippled); - XFillRectangle (s->display, FRAME_W32_WINDOW (s->f), s->gc, x, y, w, h); - XSetFillStyle (s->display, s->gc, FillSolid); + w32_fill_stipple_pattern (s->hdc, s, s->gc, x, y, w, h); } else -#endif w32_clear_glyph_string_rect (s, x, y, w, h); } @@ -2500,16 +2519,12 @@ w32_draw_stretch_glyph_string (struct glyph_string *s) get_glyph_string_clip_rect (s, &r); w32_set_clip_rectangle (hdc, &r); -#if 0 /* TODO: stipple */ if (s->face->stipple) { /* Fill background with a stipple pattern. */ - XSetFillStyle (s->display, gc, FillOpaqueStippled); - XFillRectangle (s->display, FRAME_W32_WINDOW (s->f), gc, x, y, w, h); - XSetFillStyle (s->display, gc, FillSolid); + w32_fill_stipple_pattern (s->hdc, s, gc, x, y, w, h); } else -#endif { w32_fill_area (s->f, s->hdc, gc->background, x, y, w, h); } diff --git a/src/w32term.h b/src/w32term.h index a19be1a9e6a..38eac4230dd 100644 --- a/src/w32term.h +++ b/src/w32term.h @@ -58,6 +58,7 @@ #define CP_DEFAULT 1004 { Emacs_Pixmap pixmap; char *file; + Emacs_Pixmap stipple; HINSTANCE hinst; /* Used to load the file */ int refcount; /* Record some info about this pixmap. */ -- 2.44.0.windows.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 01 10:04:10 2024 Received: (at 71159) by debbugs.gnu.org; 1 Jun 2024 14:04:10 +0000 Received: from localhost ([127.0.0.1]:56943 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDPL8-0006fy-EI for submit@debbugs.gnu.org; Sat, 01 Jun 2024 10:04:10 -0400 Received: from sonic308-56.consmr.mail.ne1.yahoo.com ([66.163.187.31]:34771) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDPL7-0006fn-8U for 71159@debbugs.gnu.org; Sat, 01 Jun 2024 10:04:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1717250631; bh=GLL3fQonQNnBMb/G77lJWBtLsT/Rr4Sm2aU3tR8eJcU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=niFnuT7bM1wCGd23SKMzy20s1GMr5f82MH50N1NYm7IK3n2rEG/lPOaaYDtx3dfbcQt+BIT6oqKRy16FP1uC1vTy4w0tr85+qb+qlkK2Zq2NucSZ9WQhjN4/UPvxC6rTxdlS3TCpLJkZ1z+HJH1Q2pje/sle044n+vOzuLH4Qo0hsrl0eYCZBRYurqv8qgMF9sBU7ZGT0VrRYXssV+g6/ZTkjXvM/qdm/YHlia+M9iujjkdiQXt5MoL3B6UpqDM6sJD4On2vTd6ErB3w7Wme4p7DmT7285ubOsaW/Sdphukw+Vpn/XfX2kS+ObYHZENPLqcvRZZTalsi5gLMMZi4ew== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1717250632; bh=BeVLJ+qf1ld4PyOPufn/g5clr36zSt08yxX8tmGm/SL=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=Y+Og1PV0Bgce2HKVYhLtK6hFx5Jg3Ay2FBnzRUska47fQG2mZTLlNEx4IlYAnFWvMqx6/dO1A+BX0ArO9nves331SmBBC6bJ5X8fFMuHf+0Pt8L276eouXbimWtqn9E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Q_6FeNZPVkN6SY14cIzzOARI hbO4ZWDBZPrKZGPo56H21J0eQcD1WbaQOaro2emenRJIYlQMPqh0to43weGKf0fLwlFZNWHn7el8 d6kvCAOEqwFxS55eQ2H.Aq8Dnv9qZA9YLlrVJZzofCV6Bsd3hxqtzd3H93WAUGII3vkQvzGBWy1o IlT3_uaprfFZK9WEhdcN3U0PjWVJf5pO5r_LEY.QWuzqPn_BIYgBCD6F28ncQ74PWXXHXkuqeItk NKK0WwJl4.J38fYdu4Uk2SZfawhpxcw8qrf.gj8_zKWgh9Y5fNpZmccq.BTBnbPpnSXbU1N6K_lk bUs1alPErt.OzgAIbSjmafeWGny9e5KQFBI3EbJYt3zIIGjX8cUGUUcyITYz1FIoxfpkeerB1Dqj SFbG.pw-- X-Sonic-MF: X-Sonic-ID: d57717eb-2370-4758-8e87-722da7eea530 Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.ne1.yahoo.com with HTTP; Sat, 1 Jun 2024 14:03:51 +0000 Received: by hermes--production-sg3-6f9f87bd85-784nx (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 486bb04e089d7a8eeb752fc472e40a6b; Sat, 01 Jun 2024 14:03:46 +0000 (UTC) From: Po Lu To: "Elijah G." Subject: Re: bug#71159: [PATCH] Stipple support for MS Windows In-Reply-To: <86sexydekl.fsf@gmail.com> (Elijah G.'s message of "Thu, 30 May 2024 18:12:42 -0600") References: <86cypcuhhk.fsf@gmail.com> <86jzjcgq00.fsf@gmail.com> <86sexydekl.fsf@gmail.com> Date: Sat, 01 Jun 2024 22:03:40 +0800 Message-ID: <87ed9gkber.fsf@yahoo.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.22407 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 1690 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71159 Cc: 71159@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) "Elijah G." writes: > I've updated the patch for delete all the conflicts generated by > ae7d0e86b37eabc434c48f85f56df0a221e0e7c7 commit. Thank you. Please find several comments below: > * src/w32term.c: > (w32_fill_stipple_pattern): New function. > (w32_draw_glyph_string_background, w32_draw_glyph_string_bg_rect) > (w32_draw_stretch_glyph_string): Use new stipple function. Please delete the redundant colon after the file name. > * src/image.c: > (image_create_bitmap_from_data): Create stipple bitmap. > (image_create_bitmap_from_file): Add suuport for pixmap and create > stipple bitmap. Likewise. This commit message is also excessively wide, and must be filled to remain within 64 columns. > +#ifdef HAVE_NTGUI > +static HBITMAP w32_create_pixmap_from_bitmap_data (int width, > + int height, > + char *data); > + > +#endif It should be aesthetically better if the parameter names were deleted from this declaration's type list, and all of the types placed on one line. > + int nbytes, i; > + ptrdiff_t sa_avail; /* Used only for SAFE_NALLOCA. */ ??? Please insert this boilerplate by means of the `USE_SAFE_ALLOCA' macro. > + invertedBits = bits; > + nbytes = (width + CHAR_BIT - 1) / CHAR_BIT * height; > + sa_avail = MAX_ALLOCA > + > + SAFE_NALLOCA (bits, 1, nbytes); Shouldn't you subsequently call SAFE_FREE? > + for (i = 0; i < nbytes; i++) > + bits[i] = XBM_BIT_SHUFFLE(invertedBits[i]); Absent space between macro name and parameters. > + data[i] = XBM_BIT_SHUFFLE(data[i]); Here also. > + Emacs_Pixmap stipple; Should not the object in this field be released in `free_bitmap_record'? From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 01 10:28:27 2024 Received: (at 71159) by debbugs.gnu.org; 1 Jun 2024 14:28:27 +0000 Received: from localhost ([127.0.0.1]:56993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDPid-0007Kh-2g for submit@debbugs.gnu.org; Sat, 01 Jun 2024 10:28:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDPib-0007KQ-4H for 71159@debbugs.gnu.org; Sat, 01 Jun 2024 10:28:25 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sDPiK-0004Fv-1n; Sat, 01 Jun 2024 10:28:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=y2xvTnZ2vdY2czbeF5Q+WKBBXyzsUHCrIonism0y738=; b=YPmEPTAZnapf x8oGmu1qjOR04Z38IwaasRNc+0UgBNMlOSBEW9ekErh5zsmcLGvOF6lI6sWYfgRl4ni3KgBerj/fa jFMhZUwv3Whe07sM+8lf7VG+PUJl6JN1iL1PU2HTNETvrdnX9h6/1z2dTCZoUI/fQTiYfrWrhATew aWEomH34n0YghVO/mS1Y77k9uC1uXIa2J4RVvSW+ULD06+GGRCzbVoLSAjlQHIYi/1ZxbRuyBG9Mm cEnIU/Ubu9THTOzCof2ANoxuhuH/UXkml2g0B/rORqHKl8qNfY+5aZJBPd2f5eM//5J/yZuNaNnwn 9YkITwBywUyFjR5ksEwsmA==; Date: Sat, 01 Jun 2024 17:28:03 +0300 Message-Id: <86o78kohzg.fsf@gnu.org> From: Eli Zaretskii To: "Elijah G." In-Reply-To: <86sexydekl.fsf@gmail.com> (eg642616@gmail.com) Subject: Re: bug#71159: [PATCH] Stipple support for MS Windows References: <86cypcuhhk.fsf@gmail.com> <86jzjcgq00.fsf@gmail.com> <86sexydekl.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71159 Cc: 71159@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: "Elijah G." > Cc: Eli Zaretskii > Date: Thu, 30 May 2024 18:12:42 -0600 > > I've updated the patch for delete all the conflicts generated by > ae7d0e86b37eabc434c48f85f56df0a221e0e7c7 commit. Thanks, but is this the right patch? It includes a syntax error, which GCC announces like this: image.c: In function 'image_create_bitmap_from_data': image.c:627:26: error: expected ';' before 'do' 627 | sa_avail = MAX_ALLOCA | ^ | ; image.c:623:15: warning: variable 'sa_avail' set but not used [-Wunused-but-set-variable] 623 | ptrdiff_t sa_avail; /* Used only for SAFE_NALLOCA. */ | ^~~~~~~~ Makefile:457: recipe for target `image.o' failed make[2]: *** [image.o] Error 1 I'm guessing that you sent the wrong patch, because you couldn't have built Emacs with this one. So, while the fix is trivial, I haven't installed this, out of fear that other parts might be incorrect. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 01 14:54:48 2024 Received: (at submit) by debbugs.gnu.org; 1 Jun 2024 18:54:48 +0000 Received: from localhost ([127.0.0.1]:57405 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDTsN-0005g3-Ee for submit@debbugs.gnu.org; Sat, 01 Jun 2024 14:54:48 -0400 Received: from lists.gnu.org ([209.51.188.17]:38340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDTsK-0005fu-8v for submit@debbugs.gnu.org; Sat, 01 Jun 2024 14:54:45 -0400 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 1sDTs4-0004Ni-NQ for bug-gnu-emacs@gnu.org; Sat, 01 Jun 2024 14:54:32 -0400 Received: from mail-ot1-x341.google.com ([2607:f8b0:4864:20::341]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sDTs2-0005JW-IF; Sat, 01 Jun 2024 14:54:28 -0400 Received: by mail-ot1-x341.google.com with SMTP id 46e09a7af769-6f8ef894ecdso1903068a34.1; Sat, 01 Jun 2024 11:54:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717268064; x=1717872864; darn=gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=G5jt0IEqqMWyO1Eym1qpLZyoGCHO5C6cFFKK/rh9Mw4=; b=JeuVUV4Iw8f2mSCaWGxX0jhs2n6hLg2+uD1u9dwxQ9NCgOD51jW49FGHW3ZmoAsyYj YQC7f7R8vQdDna9dhN3kRXV31ybtGYHE/OoI8uy2OGqbS+sOEycL8289d0z9WQ47EuEM MMsX/PBhGhvwNy6X3Dfq9l/Pgk3JaDBGgJHkt41wXYflPB+uZAI0Eg95wPhao6L0Afct 44uOWWTKGJleTpyUYEbBppmV5nnP6bupqrjji6e26q7CDAp6Gqyt3i8aPj6Ohr6yDs2L BXSxpokkxWyBL8UdqniZOiCqjkaGp9Nf3zywQqG/6jhKblmvDNIz93e+xKRMvHK4U85F Wfaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717268064; x=1717872864; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=G5jt0IEqqMWyO1Eym1qpLZyoGCHO5C6cFFKK/rh9Mw4=; b=gQh4jrryFxXQzEKgFo5FHnXyKNrVF9J3UrAkmuAPaQDRNMTdBth0HclAOwXW03hbM0 Kh5BKm+Z+SzcPnQZaQp/a3uMvhO19rQrx0LNqx//8yvXmB7AvPW43NAI/RKks6rKYzT3 IT/e4NLmnrYk/Hx/6o5bhg2oStCSjJ7iRXCwGYoxmhm1WxeCFVfCqhH33KjcRwS17aPG yltjeoGEoQFTMYUAHr1F/BRaz1SW7SuJ4e+Nja7vjeL1aQlXn6c0mh3ta3r1ed8xp6x0 mzjmxOfDl46izr91N0d1eijUDuBwezc1qM670BDGozpa8wQNnL7FKU0xP/r64OaPmcsr cUmQ== X-Forwarded-Encrypted: i=1; AJvYcCUSuVR52FJy68EEjr0RbXonfafqOSkn6cfko0q+Em3jvHbMC99Hy90Y5Qtoc3ExeChwOhz129968lltZo0= X-Gm-Message-State: AOJu0YyJINZqPq47mVts4K5VxyFc4D9FftaRMaxgmidXD0Y5xoH1CsAs q7oVdRkevmomTXm5m5bpomWRFimj4ZxY8rdUC0p9wyc6XMBYqwNLs0nQ5Wd7 X-Google-Smtp-Source: AGHT+IES9+g3QrRnq8T6FPVAy7ZD5BzPTPskkgKn42Da6v5kREFDtgVRnB34s46bwcBXO8Bin8DKxQ== X-Received: by 2002:a9d:6755:0:b0:6f8:d23e:78e0 with SMTP id 46e09a7af769-6f911fc9917mr4990202a34.38.1717268064379; Sat, 01 Jun 2024 11:54:24 -0700 (PDT) Received: from LIBERO ([187.184.27.187]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-5ba004b3d60sm877082eaf.38.2024.06.01.11.54.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jun 2024 11:54:23 -0700 (PDT) From: "Elijah G." To: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Subject: Re: bug#71159: [PATCH] Stipple support for MS Windows In-Reply-To: <87ed9gkber.fsf@yahoo.com> (Po Lu via's message of "Sat, 01 Jun 2024 22:03:40 +0800") References: <86cypcuhhk.fsf@gmail.com> <86jzjcgq00.fsf@gmail.com> <86sexydekl.fsf@gmail.com> <87ed9gkber.fsf@yahoo.com> Date: Sat, 01 Jun 2024 12:54:22 -0600 Message-ID: <86r0dg4hpd.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (windows-nt) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2607:f8b0:4864:20::341; envelope-from=eg642616@gmail.com; helo=mail-ot1-x341.google.com X-Spam_score_int: 1 X-Spam_score: 0.1 X-Spam_bar: / X-Spam_report: (0.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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, PDS_OTHER_BAD_TLD=1.999, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit Cc: Po Lu , 71159@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) --=-=-= Content-Type: text/plain Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > "Elijah G." writes: > >> I've updated the patch for delete all the conflicts generated by >> ae7d0e86b37eabc434c48f85f56df0a221e0e7c7 commit. > > Thank you. Please find several comments below: > >> * src/w32term.c: >> (w32_fill_stipple_pattern): New function. >> (w32_draw_glyph_string_background, w32_draw_glyph_string_bg_rect) >> (w32_draw_stretch_glyph_string): Use new stipple function. > > Please delete the redundant colon after the file name. > >> * src/image.c: >> (image_create_bitmap_from_data): Create stipple bitmap. >> (image_create_bitmap_from_file): Add suuport for pixmap and create >> stipple bitmap. > > Likewise. This commit message is also excessively wide, and must be > filled to remain within 64 columns. It's now fixed, sorry about that i couldn't find how to insert change-log skeleton or amend with vc.el, those where generated by `diff-add-change-log-entries-other-window'. >> +#ifdef HAVE_NTGUI >> +static HBITMAP w32_create_pixmap_from_bitmap_data (int width, >> + int height, >> + char *data); >> + >> +#endif > > It should be aesthetically better if the parameter names were deleted > from this declaration's type list, and all of the types placed on one > line. Done. >> + int nbytes, i; >> + ptrdiff_t sa_avail; /* Used only for SAFE_NALLOCA. */ > > ??? Please insert this boilerplate by means of the `USE_SAFE_ALLOCA' > macro. > >> + invertedBits = bits; >> + nbytes = (width + CHAR_BIT - 1) / CHAR_BIT * height; >> + sa_avail = MAX_ALLOCA >> + >> + SAFE_NALLOCA (bits, 1, nbytes); > > Shouldn't you subsequently call SAFE_FREE? Thank you, i forgot calling SAFE_FREE, i only defined sa_avail instead using USE_SAFE_ALLOCA because i was getting an unused variable warning. It's now fixed. >> + for (i = 0; i < nbytes; i++) >> + bits[i] = XBM_BIT_SHUFFLE(invertedBits[i]); > > Absent space between macro name and parameters. > >> + data[i] = XBM_BIT_SHUFFLE(data[i]); > > Here also. Done. >> + Emacs_Pixmap stipple; > > Should not the object in this field be released in `free_bitmap_record'? Yes, i forgot about it, it's fixed. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Stipple-support-for-MS-Windows.patch >From 6db0266a99dff476eb66ff00b310f650bd3ad0ea Mon Sep 17 00:00:00 2001 From: "Elias G. Perez" Date: Fri, 10 May 2024 20:36:42 -0600 Subject: [PATCH] Stipple support for MS Windows * etc/NEWS: Announce support for stipples in MS-Windows. * src/w32term.h (w32_bitmap_record): Add stipple value. * src/w32term.c (w32_fill_stipple_pattern): New function. (w32_draw_glyph_string_background) (w32_draw_glyph_string_bg_rect w32_draw_stretch_glyph_string): Use new stipple function. * src/image.c (image_create_bitmap_from_data): Create stipple bitmap. (image_create_bitmap_from_file): Add suuport for pixmap and create stipple bitmap. (free_bitmap_record): Release stipple. --- etc/NEWS | 3 ++ src/image.c | 101 ++++++++++++++++++++++++++++++++++++++++++-------- src/w32term.c | 55 +++++++++++++++++---------- src/w32term.h | 1 + 4 files changed, 125 insertions(+), 35 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 3c672ffed8f..f0aec17371f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2827,6 +2827,9 @@ thumbnail images and show them in the thumbnail buffer. Unlike with using 'convert', this fallback method is synchronous, so Emacs will wait until all the thumbnails are created and displayed, before showing them. +--- +*** Emacs on MS-Windows now supports the :stipple face attribute + ---------------------------------------------------------------------- This file is part of GNU Emacs. diff --git a/src/image.c b/src/image.c index 3138ef25a63..42f72780c24 100644 --- a/src/image.c +++ b/src/image.c @@ -130,6 +130,12 @@ #define NO_PIXMAP 0 #define PIX_MASK_RETAIN 0 #define PIX_MASK_DRAW 1 +#define XBM_BIT_SHUFFLE(b) (~(b)) + +#else + +#define XBM_BIT_SHUFFLE(b) (b) + #endif /* HAVE_NTGUI */ #ifdef HAVE_NS @@ -214,6 +220,11 @@ #define n_planes n_image_planes static unsigned long *colors_in_color_table (int *n); #endif +#ifdef HAVE_NTGUI +static HBITMAP w32_create_pixmap_from_bitmap_data (int, int, char *); + +#endif + #if defined (HAVE_WEBP) || defined (HAVE_GIF) static void anim_prune_animation_cache (Lisp_Object); #endif @@ -596,13 +607,34 @@ image_create_bitmap_from_data (struct frame *f, char *bits, #endif /* HAVE_ANDROID && !defined ANDROID_STUBIFY */ #ifdef HAVE_NTGUI - Lisp_Object frame UNINIT; /* The value is not used. */ - Emacs_Pixmap bitmap; + Emacs_Pixmap stipple, bitmap; bitmap = CreateBitmap (width, height, - FRAME_DISPLAY_INFO (XFRAME (frame))->n_planes, - FRAME_DISPLAY_INFO (XFRAME (frame))->n_cbits, + dpyinfo->n_planes, + dpyinfo->n_cbits, bits); - if (! bitmap) + + /* Convert X bitmap to W32 bitmap. */ + /* Windows mono bitmaps are reversed compared with X. */ + USE_SAFE_ALLOCA; + + { + char *invertedBits; + int nbytes, i; + + invertedBits = bits; + nbytes = (width + CHAR_BIT - 1) / CHAR_BIT * height; + + SAFE_NALLOCA (bits, 1, nbytes); + + for (i = 0; i < nbytes; i++) + bits[i] = XBM_BIT_SHUFFLE (invertedBits[i]); + } + + stipple = w32_create_pixmap_from_bitmap_data (width, height, bits); + + SAFE_FREE (); + + if (!bitmap || !stipple) return -1; #endif /* HAVE_NTGUI */ @@ -681,6 +713,7 @@ image_create_bitmap_from_data (struct frame *f, char *bits, #ifdef HAVE_NTGUI dpyinfo->bitmaps[id - 1].pixmap = bitmap; + dpyinfo->bitmaps[id - 1].stipple = stipple; dpyinfo->bitmaps[id - 1].hinst = NULL; dpyinfo->bitmaps[id - 1].depth = 1; #endif /* HAVE_NTGUI */ @@ -699,7 +732,7 @@ image_create_bitmap_from_data (struct frame *f, char *bits, #endif /* defined HAVE_ANDROID && !defined ANDROID_STUBIFY */ #if defined HAVE_HAIKU || defined HAVE_NS || defined HAVE_PGTK \ - || defined HAVE_ANDROID + || defined HAVE_ANDROID || defined HAVE_NTGUI static char *slurp_file (image_fd, ptrdiff_t *); static Lisp_Object image_find_image_fd (Lisp_Object, image_fd *); static bool xbm_read_bitmap_data (struct frame *, char *, char *, @@ -711,10 +744,53 @@ image_create_bitmap_from_data (struct frame *f, char *bits, ptrdiff_t image_create_bitmap_from_file (struct frame *f, Lisp_Object file) { -#if defined (HAVE_NTGUI) - return -1; /* W32_TODO : bitmap support */ -#else Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f); + +#ifdef HAVE_NTGUI + ptrdiff_t id, size; + int width, height, rc; + image_fd fd; + char *contents, *data; + Emacs_Pixmap bitmap; + + if (!STRINGP (image_find_image_fd (file, &fd))) + return -1; + + contents = slurp_file (fd, &size); + + if (!contents) + return -1; + + rc = xbm_read_bitmap_data (f, contents, contents + size, + &width, &height, &data, 0); + + if (!rc) + { + xfree (contents); + return -1; + } + + { + /* Windows mono bitmaps are reversed compared with X. */ + + int nbytes, i; + nbytes = (width + CHAR_BIT - 1) / CHAR_BIT * height; + + for (i = 0; i < nbytes; i++) + data[i] = XBM_BIT_SHUFFLE (data[i]); + } + + id = image_allocate_bitmap_record (f); + bitmap = w32_create_pixmap_from_bitmap_data (width, height, data); + + dpyinfo->bitmaps[id - 1].height = width; + dpyinfo->bitmaps[id - 1].width = height; + dpyinfo->bitmaps[id - 1].stipple = bitmap; + dpyinfo->bitmaps[id - 1].file = xlispstrdup (file); + + xfree (contents); + xfree (data); + return id; #endif #ifdef HAVE_NS @@ -1037,6 +1113,7 @@ free_bitmap_record (Display_Info *dpyinfo, Bitmap_Record *bm) #ifdef HAVE_NTGUI DeleteObject (bm->pixmap); + DeleteObject (bm->stipple); #endif /* HAVE_NTGUI */ #ifdef HAVE_NS @@ -4800,12 +4877,6 @@ convert_mono_to_color_image (struct frame *f, struct image *img, img->pixmap = new_pixmap; } -#define XBM_BIT_SHUFFLE(b) (~(b)) - -#else - -#define XBM_BIT_SHUFFLE(b) (b) - #endif /* HAVE_NTGUI */ diff --git a/src/w32term.c b/src/w32term.c index 2bcd5d86a38..3ef6d0f11f1 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -1248,6 +1248,34 @@ w32_clear_glyph_string_rect (struct glyph_string *s, real_w, real_h); } +/* Fill background with bitmap pattern from S at specified position + given by X and Y. WIDTH and HEIGHT specifies bitmap size, GC is + used to get foreground and background color context and HDC where + fill it. */ + +static void +w32_fill_stipple_pattern (HDC hdc, struct glyph_string *s, Emacs_GC *gc, + int x, int y, unsigned int width, unsigned int height) +{ + SetTextColor (hdc, gc->foreground); + SetBkColor (hdc, gc->background); + + RECT r; + Emacs_Pixmap bm; + HBRUSH hb; + + r.left = x; + r.top = y; + r.right = x + width; + r.bottom = y + height; + + bm = FRAME_DISPLAY_INFO (s->f)->bitmaps[s->face->stipple - 1].stipple; + + hb = CreatePatternBrush (bm); + FillRect (hdc, &r, hb); + + DeleteObject (hb); +} /* Draw the background of glyph_string S. If S->background_filled_p is non-zero don't draw it. FORCE_P non-zero means draw the @@ -1264,21 +1292,16 @@ w32_draw_glyph_string_background (struct glyph_string *s, bool force_p) { int box_line_width = max (s->face->box_horizontal_line_width, 0); -#if 0 /* TODO: stipple */ if (s->stippled_p) { /* Fill background with a stipple pattern. */ - XSetFillStyle (s->display, s->gc, FillOpaqueStippled); - XFillRectangle (s->display, FRAME_W32_WINDOW (s->f), s->gc, s->x, - s->y + box_line_width, - s->background_width, - s->height - 2 * box_line_width); - XSetFillStyle (s->display, s->gc, FillSolid); + w32_fill_stipple_pattern (s->hdc, s, s->gc, s->x, + s->y + box_line_width, + s->background_width, + s->height - 2 * box_line_width); s->background_filled_p = true; } - else -#endif - if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width + else if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width /* When xdisp.c ignores FONT_HEIGHT, we cannot trust font dimensions, since the actual glyphs might be much smaller. So in that case we always clear the @@ -2286,16 +2309,12 @@ w32_draw_image_foreground_1 (struct glyph_string *s, HBITMAP pixmap) static void w32_draw_glyph_string_bg_rect (struct glyph_string *s, int x, int y, int w, int h) { -#if 0 /* TODO: stipple */ if (s->stippled_p) { /* Fill background with a stipple pattern. */ - XSetFillStyle (s->display, s->gc, FillOpaqueStippled); - XFillRectangle (s->display, FRAME_W32_WINDOW (s->f), s->gc, x, y, w, h); - XSetFillStyle (s->display, s->gc, FillSolid); + w32_fill_stipple_pattern (s->hdc, s, s->gc, x, y, w, h); } else -#endif w32_clear_glyph_string_rect (s, x, y, w, h); } @@ -2500,16 +2519,12 @@ w32_draw_stretch_glyph_string (struct glyph_string *s) get_glyph_string_clip_rect (s, &r); w32_set_clip_rectangle (hdc, &r); -#if 0 /* TODO: stipple */ if (s->face->stipple) { /* Fill background with a stipple pattern. */ - XSetFillStyle (s->display, gc, FillOpaqueStippled); - XFillRectangle (s->display, FRAME_W32_WINDOW (s->f), gc, x, y, w, h); - XSetFillStyle (s->display, gc, FillSolid); + w32_fill_stipple_pattern (s->hdc, s, gc, x, y, w, h); } else -#endif { w32_fill_area (s->f, s->hdc, gc->background, x, y, w, h); } diff --git a/src/w32term.h b/src/w32term.h index a19be1a9e6a..38eac4230dd 100644 --- a/src/w32term.h +++ b/src/w32term.h @@ -58,6 +58,7 @@ #define CP_DEFAULT 1004 { Emacs_Pixmap pixmap; char *file; + Emacs_Pixmap stipple; HINSTANCE hinst; /* Used to load the file */ int refcount; /* Record some info about this pixmap. */ -- 2.44.0.windows.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 01 15:05:31 2024 Received: (at 71159) by debbugs.gnu.org; 1 Jun 2024 19:05:31 +0000 Received: from localhost ([127.0.0.1]:57413 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDU2l-0005yx-7Q for submit@debbugs.gnu.org; Sat, 01 Jun 2024 15:05:31 -0400 Received: from mail-oo1-f65.google.com ([209.85.161.65]:56329) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDU2j-0005yl-PC for 71159@debbugs.gnu.org; Sat, 01 Jun 2024 15:05:30 -0400 Received: by mail-oo1-f65.google.com with SMTP id 006d021491bc7-5b2ed25b337so2018119eaf.0 for <71159@debbugs.gnu.org>; Sat, 01 Jun 2024 12:05:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717268652; x=1717873452; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=wpnEjZsLuhmy7ZQCpGLSuUa03Ef4pEIPA+e9URtlc4o=; b=E3d6j8G03v+uY0kChOPV0yYSPK8uvy10VDx2e4gx40iz9a6l5nfjWBYszNqR8M0AGF xaWVQNxt+KyJBQ3VSJGLSYu5+4OTyOFCAd5WE/PvaTS3YeK/E2yqQ4+0Xu2DQVv7pH+V au4+w3fGi21CWlkoluhUxFGsRHAf1/p1fFhLlsT2cLWtrjYLu4x8KNHvsxFB9eB3dAjr yeXWbKxzmE1ofLmHlT7/oGwC6McPOlQAnBWCaGtY/MgIvUOvDSjPiBuK9xscpYo+wcZK PhdV6C6EoAOMl0COlW0a3wuPEpzxQClInskexUHHcr1bHj3Si/Ltaw0/OMIM+va23WRd G1KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717268652; x=1717873452; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=wpnEjZsLuhmy7ZQCpGLSuUa03Ef4pEIPA+e9URtlc4o=; b=bokcF9jaUNbBwxeioTMIzdqvFaoMMFM/JkNpldfcaQtAM11Dudvfxp6tcta6T20Mh/ aTTHR0dwHYFZNQQrKTMWyHfgwfqfUoHpr8LpRqdNCGkCyihV7rnikz+ER9HNXuEetvXl 6Xn0UdlZLcekXJgdkb8M1nnP4MOcMpzpwDrhgEKyq8Q65sl5CmSToafgtN21+4SX2FRV /NSCrSUqsp5YZkvVJ4rmOcGyt9kk2L1Em3fii8mMZhYxidwP8DnpJQT+yobbmJQbGkbJ H8FK0fvDeRAxF85TUooP7pS/tYk63ly5hAptoUF1EemlAEWlHSUak4Gorfs9WBpAqosT T0Ug== X-Gm-Message-State: AOJu0YwJtGwypZNl0TWGJFultvifcUXQWf8KKoObaZPhkP9GLe5q6vKU v9gm/FlOLLqTii2rmAROPbUTB85qENmExnYxeQZ/+GxU2/CR9C+wtstWtBDN X-Google-Smtp-Source: AGHT+IG8p57J5w0t0tAv++i7qjKWoeAxY+EogdCwb2RBhyikdw606DAJsJSUXnixon0Jvd2As5vrOQ== X-Received: by 2002:a05:6871:7986:b0:250:66f0:2a67 with SMTP id 586e51a60fabf-2508bbb6de4mr5872702fac.37.1717268651683; Sat, 01 Jun 2024 12:04:11 -0700 (PDT) Received: from LIBERO ([187.184.27.187]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-250850233f2sm1319621fac.30.2024.06.01.12.04.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jun 2024 12:04:11 -0700 (PDT) From: "Elijah G." To: Eli Zaretskii Subject: Re: bug#71159: [PATCH] Stipple support for MS Windows In-Reply-To: <86o78kohzg.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 01 Jun 2024 17:28:03 +0300") References: <86cypcuhhk.fsf@gmail.com> <86jzjcgq00.fsf@gmail.com> <86sexydekl.fsf@gmail.com> <86o78kohzg.fsf@gnu.org> Date: Sat, 01 Jun 2024 13:04:11 -0600 Message-ID: <86mso44h90.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (windows-nt) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 71159 Cc: 71159@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Eli Zaretskii writes: >> From: "Elijah G." >> Cc: Eli Zaretskii >> Date: Thu, 30 May 2024 18:12:42 -0600 >> >> I've updated the patch for delete all the conflicts generated by >> ae7d0e86b37eabc434c48f85f56df0a221e0e7c7 commit. > > Thanks, but is this the right patch? It includes a syntax error, > which GCC announces like this: > > image.c: In function 'image_create_bitmap_from_data': > image.c:627:26: error: expected ';' before 'do' > 627 | sa_avail = MAX_ALLOCA > | ^ > | ; > image.c:623:15: warning: variable 'sa_avail' set but not used [-Wunused-but-set-variable] > 623 | ptrdiff_t sa_avail; /* Used only for SAFE_NALLOCA. */ > | ^~~~~~~~ > Makefile:457: recipe for target `image.o' failed > make[2]: *** [image.o] Error 1 > > I'm guessing that you sent the wrong patch, because you couldn't have > built Emacs with this one. So, while the fix is trivial, I haven't > installed this, out of fear that other parts might be incorrect. I didn't know about that, i think it was an error that i didn't notice when i was generating the patch file, i was having troubles with my local repo. It should now be fixed in the new patch sent. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 01 21:35:11 2024 Received: (at 71159) by debbugs.gnu.org; 2 Jun 2024 01:35:11 +0000 Received: from localhost ([127.0.0.1]:57584 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDa7r-0006zO-8o for submit@debbugs.gnu.org; Sat, 01 Jun 2024 21:35:11 -0400 Received: from sonic308-10.consmr.mail.ne1.yahoo.com ([66.163.187.33]:38878) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDa7p-0006z5-6b for 71159@debbugs.gnu.org; Sat, 01 Jun 2024 21:35:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1717292090; bh=ux8UN2GQBtO5KC5t3m8PhR67A209kIPDmBCxxGfkTQ4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=GHTvTSPTrEX/dOBDyxbuh+uhrHnc5Vkh0J+zNxNL5UeWwBRGrT+n8t3y9JC2fSBaSgSLbuP8NLyqptaM+pxNq/Gy/BQYovahanvI2BzYKWu6gZtMgPwrPp3S3Nr1c0+EJck51aC00VAf5i20p7Kx87uXPbXREPnz6YfUErPv52JrWZwjCzl93y72+42za7txbuTAhUJ9MEx9jSte3HXsdnE37BPCj77jdIXmffaPMKZePzT4LPOjLvBaRa7eNQg2/DXk70BxVelUXtUN5G6MZqOQPSHOkj/TQB1kY3geejT6qDqDJ+zEBMcP4Uy8I2NeOeN90eNPFSE3eHYqXw0MyA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1717292090; bh=uID7esuA43lJ9uuYgBoAD5Su1+gA4aGKn1AQHMh++n/=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=r0dL5R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tyYlIvu H2c_UkTu4BZxRpresNcbnvoLS0OuZU64JetUEiwRIpKTx5hNBOKf3TYYB9Rlf42yCZ8sSkGVhVrq .gTeQVLaQ0YTqlmqgE9w65vZewtrwzUgikD_0aX9eG4yu3UZudE4bj15RBvL_IYDdRNDEeajd8Zk ektBDmeuW0N3_1mcbtx9U0P22mo_.4jKe4FTQh84DLvDb6MaUCF8AEEqScbfKs.FJ6mQ4XwtW7bt l5WdF4hpVZX6cldaUR4wmxs.vlRyY_8aVR_TriSeHAN7QVTyNgPREZuTVW9Ktg1MLyREgiNMusD5 bPvMiMpzQQYj.mVqDokYKjJZV6p10.IvX.HRKXar2C8N4q7kkcP7f9sOXa1e3IEj60JiKxzLCfZm xRFF8tZGPDAtmVIhmRhGLtlJdsANsP2o86DHe5._Dek0lZgRizMj_lJ06f0Z2xPbPRWSnLfkYEAr BqFYOwc1g1YjW24S4DEZsObVo6q3ZFlpr9ZIfxjrYfK7_vhiYOMdSRXocAJYaiA-- X-Sonic-MF: X-Sonic-ID: a7ed787b-f725-4310-9bd8-de0294fc94a0 Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.ne1.yahoo.com with HTTP; Sun, 2 Jun 2024 01:34:50 +0000 Received: by hermes--production-sg3-6f9f87bd85-g9bbt (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID c6ad6dbf92e4c0805fe74f57405245aa; Sun, 02 Jun 2024 01:34:47 +0000 (UTC) From: Po Lu To: "Elijah G." Subject: Re: bug#71159: [PATCH] Stipple support for MS Windows In-Reply-To: <86r0dg4hpd.fsf@gmail.com> (Elijah G.'s message of "Sat, 01 Jun 2024 12:54:22 -0600") References: <86cypcuhhk.fsf@gmail.com> <86jzjcgq00.fsf@gmail.com> <86sexydekl.fsf@gmail.com> <87ed9gkber.fsf@yahoo.com> <86r0dg4hpd.fsf@gmail.com> Date: Sun, 02 Jun 2024 09:34:42 +0800 Message-ID: <87zfs4i0ul.fsf@yahoo.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.22407 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 137 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71159 Cc: 71159@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) "Elijah G." writes: > Yes, i forgot about it, it's fixed. Have you assigned copyright for this change to the FSF? From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 01 21:42:09 2024 Received: (at 71159) by debbugs.gnu.org; 2 Jun 2024 01:42:09 +0000 Received: from localhost ([127.0.0.1]:57593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDaEb-00079H-F0 for submit@debbugs.gnu.org; Sat, 01 Jun 2024 21:42:09 -0400 Received: from mail-oa1-f66.google.com ([209.85.160.66]:57447) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDaEZ-000794-JW for 71159@debbugs.gnu.org; Sat, 01 Jun 2024 21:42:08 -0400 Received: by mail-oa1-f66.google.com with SMTP id 586e51a60fabf-24c9f91242dso1796064fac.2 for <71159@debbugs.gnu.org>; Sat, 01 Jun 2024 18:41:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717292450; x=1717897250; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=Gju4trpuyhKQweI41deJrxSM30bqIZwfkyRO3T299iE=; b=GmH5aHJuyZGwt0GxhWeKc0gZqCVUhS9anG75wXb6y1jIHo9GOyArM8o1DBb5YKgeFW NsNidIsQ6JeUD09KuMz2sDCftkiV9AlCaLE29ahRGpfVfAS6sYpfQmZkX4/+HC/naEBe uzFaGfjVFHZ0z6eNrggn7zEleth6K64SfHeCN5p5zUNPAVZ7Ihyx5OSQQuCbfhssDavr WqxqrZqynHf1czYJiCNeCZrGX89s6UEmjQdkqqeybvol5mVttS6IN/7wsyIYT2QZNXii fw1ySCfObvK1BeJ3pJyVAHViuZZOWwyG3Pn5ckl5OMKFBfIVZi/+YxuN2H3QUroDWqn0 pluw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717292450; x=1717897250; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Gju4trpuyhKQweI41deJrxSM30bqIZwfkyRO3T299iE=; b=A70XrIXxQvwcq8n/0axdHE8bmcOCvq20ELZmZt9GKqHsEVByaA9CFKCNRwC2D7E4Yf pPIgn1eCD7dHX9R6bS0o/DcVHxlQlztirb29OhcfY2XIwMATcbX8CNBla1kVHiAVnBcn /CFaEFRqlzcUFj3IkRndWeTwcLjB4UrSQIChPFm/KbT/OHqzxp40MV95zPsjO7rd9Pk1 R9d26jlry1jwpdWxSXuct6mBd4I3tUfDx49HttOkqh/QKQ+NpaK+3nrYzCsz0nFkyGH5 pxWBO7TqXpBk4h5CYmKc42SokNXcnmM9PnVD78dL2BpNwFVbAKnrxEkr2g+G9lHCDXT7 +kLg== X-Gm-Message-State: AOJu0YzynNGT3wlXwGfyXB7CXL8NM6VEQLsNJiiYbbubwc4ON8fjcHFT 3cylkzlCQTLC5B3voyp3UPvWG2UTnLNxmBEtPRJ7nFjt/9uX8OJp X-Google-Smtp-Source: AGHT+IEbyHp1LHhHJ3z2xyWlUvKAFBqML4fc8f51EU+AczdkLdlezbbOUaon6la1Fn0zwpQd37OIFQ== X-Received: by 2002:a05:6870:6493:b0:24f:f51e:e3a8 with SMTP id 586e51a60fabf-2508b831492mr6479064fac.4.1717292449837; Sat, 01 Jun 2024 18:40:49 -0700 (PDT) Received: from LIBERO ([187.184.27.187]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-250853cadf9sm1497220fac.57.2024.06.01.18.40.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jun 2024 18:40:49 -0700 (PDT) From: "Elijah G." To: Po Lu Subject: Re: bug#71159: [PATCH] Stipple support for MS Windows In-Reply-To: <87zfs4i0ul.fsf@yahoo.com> (Po Lu's message of "Sun, 02 Jun 2024 09:34:42 +0800") References: <86cypcuhhk.fsf@gmail.com> <86jzjcgq00.fsf@gmail.com> <86sexydekl.fsf@gmail.com> <87ed9gkber.fsf@yahoo.com> <86r0dg4hpd.fsf@gmail.com> <87zfs4i0ul.fsf@yahoo.com> Date: Sat, 01 Jun 2024 19:40:48 -0600 Message-ID: <86r0dgm89r.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (windows-nt) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 71159 Cc: 71159@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Po Lu writes: > "Elijah G." writes: > >> Yes, i forgot about it, it's fixed. > > Have you assigned copyright for this change to the FSF? Yes, I already have assigned the copyright for my future changes. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 01 21:49:56 2024 Received: (at 71159) by debbugs.gnu.org; 2 Jun 2024 01:49:56 +0000 Received: from localhost ([127.0.0.1]:57598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDaM8-0007K4-F9 for submit@debbugs.gnu.org; Sat, 01 Jun 2024 21:49:56 -0400 Received: from sonic309-22.consmr.mail.ne1.yahoo.com ([66.163.184.148]:35169) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDaM7-0007Js-7J for 71159@debbugs.gnu.org; Sat, 01 Jun 2024 21:49:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1717292977; bh=IuoFbOJ6RnPYwQ5WRgqXXZjRgjPU2MxPY26PtFYutQU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=nVClv21w6NqvetS0bXrtfrhXDjVSMNG052d1bwO24IsJzARPSXY7cLmR67KY6YxJm5kMPibny2Wjqj/zFHtmMIbKOtAC1tZzBPLIUXvuE4pnN1Fkq29iVNbOJ1hBrTE9T0ZFZSaLHhDQvgQGRvhFe8g4EF+7WWgqba21zcZSDzK9PK1oeDQTT8W5CUvXN5Y9jKSJ/t+v1G4w36/stAhEra0nlXHsWeQLHsXZjOjGNG0EQGtTvQ2GzVlPUC2E+k/m7hcuEmRekU2nrc5nMDPeFnlN7dTuieYQFja8kJsYu847EDiIWQK3hHN1px0+xJL9NrlDLlOaNdKSuOoUaRCxNQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1717292977; bh=d0CtuQdEJJ2wcdUiD6Wb4q4CwEQJhW10KliSsfMHVdj=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=bhhg1OwkGX0tMiNYSqrh0Ag+51MqV1axel5lQ/R3rBJm5aYz/yuydNMI99roMTtgOy95da51kLIs1iWorm5r/nVf2BxbYcMBOWrXYyvt2NYtoAQYeS6EvGTgdhKqioedgZ9j4LQ8khmYD+I2K4tGd2gvBaUDoHO8uqVbXvle2+AO0pyE+odkSed+FyWjgCmlbojnO6y0NEGNNcZgw84SVVUbysPE850gB+/APIx5lgiqTq4ivlA2GZgoD1aW9Vp/xEIkvsMN1FN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ouyP9ZBnko78VfXJPdr0tj10JXzcpBvVcCYgU779BXr1IsW8.3NZZTXzdztxhXpenKu r9qirgubSoSw.L0ZZS9dVosZ5odipYg8_YRgZ9NcbR4W5aozsJPChf2Qll0g3Z4ja8kKWU9239Ot 8ZmQjlna3rcg95HajjawAJbBebOVNJ5Spr8KW7ZsUgmdA2GAVA1jqX.PF0hBfPG7FAnRjVYCfO4H PEOuH9Xk.pr.zMA3bOUutnjAUqJ05tA0Lb80yR0.iGTcZwOdAH7xk03o6DBTj17IZ_Q-- X-Sonic-MF: X-Sonic-ID: 36848fc8-84fa-4d7a-9e93-dcf590139937 Received: from sonic.gate.mail.ne1.yahoo.com by sonic309.consmr.mail.ne1.yahoo.com with HTTP; Sun, 2 Jun 2024 01:49:37 +0000 Received: by hermes--production-sg3-6f9f87bd85-r6w59 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID ccf0a14efe94bb00be05a2e87cc2c282; Sun, 02 Jun 2024 01:49:31 +0000 (UTC) From: Po Lu To: "Elijah G." Subject: Re: bug#71159: [PATCH] Stipple support for MS Windows In-Reply-To: <86r0dgm89r.fsf@gmail.com> (Elijah G.'s message of "Sat, 01 Jun 2024 19:40:48 -0600") References: <86cypcuhhk.fsf@gmail.com> <86jzjcgq00.fsf@gmail.com> <86sexydekl.fsf@gmail.com> <87ed9gkber.fsf@yahoo.com> <86r0dg4hpd.fsf@gmail.com> <87zfs4i0ul.fsf@yahoo.com> <86r0dgm89r.fsf@gmail.com> Date: Sun, 02 Jun 2024 09:49:26 +0800 Message-ID: <87v82si061.fsf@yahoo.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.22407 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 393 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71159 Cc: 71159@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) "Elijah G." writes: > Po Lu writes: > >> "Elijah G." writes: >> >>> Yes, i forgot about it, it's fixed. >> >> Have you assigned copyright for this change to the FSF? > > Yes, I already have assigned the copyright for my future changes. Very well. Eli, have you any further objections to this patch, or should I install it now. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 02 00:54:55 2024 Received: (at 71159) by debbugs.gnu.org; 2 Jun 2024 04:54:56 +0000 Received: from localhost ([127.0.0.1]:57655 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDdF9-0003CI-Kd for submit@debbugs.gnu.org; Sun, 02 Jun 2024 00:54:55 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37330) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDdF7-0003C5-Rc for 71159@debbugs.gnu.org; Sun, 02 Jun 2024 00:54:54 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sDdEq-00041v-8u; Sun, 02 Jun 2024 00:54:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=p0oxj57TiFC4ENTD1pqXa8YbQ5mOjaXCJPg88npMWIc=; b=hEoi7DOz8v1F WRBtZmL2l5zNdY5ZNGo2poTRywAEOuwME51i2rxXpVNaKD2Dxl07ONPuRqc1GWEvygsyxT2YADZyx qpxLkao5+6giACkvzFGpW5JaR0KB0DIGO2MO9PckzHeIVFfZgcAlsZ0MewoeNPwWQ9Mgi+TPVHVSY XL8eaNFAPi4tfZjjozhpcX6Lq8TFRNAPjb76eLI3OHvQEPHNIHCsCaj35G3WjUyl/U+ZG9wEUrGhA yoSTeGDwKV1BWmrB7jBaCTSJSRy5qeaCDygN5hgYKty39izRp3Gr/GcFKD7TcORKcQGOx6DmaM4mR ebM53t8Dp4v7tphjb8OApg==; Date: Sun, 02 Jun 2024 07:54:34 +0300 Message-Id: <867cf8ndv9.fsf@gnu.org> From: Eli Zaretskii To: "Elijah G." In-Reply-To: <86r0dg4hpd.fsf@gmail.com> (eg642616@gmail.com) Subject: Re: bug#71159: [PATCH] Stipple support for MS Windows References: <86cypcuhhk.fsf@gmail.com> <86jzjcgq00.fsf@gmail.com> <86sexydekl.fsf@gmail.com> <87ed9gkber.fsf@yahoo.com> <86r0dg4hpd.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71159 Cc: luangruo@yahoo.com, 71159@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: "Elijah G." > Cc: Po Lu , 71159@debbugs.gnu.org, Eli Zaretskii > > Date: Sat, 01 Jun 2024 12:54:22 -0600 > > --- a/etc/NEWS > +++ b/etc/NEWS > @@ -2827,6 +2827,9 @@ thumbnail images and show them in the thumbnail buffer. Unlike with > using 'convert', this fallback method is synchronous, so Emacs will wait > until all the thumbnails are created and displayed, before showing them. > > +--- > +*** Emacs on MS-Windows now supports the :stipple face attribute This should end with a period, and :stipple should be quoted as ':stipple'. > + Emacs_Pixmap stipple, bitmap; > bitmap = CreateBitmap (width, height, > - FRAME_DISPLAY_INFO (XFRAME (frame))->n_planes, > - FRAME_DISPLAY_INFO (XFRAME (frame))->n_cbits, > + dpyinfo->n_planes, > + dpyinfo->n_cbits, > bits); Please rewrite this as follows: Emacs_Pixmap stipple; Emacs_Pixmap bitmap = CreateBitmap (width, height, dpyinfo->n_planes, dpyinfo->n_cbits, bits); > + { > + char *invertedBits; > + int nbytes, i; > + > + invertedBits = bits; > + nbytes = (width + CHAR_BIT - 1) / CHAR_BIT * height; Also here, please initialize the local variables where appropriate: { char invertedBits = bits; int nbytes = (width + CHAR_BIT - 1) / CHAR_BIT * height, i; Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 02 00:55:21 2024 Received: (at 71159) by debbugs.gnu.org; 2 Jun 2024 04:55:21 +0000 Received: from localhost ([127.0.0.1]:57660 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDdFZ-0003DW-1b for submit@debbugs.gnu.org; Sun, 02 Jun 2024 00:55:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36442) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDdFW-0003DF-1y for 71159@debbugs.gnu.org; Sun, 02 Jun 2024 00:55:19 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sDdFE-00042w-Iw; Sun, 02 Jun 2024 00:55:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=To9kFCZSIiHh/gx9gr7INi5COm0NA2v2SFaiAPTEdOs=; b=NjHuVuzx54Mc RMZJd2qudbRMt+ke4rHpKUYR07s70Rgk5B3eM5joAeUBrp/It5+VMJavy8GfsC/FfsH2/A9VS+2Im uVjQOHHtuzbMDp4VVeOhP8GA2miW7x70urLGQkyNahn4RlFniitsnPF2Be1yhYD1FKFX4VZZl+wtr mknjnIDQOZPZ6TLu70XqBCGQ+F+jS1XBZ0Yiv6nqOfWfj5VrELiOG+KQt7RDS02Z+KvYjVaFdmIzA PBMT4mvNhvk7tYeVj67+5TSxaxeHuxB+aBnaezRFdeIlfjaUf3k+kWXkgI1LdZCNp/4UNqINpb9+Z BrLGkhogtRcWUPa3a8a1vA==; Date: Sun, 02 Jun 2024 07:54:57 +0300 Message-Id: <865xusndum.fsf@gnu.org> From: Eli Zaretskii To: Po Lu In-Reply-To: <87v82si061.fsf@yahoo.com> (message from Po Lu on Sun, 02 Jun 2024 09:49:26 +0800) Subject: Re: bug#71159: [PATCH] Stipple support for MS Windows References: <86cypcuhhk.fsf@gmail.com> <86jzjcgq00.fsf@gmail.com> <86sexydekl.fsf@gmail.com> <87ed9gkber.fsf@yahoo.com> <86r0dg4hpd.fsf@gmail.com> <87zfs4i0ul.fsf@yahoo.com> <86r0dgm89r.fsf@gmail.com> <87v82si061.fsf@yahoo.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71159 Cc: 71159@debbugs.gnu.org, eg642616@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Po Lu > Cc: 71159@debbugs.gnu.org, Eli Zaretskii > Date: Sun, 02 Jun 2024 09:49:26 +0800 > > "Elijah G." writes: > > > Po Lu writes: > > > >> "Elijah G." writes: > >> > >>> Yes, i forgot about it, it's fixed. > >> > >> Have you assigned copyright for this change to the FSF? > > > > Yes, I already have assigned the copyright for my future changes. > > Very well. Eli, have you any further objections to this patch, or > should I install it now. I just sent a few more comments. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 02 01:29:19 2024 Received: (at 71159) by debbugs.gnu.org; 2 Jun 2024 05:29:20 +0000 Received: from localhost ([127.0.0.1]:57675 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDdmR-0004gx-4T for submit@debbugs.gnu.org; Sun, 02 Jun 2024 01:29:19 -0400 Received: from mail-oo1-f65.google.com ([209.85.161.65]:54694) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDdmO-0004gc-Ba for 71159@debbugs.gnu.org; Sun, 02 Jun 2024 01:29:17 -0400 Received: by mail-oo1-f65.google.com with SMTP id 006d021491bc7-5b96a781b63so1611148eaf.1 for <71159@debbugs.gnu.org>; Sat, 01 Jun 2024 22:29:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717306078; x=1717910878; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=sA4C2zvr3BzFEqPflJ4lVEw0CnK8FivPlQW18TvvP4s=; b=bJzDhyF9Lc4CF/lk16eeWX7hhnTk5+b4vELFkgRg6140GUw3X//vPaNT+ty+lwIVTk qx7H58pd6CVbKSC+STKP0F4TWVZU6Mn0R59BAjrsOP7wdpD1X+1y7FXlHre8x2fcEIFj VtMul+/sQ7XlfTU282Xmmq+BjN5UPzrcjT4B3+748Z5SZUfGuhxDtDBvsYAXWrUrut4E XHxGYusmJKlL7PBrKXU4RRmSa1R6sO71jWE8Tndtc9f8jMLLFAPq5wGi/jeWTGltJhZg 3C9p29+mbo6gRk947o/2iiWl5EldZQ0hJypx2qHiLxM53wi1UlQVwWRQb8wNwf6HOCZs /w0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717306078; x=1717910878; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=sA4C2zvr3BzFEqPflJ4lVEw0CnK8FivPlQW18TvvP4s=; b=soEr3qhjVaMjDbuIx7aHvbp9Fa2EjWIUC3YiYBDszjcZy1KSY5DEOCJcuiz1muGMW5 qPenw0kik2/Cy8Ec9Q0PBrMKCEp3B+atzWTfWnBwcdz8evs9imk9K750UnzPs7SfAGJE Lt9ACJEMOG+9V7rgSzEK7cCWLadI0mCLABjQUoyxZcCnBkKf4EeEdyvKEEP3IfSRb5di 9g/Y83gRPU5T+WQ3yOuicNAs11P2O98NVSpiQ0dXj2uThrNiIET/zoTwTsT5jUsrmRNQ 589031MfY0vbFDG2LiyS/qg+A3fVApNdpFxxTuNxr/dk0DZtYR5s5dKyzwEbkz3ou+R3 5b0w== X-Forwarded-Encrypted: i=1; AJvYcCV3/QKDjs1YsWals3NWf78bKif1FjUocipjVb9KaMgtC0LpeV5O6i6oEm7z6glRRnxJWB0UTvutzeA/Qqvu7YpqAOfJ6RI= X-Gm-Message-State: AOJu0YzraGZvFrWYV+6fjeu3Ru8Jc3Z7cI5L8vxKGl2E8JYzIrJ8J39O lCRr7pQiflF+3iuCRsv2bIx8iNSS4vud9sMGPvRCgWMOVbKpEKDGHuWrzScD X-Google-Smtp-Source: AGHT+IEis7/dlU4oUw2LIPWR46ekortfrnCrG7WHnx+GrK6lmHjhGsuGglZs9cTcTmGFtpW906MWXA== X-Received: by 2002:a05:6820:511:b0:5b9:88d1:fd1d with SMTP id 006d021491bc7-5ba05d33c60mr6292479eaf.6.1717306078082; Sat, 01 Jun 2024 22:27:58 -0700 (PDT) Received: from LIBERO ([187.184.27.187]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-5ba004b3eb6sm1000924eaf.34.2024.06.01.22.27.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jun 2024 22:27:57 -0700 (PDT) From: "Elijah G." To: Eli Zaretskii Subject: Re: bug#71159: [PATCH] Stipple support for MS Windows In-Reply-To: <867cf8ndv9.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 02 Jun 2024 07:54:34 +0300") References: <86cypcuhhk.fsf@gmail.com> <86jzjcgq00.fsf@gmail.com> <86sexydekl.fsf@gmail.com> <87ed9gkber.fsf@yahoo.com> <86r0dg4hpd.fsf@gmail.com> <867cf8ndv9.fsf@gnu.org> Date: Sat, 01 Jun 2024 23:27:58 -0600 Message-ID: <86jzj7rk0x.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (windows-nt) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 2.3 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Thank you, i've fixed now the patch. From 5b92c1e284bacd4661336228395c751bfe730666 Mon Sep 17 00:00:00 2001 From: "Elias G. Perez" Date: Fri, 10 May 2024 20:36:42 -0600 Subject: [PATCH] Stipple support for MS Windows Content analysis details: (2.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: r.top (top)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (eg642616[at]gmail.com) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (eg642616[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.161.65 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.161.65 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: 71159 Cc: luangruo@yahoo.com, 71159@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Thank you, i've fixed now the patch. From 5b92c1e284bacd4661336228395c751bfe730666 Mon Sep 17 00:00:00 2001 From: "Elias G. Perez" Date: Fri, 10 May 2024 20:36:42 -0600 Subject: [PATCH] Stipple support for MS Windows Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.161.65 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.161.65 listed in list.dnswl.org] 2.0 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: r.top (top)] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (eg642616[at]gmail.com) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (eg642616[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager --=-=-= Content-Type: text/plain Thank you, i've fixed now the patch. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Stipple-support-for-MS-Windows.patch >From 5b92c1e284bacd4661336228395c751bfe730666 Mon Sep 17 00:00:00 2001 From: "Elias G. Perez" Date: Fri, 10 May 2024 20:36:42 -0600 Subject: [PATCH] Stipple support for MS Windows * etc/NEWS: Announce support for stipples in MS-Windows. * src/w32term.h (w32_bitmap_record): Add stipple value. * src/w32term.c (w32_fill_stipple_pattern): New function. (w32_draw_glyph_string_background) (w32_draw_glyph_string_bg_rect w32_draw_stretch_glyph_string): Use new stipple function. * src/image.c (image_create_bitmap_from_data): Create stipple bitmap. (image_create_bitmap_from_file): Add suuport for pixmap and create stipple bitmap. (free_bitmap_record): Release stipple. --- etc/NEWS | 3 ++ src/image.c | 102 +++++++++++++++++++++++++++++++++++++++++--------- src/w32term.c | 55 +++++++++++++++++---------- src/w32term.h | 1 + 4 files changed, 124 insertions(+), 37 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 3c672ffed8f..7106089d6c7 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2827,6 +2827,9 @@ thumbnail images and show them in the thumbnail buffer. Unlike with using 'convert', this fallback method is synchronous, so Emacs will wait until all the thumbnails are created and displayed, before showing them. +--- +*** Emacs on MS-Windows now supports the ':stipple' face attribute. + ---------------------------------------------------------------------- This file is part of GNU Emacs. diff --git a/src/image.c b/src/image.c index 3138ef25a63..321073a4fd9 100644 --- a/src/image.c +++ b/src/image.c @@ -130,6 +130,12 @@ #define NO_PIXMAP 0 #define PIX_MASK_RETAIN 0 #define PIX_MASK_DRAW 1 +#define XBM_BIT_SHUFFLE(b) (~(b)) + +#else + +#define XBM_BIT_SHUFFLE(b) (b) + #endif /* HAVE_NTGUI */ #ifdef HAVE_NS @@ -214,6 +220,11 @@ #define n_planes n_image_planes static unsigned long *colors_in_color_table (int *n); #endif +#ifdef HAVE_NTGUI +static HBITMAP w32_create_pixmap_from_bitmap_data (int, int, char *); + +#endif + #if defined (HAVE_WEBP) || defined (HAVE_GIF) static void anim_prune_animation_cache (Lisp_Object); #endif @@ -596,13 +607,31 @@ image_create_bitmap_from_data (struct frame *f, char *bits, #endif /* HAVE_ANDROID && !defined ANDROID_STUBIFY */ #ifdef HAVE_NTGUI - Lisp_Object frame UNINIT; /* The value is not used. */ - Emacs_Pixmap bitmap; - bitmap = CreateBitmap (width, height, - FRAME_DISPLAY_INFO (XFRAME (frame))->n_planes, - FRAME_DISPLAY_INFO (XFRAME (frame))->n_cbits, - bits); - if (! bitmap) + Emacs_Pixmap stipple; + Emacs_Pixmap bitmap = CreateBitmap (width, height, dpyinfo->n_planes, + dpyinfo->n_cbits, bits); + + /* Convert X bitmap to W32 bitmap. */ + /* Windows mono bitmaps are reversed compared with X. */ + USE_SAFE_ALLOCA; + + { + char *invertedBits; + int nbytes = (width + CHAR_BIT - 1) / CHAR_BIT * height, i; + + invertedBits = bits; + + SAFE_NALLOCA (bits, 1, nbytes); + + for (i = 0; i < nbytes; i++) + bits[i] = XBM_BIT_SHUFFLE (invertedBits[i]); + } + + stipple = w32_create_pixmap_from_bitmap_data (width, height, bits); + + SAFE_FREE (); + + if (!bitmap || !stipple) return -1; #endif /* HAVE_NTGUI */ @@ -681,6 +710,7 @@ image_create_bitmap_from_data (struct frame *f, char *bits, #ifdef HAVE_NTGUI dpyinfo->bitmaps[id - 1].pixmap = bitmap; + dpyinfo->bitmaps[id - 1].stipple = stipple; dpyinfo->bitmaps[id - 1].hinst = NULL; dpyinfo->bitmaps[id - 1].depth = 1; #endif /* HAVE_NTGUI */ @@ -699,7 +729,7 @@ image_create_bitmap_from_data (struct frame *f, char *bits, #endif /* defined HAVE_ANDROID && !defined ANDROID_STUBIFY */ #if defined HAVE_HAIKU || defined HAVE_NS || defined HAVE_PGTK \ - || defined HAVE_ANDROID + || defined HAVE_ANDROID || defined HAVE_NTGUI static char *slurp_file (image_fd, ptrdiff_t *); static Lisp_Object image_find_image_fd (Lisp_Object, image_fd *); static bool xbm_read_bitmap_data (struct frame *, char *, char *, @@ -711,10 +741,53 @@ image_create_bitmap_from_data (struct frame *f, char *bits, ptrdiff_t image_create_bitmap_from_file (struct frame *f, Lisp_Object file) { -#if defined (HAVE_NTGUI) - return -1; /* W32_TODO : bitmap support */ -#else Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f); + +#ifdef HAVE_NTGUI + ptrdiff_t id, size; + int width, height, rc; + image_fd fd; + char *contents, *data; + Emacs_Pixmap bitmap; + + if (!STRINGP (image_find_image_fd (file, &fd))) + return -1; + + contents = slurp_file (fd, &size); + + if (!contents) + return -1; + + rc = xbm_read_bitmap_data (f, contents, contents + size, + &width, &height, &data, 0); + + if (!rc) + { + xfree (contents); + return -1; + } + + { + /* Windows mono bitmaps are reversed compared with X. */ + + int nbytes, i; + nbytes = (width + CHAR_BIT - 1) / CHAR_BIT * height; + + for (i = 0; i < nbytes; i++) + data[i] = XBM_BIT_SHUFFLE (data[i]); + } + + id = image_allocate_bitmap_record (f); + bitmap = w32_create_pixmap_from_bitmap_data (width, height, data); + + dpyinfo->bitmaps[id - 1].height = width; + dpyinfo->bitmaps[id - 1].width = height; + dpyinfo->bitmaps[id - 1].stipple = bitmap; + dpyinfo->bitmaps[id - 1].file = xlispstrdup (file); + + xfree (contents); + xfree (data); + return id; #endif #ifdef HAVE_NS @@ -1037,6 +1110,7 @@ free_bitmap_record (Display_Info *dpyinfo, Bitmap_Record *bm) #ifdef HAVE_NTGUI DeleteObject (bm->pixmap); + DeleteObject (bm->stipple); #endif /* HAVE_NTGUI */ #ifdef HAVE_NS @@ -4800,12 +4874,6 @@ convert_mono_to_color_image (struct frame *f, struct image *img, img->pixmap = new_pixmap; } -#define XBM_BIT_SHUFFLE(b) (~(b)) - -#else - -#define XBM_BIT_SHUFFLE(b) (b) - #endif /* HAVE_NTGUI */ diff --git a/src/w32term.c b/src/w32term.c index 2bcd5d86a38..3ef6d0f11f1 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -1248,6 +1248,34 @@ w32_clear_glyph_string_rect (struct glyph_string *s, real_w, real_h); } +/* Fill background with bitmap pattern from S at specified position + given by X and Y. WIDTH and HEIGHT specifies bitmap size, GC is + used to get foreground and background color context and HDC where + fill it. */ + +static void +w32_fill_stipple_pattern (HDC hdc, struct glyph_string *s, Emacs_GC *gc, + int x, int y, unsigned int width, unsigned int height) +{ + SetTextColor (hdc, gc->foreground); + SetBkColor (hdc, gc->background); + + RECT r; + Emacs_Pixmap bm; + HBRUSH hb; + + r.left = x; + r.top = y; + r.right = x + width; + r.bottom = y + height; + + bm = FRAME_DISPLAY_INFO (s->f)->bitmaps[s->face->stipple - 1].stipple; + + hb = CreatePatternBrush (bm); + FillRect (hdc, &r, hb); + + DeleteObject (hb); +} /* Draw the background of glyph_string S. If S->background_filled_p is non-zero don't draw it. FORCE_P non-zero means draw the @@ -1264,21 +1292,16 @@ w32_draw_glyph_string_background (struct glyph_string *s, bool force_p) { int box_line_width = max (s->face->box_horizontal_line_width, 0); -#if 0 /* TODO: stipple */ if (s->stippled_p) { /* Fill background with a stipple pattern. */ - XSetFillStyle (s->display, s->gc, FillOpaqueStippled); - XFillRectangle (s->display, FRAME_W32_WINDOW (s->f), s->gc, s->x, - s->y + box_line_width, - s->background_width, - s->height - 2 * box_line_width); - XSetFillStyle (s->display, s->gc, FillSolid); + w32_fill_stipple_pattern (s->hdc, s, s->gc, s->x, + s->y + box_line_width, + s->background_width, + s->height - 2 * box_line_width); s->background_filled_p = true; } - else -#endif - if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width + else if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width /* When xdisp.c ignores FONT_HEIGHT, we cannot trust font dimensions, since the actual glyphs might be much smaller. So in that case we always clear the @@ -2286,16 +2309,12 @@ w32_draw_image_foreground_1 (struct glyph_string *s, HBITMAP pixmap) static void w32_draw_glyph_string_bg_rect (struct glyph_string *s, int x, int y, int w, int h) { -#if 0 /* TODO: stipple */ if (s->stippled_p) { /* Fill background with a stipple pattern. */ - XSetFillStyle (s->display, s->gc, FillOpaqueStippled); - XFillRectangle (s->display, FRAME_W32_WINDOW (s->f), s->gc, x, y, w, h); - XSetFillStyle (s->display, s->gc, FillSolid); + w32_fill_stipple_pattern (s->hdc, s, s->gc, x, y, w, h); } else -#endif w32_clear_glyph_string_rect (s, x, y, w, h); } @@ -2500,16 +2519,12 @@ w32_draw_stretch_glyph_string (struct glyph_string *s) get_glyph_string_clip_rect (s, &r); w32_set_clip_rectangle (hdc, &r); -#if 0 /* TODO: stipple */ if (s->face->stipple) { /* Fill background with a stipple pattern. */ - XSetFillStyle (s->display, gc, FillOpaqueStippled); - XFillRectangle (s->display, FRAME_W32_WINDOW (s->f), gc, x, y, w, h); - XSetFillStyle (s->display, gc, FillSolid); + w32_fill_stipple_pattern (s->hdc, s, gc, x, y, w, h); } else -#endif { w32_fill_area (s->f, s->hdc, gc->background, x, y, w, h); } diff --git a/src/w32term.h b/src/w32term.h index a19be1a9e6a..38eac4230dd 100644 --- a/src/w32term.h +++ b/src/w32term.h @@ -58,6 +58,7 @@ #define CP_DEFAULT 1004 { Emacs_Pixmap pixmap; char *file; + Emacs_Pixmap stipple; HINSTANCE hinst; /* Used to load the file */ int refcount; /* Record some info about this pixmap. */ -- 2.44.0.windows.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 02 02:37:34 2024 Received: (at 71159-done) by debbugs.gnu.org; 2 Jun 2024 06:37:35 +0000 Received: from localhost ([127.0.0.1]:57699 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDeqU-0007VK-M6 for submit@debbugs.gnu.org; Sun, 02 Jun 2024 02:37:34 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37272) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDeqT-0007V4-79 for 71159-done@debbugs.gnu.org; Sun, 02 Jun 2024 02:37:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sDeq9-0002de-47; Sun, 02 Jun 2024 02:37:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=9YJMvLKFAvbuxB+zG4MUvf3LYM2R7seJcepa0ABilek=; b=F57oaYWWFSNV qpfWV2dbjOWUZ7nQEtlWRbXkNHT7g2tphBuPtfQanGCMJgiSsPrXXSA80ozIYn5wX6QZ/nssh/FLT Dx5Gl5Hf68NYa4xVJUAH8teD3ZlkvcH0f3wPKpzdm91qRyIgWjapkF/gIZlwahuOu8SmshM6T7mK4 qKCpbR/AHAiJNUc+svtl3VdeJgNNIVf1oUUrdhFVS/1HVafyW79gzxta/B5U3/bLmnyMjhT7YMKnS 9VKlwn1iXsrrkxyX8H4BQn3ry6+4MX+ULfU5190ev0lXmIPpjwlOlNFAxUja9ntli1LgoGsCorNtl KRjFeFi9whrXgl7FOTrTUw==; Date: Sun, 02 Jun 2024 09:37:08 +0300 Message-Id: <86zfs3n94b.fsf@gnu.org> From: Eli Zaretskii To: "Elijah G." In-Reply-To: <86jzj7rk0x.fsf@gmail.com> (eg642616@gmail.com) Subject: Re: bug#71159: [PATCH] Stipple support for MS Windows References: <86cypcuhhk.fsf@gmail.com> <86jzjcgq00.fsf@gmail.com> <86sexydekl.fsf@gmail.com> <87ed9gkber.fsf@yahoo.com> <86r0dg4hpd.fsf@gmail.com> <867cf8ndv9.fsf@gnu.org> <86jzj7rk0x.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71159-done Cc: luangruo@yahoo.com, 71159-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: "Elijah G." > Cc: luangruo@yahoo.com, 71159@debbugs.gnu.org > Date: Sat, 01 Jun 2024 23:27:58 -0600 > > Thank you, i've fixed now the patch. Thanks, installed on the master branch, and closing the bug. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 02 03:56:58 2024 Received: (at 71159) by debbugs.gnu.org; 2 Jun 2024 07:56:58 +0000 Received: from localhost ([127.0.0.1]:57746 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDg5K-0003sw-7s for submit@debbugs.gnu.org; Sun, 02 Jun 2024 03:56:58 -0400 Received: from sonic307-56.consmr.mail.ne1.yahoo.com ([66.163.190.31]:34696) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDg5I-0003sd-73 for 71159@debbugs.gnu.org; Sun, 02 Jun 2024 03:56:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1717314998; bh=fwRa33Xk8rS3tYpdS3NzWtVEh5XaPvRx3MHL6+4Xv6E=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=Iol71HpJSsfkYd5Y+2xmiMgI5U/VnRmlANbmHkrS+rJwmbMBZrEbtcEFgOmt/q+N3q/PAkIwUO22ZqghT89PL5tSGvUbM7kvJzoiP2x3T3iyCiv3w3kVxx3QsDbZmqtqEiVeH6cKKF5zFomGsq9WwUH0VsN9p5goI2PMr8TSknjBAks6qAxM/tptEl3TQZrDDA/nTuuG0HhOC1Hq+gjNnsKe51NkPNc50pGOnHxWWPtdFT6Ptv/fuUhC0o/00bjTx4T+hregGDx5Z7V+t9o9W72PM5tAYPIxxCetrDtLtor/GBUAGoUL1IwJoDjhlxGXuqe74LdN9iSARDdYFGpHUw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1717314998; bh=muT8wP/TpadOLAqfvXXKNFGADetEGGfMoBv4MqPHm/5=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=e+QyKEFvuCSZ1vRnxvWRnQ3V+9qSHWoNYn5BO+NZMCvFoYgs74I5YjGwpClbbnzV0TMme6H4r3vLcTMviSgA5ekEUZfQjZLXMPBiPzs3EMMqIsq6CiTr1KJSStVSHrfQBdIHPzWko83ccusD0abaOlCpxLb8nQ1YvoGqcMSB353XT0d0PaZG5LGpM0RcZJQkj1/2zjmQDhOSqTWdVzc+3Q0lStGXUAoIIqjkJ57ft2+yVX5vuDYjSXo9YbyMNSZ2hxCbQKFyQ/MYR6xUAHm1hQTUygoYPQQ8XoP7Yt/MgP3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leC5UgQntZhEyIcmB04GHPW2_W vW9jox5I95uQRyiQ3Qmoq41.mBpMjt_3Ue1W91Oix6qn8BLGacgHrqq6Xtf.N05tHtWTWMqSXq2L HceWO7HJb4k5zEl9cj2CwMpbATze5xzj3fW7pVpeT3xnOrYivcmBFEhzoB5HkUkHx24hu0PB2eV6 yGQDKk1RKQ5KrsS6Q.Xm_5D3gfL5t5gWGSBRd9oZ.VWZWpg0e1Hbg_.P.Vk0IpN8icg-- X-Sonic-MF: X-Sonic-ID: f9e3901b-6c52-4182-a0e5-3e1ab6b41083 Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.ne1.yahoo.com with HTTP; Sun, 2 Jun 2024 07:56:38 +0000 Received: by hermes--production-sg3-6f9f87bd85-rtgn9 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 52dcf892556a5ac56a402f9e0616c243; Sun, 02 Jun 2024 07:56:33 +0000 (UTC) From: Po Lu To: Eli Zaretskii Subject: Re: bug#71159: [PATCH] Stipple support for MS Windows In-Reply-To: <865xusndum.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 02 Jun 2024 07:54:57 +0300") References: <86cypcuhhk.fsf@gmail.com> <86jzjcgq00.fsf@gmail.com> <86sexydekl.fsf@gmail.com> <87ed9gkber.fsf@yahoo.com> <86r0dg4hpd.fsf@gmail.com> <87zfs4i0ul.fsf@yahoo.com> <86r0dgm89r.fsf@gmail.com> <87v82si061.fsf@yahoo.com> <865xusndum.fsf@gnu.org> Date: Sun, 02 Jun 2024 15:56:28 +0800 Message-ID: <87r0dfixqr.fsf@yahoo.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.22407 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 92 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71159 Cc: 71159@debbugs.gnu.org, eg642616@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > I just sent a few more comments. Thanks, everyone. From unknown Sun Aug 10 16:51:14 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 30 Jun 2024 11:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator