Yes, this can be done, in particular
dashes can be filled with first drawing the same lines
of fill color. I agree this is good.

How about the single integer representation of color
and transparency?

Note: the same integer color+transparency could
be useful with gl commands, in particlar glpixels,
to provide compositing. While masking is possible
with off-screen images, gradual transparency would
allow nice blending of image edges with the backdrop.

Compositing of images is also possible in the off-screen,
but it requires color separation and integer-valued
arithmetic, which is very costly in J.

Anti-aliased and composited geometry is only
possible reasonably with graphcis API.


--- bill lam <[EMAIL PROTECTED]> wrote:

> These commands came from window 3.1 gdi, iirc they are uncommitted in gdi+ 
> and 
> dotnet.  One way to emulate these old commands is to draw a solid rectangle 
> with 
> the intended background color and then draw the text.
> 
> Oleg Kobchenko wrote:
> > These were removed from j601. But how else can
> > one specify the color of gaps and text backdrop?
> > 
> > glbkcolor '' ;  set current background color to current color (last grgb). 
> > Background color is
> > used in the gaps in styled lines and as the background for text.
> > 
> > glbkmode bool ; (noop java) set background mode for gbkcolor to OPAQUE with 
> > 0, or TRANSPARENT
> with
> > 1
> > 
> > 
> > This seems to be not necessary, since Text can use
> > the pen color.
> > 
> > gltextcolor '' ; glrgb color is set as color of text for gtext
> > 
> > 
> > An idea to simplify setting color is instead of
> >   glpen 1,0 [ glrgb 16b77 16b99 16bbb
> >   glbrush'' [ glrgb 16b77 16b99 16bbb
> >   glbrushnull''
> >   glbkmode 0[ glbkcolor'' [ glrgb 16b77 16b99 16bbb
> >   glbkmode 1
> > to use integer color as in HTML and CSS
> >   glpen 1,0,16b7799bb
> >   glbrush   16b7799bb
> >   glbrush   _1   NB. unsigned 16bffffffff
> >   glbkcolor 16b7799bb
> >   glbkcolor _1
> > where the high byte in integer sets transparency,
> > from 0=opaque to 255=transparent (values 128-255
> > will produce negative integers).
> > 
> >    transcol=: (23 b. 24&(32 b.))~  NB. endian-neutral
> > 
> >    16b7f transcol 16bffffff
> > 2147483647
> >    ,hfd a.i.|.2 (3!:4) 16b7f transcol 16bffffff
> > 7FFFFFFF
> >     16b80 transcol 16bffffff
> > _2130706433
> >    ,hfd a.i.|.2 (3!:4) 16b80 transcol 16bffffff
> > 80FFFFFF
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam protection around 
> > http://mail.yahoo.com 
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> > 
> 
> 
> -- 
> regards,
> bill
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to