Testing latest pari + WASM + node.js... and it works?! Wow.
License: GPL3
ubuntu2004
/* Copyright (C) 2017 The PARI group.12This file is part of the PARI/GP package.34This program is free software; you can redistribute it and/or modify5it under the terms of the GNU General Public License as published by6the Free Software Foundation; either version 2 of the License, or7(at your option) any later version.89This program is distributed in the hope that it will be useful,10but WITHOUT ANY WARRANTY; without even the implied warranty of11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12GNU General Public License for more details.1314You should have received a copy of the GNU General Public License along15with this program; if not, write to the Free Software Foundation, Inc.,1651 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.17*/18#include "pari.h"19#include "rect.h"2021static void22draw(PARI_plot *T, GEN w, GEN x, GEN y)23{24if (pari_daemon()) return; /* parent process returns */25pari_plot_by_file("GP_SVG_VIEWER", ".svg", rect2svg(w,x,y,T));26exit(0);27}28void29gp_get_plot(PARI_plot *T)30{31T->width = 480;32T->height = 320;33T->fheight = 12;34T->fwidth = 6;35T->hunit = 3;36T->vunit = 3;37gp_get_ploth_default_sizes(T);38T->dwidth = 0;39T->dheight = 0;40T->draw = &draw;41}424344