open-axiom repository from github
/*1Copyright (C) 1991-2002, The Numerical Algorithms Group Ltd.2All rights reserved.3Copyright (C) 2007-2008, Gabriel Dos Reis.4All rights reserved.56Redistribution and use in source and binary forms, with or without7modification, are permitted provided that the following conditions are8met:910- Redistributions of source code must retain the above copyright11notice, this list of conditions and the following disclaimer.1213- Redistributions in binary form must reproduce the above copyright14notice, this list of conditions and the following disclaimer in15the documentation and/or other materials provided with the16distribution.1718- Neither the name of The Numerical Algorithms Group Ltd. nor the19names of its contributors may be used to endorse or promote products20derived from this software without specific prior written permission.2122THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS23IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED24TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A25PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER26OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,27EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,28PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR29PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF30LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING31NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS32SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.33*/3435#define _MAKE2D_C36#include "openaxiom-c-macros.h"3738#include "viewman.h"3940#include "sockio.h"41#include "make2D.H1"4243void44makeView2DFromSpadData(view2DStruct *viewdata,graphStateStruct graphState[])45{4647int i;4849viewdata->title = get_string(spadSock);5051viewdata->vX = get_int(spadSock);52viewdata->vY = get_int(spadSock);53viewdata->vW = get_int(spadSock);54viewdata->vH = get_int(spadSock);5556viewdata->showCP = get_int(spadSock);5758for (i=0; i<maxGraphs; i++) {59viewdata->graphKeyArray[i] = get_int(spadSock);60if (viewdata->graphKeyArray[i]) {6162graphState[i].scaleX = get_float(spadSock);63graphState[i].scaleY = get_float(spadSock);64graphState[i].deltaX = get_float(spadSock);65graphState[i].deltaY = get_float(spadSock);66graphState[i].pointsOn = get_int(spadSock);67graphState[i].connectOn = get_int(spadSock);68graphState[i].splineOn = get_int(spadSock);69graphState[i].axesOn = get_int(spadSock);70graphState[i].axesColor = get_int(spadSock);71graphState[i].unitsOn = get_int(spadSock);72graphState[i].unitsColor = get_int(spadSock);73graphState[i].showing = get_int(spadSock);74graphState[i].selected = 1; /* always default to selected? */7576}77}78}798081