🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x.pex
Article #4

Drawing into DrawingArea widget

#4
From: Keith Baccki
Date: Wed, 04 Nov 1992 19:22
52 lines
2133 bytes
	Hello, I'm working with DEC PHIGS ver. 2.3A on a
DECstation 5000/133 with PXG+ hardware. I am writing code
that is half PHIGS and half Motif, and I am having trouble
drawing non-PHIGS graphics into an initialized Drawing Area
widget. Sounds pretty idiotic, but I've even had more experienced
X coders look at my code and shrug there shoulders. Anyway,
here's the basic structure:

 	    application shell widget
		     /     \
                    /       \
    PHIGS output widget   Form Dialog
				\
				 \
			      Drawing Area				


	Drawing something into the Drawing Area should be a
trivial task, but nonetheless the following pieces of code
do NOTHING in the window:

      XtSetArg(...);   /* bunch of these... NOTE: height = 650 */
                       /*                          width = 400 */
      ionwindow =XmCreateFormDialog(toplevelshell,"ionwindow",arglist,6);
      XtManageChild(ionwindow);

      XtSetArg(...);   /* Few more... NOTE: requested height = 460 */
	               /*                        "     width = 400 */
      iondrawable = XmCreateDrawingArea(ionwindow,"iondrawable",arglist,4);
      XtManageChild(iondrawable);

      gcvalues.foreground = BlackPixel(display,DefaultScreen(display));
      gcvalues.background = WhitePixel(display,DefaultScreen(display));

      gc = XCreateGC(display,XtWindow(iondrawable),GCForeground | GCBackground, &gcvalues);

      XFillRectangle(display,XtWindow(iondrawable),gc,(Position)50,(Position)50,(Dimension)200,(Dimension)200);
      XDrawLine(display,XtWindow(iondrawable),gc,(Position)
100,(Position) 100,(Position) 300,(Position) 150);
      XFlush(display);



Any suggestions? Am I missing something?


			Thanks in advance,

					Keith Baccki

					kiki@bass.bu.edu
Technical Details
Message-ID: <100607@bu.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!uwm.edu!linac!att!bu.edu!bass.bu.edu

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!uwm.edu!linac!att!bu.edu!bass.bu.edu
From: kiki@bass.bu.edu (Keith Baccki)
Newsgroups: comp.windows.x.pex
Subject: Drawing into DrawingArea widget
Message-ID: <100607@bu.edu>
Date: 4 Nov 92 19:22:52 GMT
Article-I.D.: bu.100607
Sender: news@bu.edu
Organization: Boston University
Lines: 52