pike.git / lib / modules / Graphics.pmod / Graph.pmod / create_pie.pike

version» Context lines:

pike.git/lib/modules/Graphics.pmod/Graph.pmod/create_pie.pike:1:   // Graph sub-module for drawing pie-charts. - // $Id: create_pie.pike,v 1.7 2001/11/19 00:04:38 nilsson Exp $ + // $Id: create_pie.pike,v 1.8 2002/03/09 18:17:10 nilsson Exp $   //   // These functions were written by Henrik "Hedda" Wallin (hedda@roxen.com)   // Create_pie can draw pie charts in different forms.      #pike __REAL_VERSION__      #include "graph.h"      inherit "polyline.pike";   inherit "create_graph.pike";
pike.git/lib/modules/Graphics.pmod/Graph.pmod/create_pie.pike:113:    text[i]=text[i]->scale(0, (int)diagram_data["ysize"]/5-    diagram_data["3Ddepth"]);       if (xmaxtext<(text[i]->xsize()))    xmaxtext=text[i]->xsize();    if (ymaxtext<(text[i]->ysize()))    ymaxtext=text[i]->ysize();       }    else -  throw(({"Missing font or similar error!\n", backtrace() })); +  error("Missing font or similar error!\n");       int nameheight=write_name(diagram_data);       //Some calculations    if (twoD)    {    xc=diagram_data["xsize"]/2;    yc=diagram_data["ysize"]/2+nameheight/2;    xr=(int)min(xc-xmaxtext-ymaxtext-1-diagram_data["linewidth"],    yc-2*ymaxtext-
pike.git/lib/modules/Graphics.pmod/Graph.pmod/create_pie.pike:142:    yc-2*ymaxtext-1-nameheight)    -diagram_data["linewidth"]);    xr=(int)(min(xc-xmaxtext-ymaxtext-1,    yc+diagram_data["3Ddepth"]/2-    2*ymaxtext-1-nameheight)-    diagram_data["linewidth"]);    }    float w=diagram_data["linewidth"];       if (xr<2) -  throw(({"Image to small for this pie-diagram.\n" -  "Try smaller font or bigger image!\n", backtrace() })); +  error("Image to small for this pie-diagram.\n" +  "Try smaller font or bigger image!\n");       //initiate the 0.25*% for different numbers:    //Ex: If numbers is ({3,3}) pnumbers will be ({200, 200})    sum=`+(@ numbers);    int i;       if (sum>LITET)    {    for(int i=0; i<sizeof(numbers); i++)    {