nanogui: How to create rounded rectangle and dotted lines ?


Previous by date: 16 May 2001 17:35:40 -0000 Re: GTK+ port to nano-X, Alex Holden
Next by date: 16 May 2001 17:35:40 -0000 Re: GTK+ port to nano-X, Gary James
Previous in thread: 16 May 2001 17:35:40 -0000 Re: How to create rounded rectangle and dotted lines ?, Jordan Crouse
Next in thread: 16 May 2001 17:35:40 -0000 Re: How to create rounded rectangle and dotted lines ?, Greg Haerr

Subject: Re: How to create rounded rectangle and dotted lines ?
From: "Robert E. Hartley" ####@####.####
Date: 16 May 2001 17:35:40 -0000
Message-Id: <3B02B9B1.134F4083@ics.com>

Someone on this list asked me the same thing earlier today.

I told them the following:

To get the rounded apearance at the corners, I calculated the what I would
need to draw a quarter circle at each of the four corners, and then drew a
filled arc.  For the rest I broke it up into three different rectangles
for the top, middle, and bottom as follows:

(best viewed in fixed font)

AA1111111AA
AA1111111AA
22222222222
22222222222
222222222222
222222222222
AA3333333AA
AA3333333AA


I was then able to code a function that took the x, y, w, h, and radius needed
to draw rounded rectangles.

This was done for a KVM port to the now defunct Helio from VTech.

I hope this helps,

Rob

Jordan Crouse wrote:

> Ahh, to dream...... :)
>
> There currently are no native routines to create rounded rectangles or dotted
> lines.
>
> For the dotted lines, I am not sure exactly why we haven't implemented this
> before, I would think that we could produce a series of values in the
> graphics context, and provide those to the user.  I'm not a hundred percent
> sure how X11 does it, but I think we could do a reasonable facsimile.
>
> As far as the rounded rectangles, I know that the math involved in drawing
> and clipping rounded rectangles is pretty hairy, and I don't think anyone has
> made an effort in that direction.
>
> Jordan
>
> On Wednesday 16 May 2001 00:56, Patrice Mancini mentioned:
> > Hello,
> >
> > I'm trying to find if there is a way to create rounded rectangles and
> > dotted lines using nano-X
> >
> > Thanks in advance for your help.
> >
> > Regards
> >
> > Patrice Mancini
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: ####@####.####
> > For additional commands, e-mail: ####@####.####
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=  Robert Hartley                 Mail:         201 Broadway        =
=  Central Region Systems Engineer              Cambridge, MA 02139 =
=  Integrated Computer            Email:        ####@####.####    =
=  Solutions, Inc.                Web Site:     www.ics.com         =
=  Tech Support: ####@####.####  Phone:        800-800-4271        =
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Visit the MotifZone (www.motifzone.org) for info on Motif!




Previous by date: 16 May 2001 17:35:40 -0000 Re: GTK+ port to nano-X, Alex Holden
Next by date: 16 May 2001 17:35:40 -0000 Re: GTK+ port to nano-X, Gary James
Previous in thread: 16 May 2001 17:35:40 -0000 Re: How to create rounded rectangle and dotted lines ?, Jordan Crouse
Next in thread: 16 May 2001 17:35:40 -0000 Re: How to create rounded rectangle and dotted lines ?, Greg Haerr


Powered by ezmlm-browse 0.20.