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

version» Context lines:

pike.git/lib/modules/Graphics.pmod/Graph.pmod/create_graph.pike:843:       }    }       //Place images and texts       if (diagram_data->legend_texts)    {    for(int i=0; i<j; i++)    { +  int xpos = (i/raws)*b; +  int ypos = (i%raws)*diagram_data->legendfontsize + +  diagram_data->image->ysize() - diagram_data->legend_size; +     diagram_data->image    ->paste_alpha_color(plupps[i],    @(diagram_data->datacolors[i]), -  (i/raws)*b, -  (i%raws)*diagram_data->legendfontsize -  +diagram_data->image -  ->ysize()-diagram_data->legend_size ); +  xpos, ypos);    diagram_data->image->setcolor(0,0,0);    draw( diagram_data->image, 0.5, -  ({(i/raws)*b, (i%raws)*diagram_data->legendfontsize+ -  diagram_data->image->ysize()-diagram_data->legend_size+1, -  (i/raws)*b+plupps[i]->xsize()-1.0, -  (i%raws)*diagram_data->legendfontsize -  + diagram_data->image->ysize()-diagram_data->legend_size+1, -  (i/raws)*b+plupps[i]->xsize()-1.0, -  (i%raws)*diagram_data->legendfontsize -  + diagram_data->image->ysize()-diagram_data->legend_size -  + plupps[i]->ysize()-1, -  (i/raws)*b+1, -  (i%raws)*diagram_data->legendfontsize + diagram_data->image -  -> ysize()-diagram_data->legend_size+plupps[i]->ysize()-1, -  (i/raws)*b, (i%raws)*diagram_data->legendfontsize -  + diagram_data->image->ysize()-diagram_data->legend_size+1 +  ({ +  xpos, ypos+1, +  xpos + plupps[i]->xsize() - 1.0, ypos+1, +  xpos + plupps[i]->xsize() - 1.0, ypos + plupps[i]->ysize() - 1, +  xpos, ypos + plupps[i]->ysize() - 1, +  xpos, ypos+1,    }));          diagram_data->image    ->paste_alpha_color(texts[i],    @(diagram_data->textcolor), -  (i/raws)*b+1+diagram_data->legendfontsize, -  (i%raws)*diagram_data->legendfontsize+ -  diagram_data->image->ysize() -  - diagram_data->legend_size ); +  xpos + 1 + diagram_data->legendfontsize, ypos);    }    }    else    diagram_data->legend_size=0;   }      mapping(string:mixed) init_bg(mapping diagram_data)   {    if (diagram_data->bgcolor)    diagram_data->image=Image.Image(diagram_data->xsize,diagram_data->ysize,
pike.git/lib/modules/Graphics.pmod/Graph.pmod/create_graph.pike:1030:    if (!(diagram_data->values_for_xnames))    {    if ((diagram_data->xspace<LITET)&&    (diagram_data->xspace>-LITET))    error( "Very bad error because xspace is zero!\n" );    float start;    start=diagram_data->xminvalue;    start=diagram_data->xspace*ceil((start)/diagram_data->xspace);    diagram_data->values_for_xnames=({start});    while(diagram_data->values_for_xnames[-1] -  <= diagram_data->xmaxvalue-diagram_data->xspace) +  <= diagram_data->xmaxvalue-diagram_data->xspace) {    diagram_data->values_for_xnames+=({start+=diagram_data->xspace}); -  +  if (diagram_data->values_for_xnames[-1] <= +  diagram_data->values_for_xnames[-2]) { +  // Step smaller than mantissa or negative. +  diagram_data->values_for_xnames = diagram_data->values_for_xnames[..<1]; +  break;    } -  +  } +  }    if (!(diagram_data->values_for_ynames))    {    if ((diagram_data->yspace<LITET)&&    (diagram_data->yspace>-LITET))    error( "Very bad error because yspace is zero!\n" );       float start;    start=diagram_data->yminvalue;    start=diagram_data->yspace*ceil((start)/diagram_data->yspace);    diagram_data->values_for_ynames=({start});    while(diagram_data->values_for_ynames[-1] -  <= diagram_data->ymaxvalue-diagram_data->yspace) +  <= diagram_data->ymaxvalue-diagram_data->yspace) {    diagram_data->values_for_ynames+=({start+=diagram_data->yspace}); -  +  if (diagram_data->values_for_ynames[-1] <= +  diagram_data->values_for_ynames[-2]) { +  // Step smaller than mantissa or negative. +  diagram_data->values_for_ynames = diagram_data->values_for_ynames[..<1]; +  break;    } -  +  } +  }       //Generate the texten if it doesn't exist    if (!(diagram_data->ynames))    if (diagram_data->eng)    {    diagram_data->ynames=    allocate(sizeof(diagram_data->values_for_ynames));       for(int i=0; i<sizeof(diagram_data->values_for_ynames); i++)    diagram_data->ynames[i]=