Example #1
0
static void
hardcopy(Widget w, XtPointer client_data, XtPointer call_data)
{
    NG_IGNORE(call_data);
    NG_IGNORE(w);

    /* com_hardcopy() -> gr_resize() -> setcolor() dirung postscript
       printing will act on currentgraph with a DEVDEP inherited from PSdevdep.
       But currentgraph had not changed its devdep, which was derived from
       incompatible X11devdep, thus overwriting some variables. Here you find a
       temporary remedy, until there will be a cleanup of graph handling. E.g.
       CopyGraph() does not make a copy of its devdep, but just copies the pointer,
       so keeping the old devdep. */

    lasthardcopy = (GRAPH *) client_data;

    /* FIXME #1: this should print currentgraph with
     *            currentgraph dynamically bound to client_data
     *  FIXME #2: the !currentgraphs case,
     *            don't bother do call com_hardcopy
     */

    if (currentgraph) {
        void *devdep = currentgraph->devdep;
        com_hardcopy(NULL);
        currentgraph->devdep = devdep;
    } else {
        com_hardcopy(NULL);
    }
}
Example #2
0
/* called by SystemMenue / Postscript hardcopy */
LRESULT HcpyPlot( HWND hwnd)
{
	int colorval = isblack? 0 : 1;
   cp_vset("hcopypscolor", CP_NUM, &colorval);
	com_hardcopy(NULL); 
	return 0;
}
Example #3
0
LRESULT HcpyPlotBW( HWND hwnd)
{
   int bgcolor;
   if (cp_getvar("hcopypscolor", CP_NUM, &bgcolor))
       cp_remvar("hcopypscolor");
	com_hardcopy(NULL); 
	return 0;
}
Example #4
0
void
hardcopy(Widget w, caddr_t client_data, caddr_t call_data)
{

    lasthardcopy = (GRAPH *) client_data;
    com_hardcopy(NULL);

}