[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Stipples support in MS-Windows port
From: |
Elijah G. |
Subject: |
Re: Stipples support in MS-Windows port |
Date: |
Sun, 12 May 2024 17:06:40 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Po Lu <luangruo@yahoo.com>
>> Cc: "Ergus via Emacs development discussions." <emacs-devel@gnu.org>
>> Date: Sat, 11 May 2024 13:27:29 +0800
>>
>> Elijah G <eg642616@gmail.com> writes:
>>
>> > El sáb., 4 de mayo de 2024 10:30 p. m., Po Lu <luangruo@yahoo.com>
>> > escribió:
>> >
>> > Po Lu <luangruo@yahoo.com> writes:
>> >
>> > > On Android, for instance, the relevant code exists in two functions
>> > > defined in EmacsGC.java, prepareStipple and blitOpaqueStipple, which are
>> > > nothing akin to the X implementation it emulates. The same is true of
>> > > haikuterm.c, haiku_draw_stipple_background, and BView_DrawBitmapTiled in
>> > > haiku_draw_support.cc.
>> >
>> > Perhaps "pattern brushes" are the tool for the job?
>> >
>> >
>> > https://learn.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-createpatternbrush
>> >
>> > After some tests, i could execute the snippet sent in this thread without
>> > crashes with something similar to a stipple (sadly i cannot send the patch,
>> > i'm not in my computer), i tried using CreatePatternBrush, however it
>> > needs the bitmap as a HBITMAP variable type, i've found some examples in
>> > the same file (w32term.c) such as fringe bitmap that uses a HBITMAP var.
>> > I would like to know any idea for make stipple bitmap as a HBITMAP (I'm
>> > not sure if i should make it using CreateBitmap).
>> > Also i would like to know if its a good idea remove XSetFillStyle from
>> > w32_draw_glyph_string_background
>> > (https://git.savannah.gnu.org/cgit/emacs.git/tree/src/w32term.c#n1271),
>> > AFAIK it is only for set the fill-style which i dont think it's necessary
>> > since
>> > i'm implementing the stipple fill-style inside a XFillRectangle
>> > implementation which i'm working.
>> >
>> > Thanks
>>
>> I think Eli is better qualified to answer this.
>
> That fragment is there only to show what xterm.c does for this, so
> that the w32 code would follow the same paradigm. If you are
> implementing the w32 code for doing that, the X-related code can be
> removed.
Alright thanks, i've done some test, and now i could draw a bitmap inside
the propertized area, and now it fill/tile to all the area
(see below this email the attached patch for the work done).
However for this patch i'm using a defined bitmap and not from the
stipple one, i'll need to figure how to get the stipple width and height,
about the stipple data i still trying to figure how to use it since it's
doesn't work with `CreateBitmap' (i'm not sure what contains i've tried
to use `printf' for get `s->face->stipple' value in my console/terminal
but printf is not defined, is there a way for print values to the
console/terminal?).
0001-WIP-Stipple-implementation-for-MS-Windows.patch
Description: Text Data
- Stipples support in MS-Windows port, Elijah G, 2024/05/02
- Re: Stipples support in MS-Windows port, Eli Zaretskii, 2024/05/03
- Re: Stipples support in MS-Windows port, Po Lu, 2024/05/03
- Re: Stipples support in MS-Windows port, Elijah G, 2024/05/04
- Re: Stipples support in MS-Windows port, Po Lu, 2024/05/05
- Re: Stipples support in MS-Windows port, Po Lu, 2024/05/05
- Re: Stipples support in MS-Windows port, Elijah G, 2024/05/06
- Re: Stipples support in MS-Windows port, Elijah G, 2024/05/11
- Re: Stipples support in MS-Windows port, Po Lu, 2024/05/11
- Re: Stipples support in MS-Windows port, Eli Zaretskii, 2024/05/11
- Re: Stipples support in MS-Windows port,
Elijah G. <=
- Re: Stipples support in MS-Windows port, Elijah G., 2024/05/14
- Re: Stipples support in MS-Windows port, Po Lu, 2024/05/14
- Re: Stipples support in MS-Windows port, Elijah G., 2024/05/14
- Re: Stipples support in MS-Windows port, Elijah G., 2024/05/19
- Re: Stipples support in MS-Windows port, Eli Zaretskii, 2024/05/20
- Re: Stipples support in MS-Windows port, Po Lu, 2024/05/20
- Re: Stipples support in MS-Windows port, Eli Zaretskii, 2024/05/20
- Re: Stipples support in MS-Windows port, Po Lu, 2024/05/20
- Re: Stipples support in MS-Windows port, Elijah G., 2024/05/20
- Re: Stipples support in MS-Windows port, Elijah G., 2024/05/20