40 croak("%s not implemented on this architecture", s);
64 if (strEQ(name, "G2LD"))
70 if (strEQ(name, "G2_H"))
76 if (strEQ(name, "G2_VERSION"))
78 return atof(G2_VERSION);
130 typedef int* DevType;
131 typedef DevType G2__Device;
134 MODULE = G2 PACKAGE = G2
142 MODULE = G2 PACKAGE = G2::Device PREFIX = g2_
147 g2_newX11(packname="G2::Device", width=100,height=100)
155 theDevice = (int *)malloc(sizeof(int));
156 *theDevice = g2_open_X11(width, height);
168 g2_newWin32(packname="G2::Device", width=100,height=100,filename="Win32 window",type=0)
178 theDevice = (int *)malloc(sizeof(int));
179 *theDevice = g2_open_win32(width, height, filename, type);
185 #endif /* DO_WIN32 */
190 g2_newGD(packname="G2::Device", filename="g2.png", width=100, height=100, type=1)
200 theDevice = (int *)malloc(sizeof(int));
201 *theDevice = g2_open_gd(filename, width, height, type);
212 g2_newPS(packname="G2::Device", filename="g2.ps", paper=1,orientation=1)
221 theDevice = (int *)malloc(sizeof(int));
222 *theDevice = g2_open_PS(filename, paper, orientation);
229 g2_newEPSF(packname="G2::Device", filename="g2.eps")
236 theDevice = (int *)malloc(sizeof(int));
237 *theDevice = g2_open_EPSF(filename);
244 g2_newEPSF_CLIP(packname="G2::Device", filename="g2.eps",width=100,height=100)
253 theDevice = (int *)malloc(sizeof(int));
254 *theDevice = g2_open_EPSF_CLIP(filename,width,height);
265 g2_newFIG(packname="G2::Device", filename="g2.fig")
272 theDevice = (int *)malloc(sizeof(int));
273 *theDevice = g2_open_FIG(filename);
283 g2_newvd(packname="G2::Device")
289 theDevice = (int *)malloc(sizeof(int));
290 *theDevice = g2_open_vd();
303 if(g2_device_exist(*dev)) {
311 g2_attach(vd_dev, dev)
317 g2_attach(*vd_dev, *dev);
321 g2_detach(vd_dev, dev)
327 g2_detach(*vd_dev, *dev);
340 g2_set_auto_flush(dev, on_off)
346 g2_set_auto_flush(*dev, on_off);
368 g2_set_coordinate_system(dev, x_origin, y_origin, x_mul, y_mul)
377 g2_set_coordinate_system(*dev, x_origin, y_origin, x_mul, y_mul);
382 g2_ink(pd_dev, red, green, blue)
390 RETVAL = g2_ink(*pd_dev, red, green, blue);
407 g2_set_dash(dev, N, dashes=NULL)
414 g2_set_dash(*dev, N, dashes);
419 g2_set_font_size(dev, size)
425 g2_set_font_size(*dev, size);
429 g2_set_line_width(dev, w)
435 g2_set_line_width(*dev, w);
439 g2_clear_palette(dev)
444 g2_clear_palette(*dev);
448 g2_reset_palette(dev)
453 g2_reset_palette(*dev);
457 g2_allocate_basic_colors(dev)
462 g2_allocate_basic_colors(*dev);
475 g2_set_background(dev, color)
481 g2_set_background(*dev, color);
496 g2_move_r(dev, dx, dy)
503 g2_move_r(*dev, dx, dy);
518 g2_plot_r(dev, dx, dy)
525 g2_plot_r(*dev, dx, dy);
531 g2_line(dev, x1, y1, x2, y2)
541 g2_line(*dev, x1, y1, x2, y2);
545 g2_line_r(dev, dx, dy)
552 g2_line_r(*dev, dx, dy);
556 g2_line_to(dev, x, y)
563 g2_line_to(*dev, x, y);
567 g2_poly_line(dev, N_pt, points)
574 g2_poly_line(*dev, N_pt, points);
579 g2_triangle(dev, x1, y1, x2, y2, x3, y3)
590 g2_triangle(*dev, x1, y1, x2, y2, x3, y3);
595 g2_filled_triangle(dev, x1, y1, x2, y2, x3, y3)
606 g2_filled_triangle(*dev, x1, y1, x2, y2, x3, y3);
610 g2_rectangle(dev, x1, y1, x2, y2)
619 g2_rectangle(*dev, x1, y1, x2, y2);
624 g2_filled_rectangle(dev, x1, y1, x2, y2)
633 g2_filled_rectangle(*dev, x1, y1, x2, y2);
637 g2_polygon(dev, N_pt, points)
644 g2_polygon(*dev, N_pt, points);
649 g2_filled_polygon(dev, N_pt, points)
656 g2_filled_polygon(*dev, N_pt, points);
661 g2_circle(dev, x, y, r)
669 g2_circle(*dev, x, y, r);
673 g2_filled_circle(dev, x, y, r)
681 g2_filled_circle(*dev, x, y, r);
685 g2_ellipse(dev, x, y, r1, r2)
694 g2_ellipse(*dev, x, y, r1, r2);
698 g2_filled_ellipse(dev, x, y, r1, r2)
707 g2_filled_ellipse(*dev, x, y, r1, r2);
711 g2_arc(dev, x, y, r1, r2, a1, a2)
722 g2_arc(*dev, x, y, r1, r2, a1, a2);
726 g2_filled_arc(dev, x, y, r1, r2, a1, a2)
737 g2_filled_arc(*dev, x, y, r1, r2, a1, a2);
741 g2_string(dev, x, y, text)
749 g2_string(*dev, x, y, text);
753 g2_set_QP(dev, d, shape)
760 g2_set_QP(*dev, d, shape);
764 g2_plot_QP(dev, x, y)
771 g2_plot_QP(*dev, x, y);
775 g2_query_pointer(dev)
782 g2_query_pointer(*dev, &x, &y, &button);
790 g2_spline(dev, N_pt, points, o)
798 g2_spline(*dev, N_pt, points, o);
804 g2_b_spline(dev, N_pt, points, o)
812 g2_b_spline(*dev, N_pt, points, o);
818 g2_raspln(dev, N_pt, points, tn)
826 g2_raspln(*dev, N_pt, points, tn);
832 g2_para_3(dev, N_pt, points)
839 g2_para_3(*dev, N_pt, points);
845 g2_para_5(dev, N_pt, points)
852 g2_para_5(*dev, N_pt, points);
858 g2_filled_spline(dev, N_pt, points, o)
866 g2_filled_spline(*dev, N_pt, points, o);
872 g2_filled_b_spline(dev, N_pt, points, o)
880 g2_filled_b_spline(*dev, N_pt, points, o);
886 g2_filled_raspln(dev, N_pt, points, tn)
894 g2_filled_raspln(*dev, N_pt, points, tn);
900 g2_filled_para_3(dev, N_pt, points)
907 g2_filled_para_3(*dev, N_pt, points);
913 g2_filled_para_5(dev, N_pt, points)
920 g2_filled_para_5(*dev, N_pt, points);