nanogui: How to create rounded rectangle and dotted lines ?


Previous by date: 18 May 2001 18:53:46 -0000 Re: How to create rounded rectangle and dotted lines ?, Greg Haerr
Next by date: 18 May 2001 18:53:46 -0000 Re: subject line, Amit Kulkarni
Previous in thread: 18 May 2001 18:53:46 -0000 Re: How to create rounded rectangle and dotted lines ?, Greg Haerr
Next in thread: 18 May 2001 18:53:46 -0000 Re: How to create rounded rectangle and dotted lines ?, Greg Haerr

Subject: Re: How to create rounded rectangle and dotted lines ?
From: Jordan Crouse ####@####.####
Date: 18 May 2001 18:53:46 -0000
Message-Id: <01051812531207.22016@cosmic>

> I have in the back of my mind some ideas for dotted
> line drawing and wide lines, but it's been lower priority.

Dotted lines wouldn't be very difficult.  You could specify a binary pattern 
of some sort either in binary (ie, two on, two off could be 11001100 or 
0xCC), or maybe a text string ("--**--**"), and then use that in the line 
alogrithm to determine which bits to skip.  Of course, that would add a 
couple of cycles, but I doubt it would be too bad (the compiler would 
probably be able to optimize that fairly well).

I would really like to see your wide lines alogrithm as I have been unable to 
find a good wide line alogrithm in any of my graphics texts.

Jordan

On Friday 18 May 2001 12:45, Greg Haerr mentioned:
> : I'm trying to find if there is a way to create rounded rectangles and
>
> dotted lines using nano-X
>
> Ah, the old round-rect and dotted lines problem, heh?
> I'll bet you're trying to get a focus rectangle.
>
> I have planned for rounded rectangles in Nano-X for
> some time, but hadn't quite finished them.  I did implement
> them for win32 however, and the routines use the same
> engine region routines already in nano-X.  Take a
> look at CreateRoundRect in src/mwin/winrgn.c, you
> should be able to port that to Nano-X in an hour or
> so.  (You could choose to run this as user code,
> calling the GrXXX region routines, or put it in
> nanox/srvfunc.c and call the GdXXX region routines.)
>
> Dotted lines are another problem that really isn't
> part of the current engine code.  My suggestion is to
> code up a special dotted line round rect by using
> the above suggestion, and adding a pixel-skip hack
> in order to get the focus rect.
>
>
>
> Regards,
>
> Greg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####

Previous by date: 18 May 2001 18:53:46 -0000 Re: How to create rounded rectangle and dotted lines ?, Greg Haerr
Next by date: 18 May 2001 18:53:46 -0000 Re: subject line, Amit Kulkarni
Previous in thread: 18 May 2001 18:53:46 -0000 Re: How to create rounded rectangle and dotted lines ?, Greg Haerr
Next in thread: 18 May 2001 18:53:46 -0000 Re: How to create rounded rectangle and dotted lines ?, Greg Haerr


Powered by ezmlm-browse 0.20.