[comp.windows.x] Graphics & Athena Widget set

pedro@quiche (Sandro MAZZUCATO) (06/01/90)

Hi,
    here is a question that is troubling me since I'm new in the X world
I the references I have are not complete.

  How can I create a window or frame of work, using the Athena Widget set ,
where I can draw lines and circles etc ....


Thank you very much , < in advance >for your help !





---------------------------------------------------------------------------

Sandro Mazzucato                  
Internet : pedro@calvin.cs.mcgill.ca

BSc, U2, Computer Science.
McGill University - Montreal, Quebec, Canada

---------------------------------------------------------------------------

ejk@uxh.cso.uiuc.edu (Ed Kubaitis) (06/01/90)

The Athena label widget allows a bitmap (actually a pixmap) to be displayed
instead of text. One can then use Xlib calls to place graphics & text in
the pixmap. Two examples:

   o xplot (plot(5) filter) - available from uunet.uu.net in
     comp.sources.x/volume4/xplot/*

   o xgnuplot (gnuplot X wrapper/terminal driver) - available from 
     uxc.cso.uiuc.edu in pub/xgunplot/xgnuplot.shar

----------------------------------
Ed Kubaitis (ejk@uxh.cso.uiuc.edu)
Computing Services Office - University of Illinois, Urbana

vuichard@geocub.greco-prog.fr (06/05/90)

In article <3504@calvin.cs.mcgill.ca> pedro@quiche.cs.mcgill.ca (Sandro MAZZUCATO) writes:
>Hi,
>    here is a question that is troubling me since I'm new in the X world
>I the references I have are not complete.
>
>  How can I create a window or frame of work, using the Athena Widget set ,
>where I can draw lines and circles etc ....

            Well, you can use any widget like a simple window. You  just
        have to draw in its associated window obtained by XtWindow().

            Personnally, I use the "simplest"  widget,  i.e.  the  Label
        Widget ... but don't forget your drawings will be  erased  by  a
        mapping event ! To avoid this, use the XtNbitmap resource :  for
        example, you can draw in both the  window  and  the  pixmap  you
        associated to the widget, in order to see your drawings in "real
        time" and avoid mapping problems.

-------------------------------------------------------------------------------
| ----         ___                  | If Buddha had  wanted Men to understand |
|  / /_  __   / _  __  __  ____  __ | Women, He wouldn't have give us aspirin |
| / / / /_   /__/ / / /_/ / / / /_  |                       Confucius.        |
|-----------------------------------------------------------------------------|
|            vuichard@goofi.greco-prog.fr or vuichard@goofi.UUCP              |
|               or ..!uunet!mcvax!inria!geocub!goofi!vuichard                 |
-------------------------------------------------------------------------------