################################################################################
#
# File:         README
# RCS:          $Header: README,v 1.2 92/08/19 19:12:58 itosupt Exp $
# Description:  bug fixes and workarounds for the XmGraph widgets.
#		All changes listed here are already included in the source.
# Author:       All contributors, as noted by section.
# Created:      Fri Jan  3 14:21:15 1992
# Modified:     Fri Jan  3 14:25:23 1992
#
################################################################################

Date: Thu, 2 Jan 92 16:23:36 -0700
To: XmGraph@hpltp.hpl.hp.com
Subject: XmGraph bugs and work arounds

XmGraph users,

We here at SESD have been using the graph widget for about a year and a
half in our test tools for Softbench.  We have found several bugs in the
graph widget.  Some have been fixed through code changes, others we have
worked around.  Here are our work arounds:

	Arcs with a slope of -1 and a width of 0 are not drawn.  The 
	work around is to put a blank label on each arc.

	Backgound pixmaps on the graph widget do not get refreshed when
	an arc is moved.  This is unfortunate since you can't distinguish
	selected arcs from unselected arcs on a black and white display.
	We don't use a background pixmap on the graph widget.  In cxxdev,
	CLL added a callback to make the selected arc wider.

	The automatic scroll bars do not come and go properly.  We force
	the scroll bars to always be present.

	The X server gives a bad value error if you try to create a window
	that is larger than ~16K pixels in either direction.  This has only
	been a problem for us since switching to HP-UX 8.0.  Under 7.0 we
	could make windows that were about 32K pixels and if we made our
	graph bigger than that the nodes would wrap around.  We have changed
	our layout algorithm to automatically wrap our graphs to fit in
	the new 16K pixel limit.  Our layout algorithm is separate from
	the graph widget.

	The graph widget can core dump the 8.0 X server when drawing long zero
	width lines that are nearly vertical or nearly horizontal.  Make
	sure you have the X server patches from this past November.

All of our code chages have been given to Thuan either directly (today) or
through CLL.


==============================================================================

Date: Fri, 3 Jan 92 14:24:58 -0700
Subject: Re: XmGraph

I added one more fix to Arc.c.  The "if" statement allows a background
pixmap to be used with the graph widget.  I fixed this so the graphic
front end to softstatic will be usable on a monochrome display.  To see
the error that this corrects run:

	./sort -xrm "*XmGraph.backgroundPixmap:25_foreground" 17

Then move some of the nodes around.  With this patch the old arcs are
correctly erased.

Wade


  /*
   * Set the CLEAR graphic Context
   */

  valueMask = GCForeground | GCBackground | GCFunction | GCLineWidth | GCFont;
  values.function   = GXcopy;
  values.foreground = graph->core.background_pixel;
  values.background = graph->core.background_pixel;

  /* restore the background pickmap if any  WJS 920103 */
  if (graph->core.background_pixmap != XmUNSPECIFIED_PIXMAP)
    { valueMask |= GCFillStyle | GCTile;
      values.foreground = ((XmGraphWidget) graph)->graph.foreground;
      values.fill_style = FillTiled;
      values.tile = graph->core.background_pixmap;
    }

==============================================================================






