emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stipples support in MS-Windows port


From: Eli Zaretskii
Subject: Re: Stipples support in MS-Windows port
Date: Sat, 11 May 2024 11:24:04 +0300

> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]