I also tried to use with "sprintf" to get integers
and to avoid this problem. Doesn't work.




On Thu, 18 Jul 2002 11:46:03 -0400
"Wiggins d'Anconia" <[EMAIL PROTECTED]> wrote:

> Possible need for integer forced math?  I am not familar enough with GD 
> to know if this would help, but when doing a similar thing with 
> web-based on the fly generation of graphs simply supplying a length of 
> 460.3 on an image's attributes for instance sent the browser into a tizzy.
> 
> 
> 
> Konrad Foerstner wrote:
> > Heyho!
> > 
> > My case: 
> > 
> > I'm writing a program which analyses some input to 
> > get some percent values. These values should be drawn
> > in a diagramm (is use GD for that). To use the area
> > of the created picture optimally I want the biggest value
> > (see my question of yesterday...it is solved now) 
> > to have column with the maximum lenght (in my case 580 pixels).
> > All the other values should be drawn in relation to that. 
> > I thougt I can make a factor and then multiply all the
> > other values with this on to get this result. My code looks like
> > this:
> > 
> > my $factor = (580/$max_percent_value)
> > 
> > my $column_lengt_a = $percent_value_a * $factor;
> > my $column_lengt_b = $percent_value_b * $factor;
> > my $column_lengt_c = $percent_value_c * $factor;
> > .....
> > 
> > My Prob:
> > I does not work every time. On some data input the columns are bigger than 580 
>pixel.
> > 
> > I also try, calculate without storing the factor in a string
> > (avoid mistakes by rounding...I don't know) like this:
> > 
> > my $maximum_pixel = 580;
> > my $column_lengt_a = $percent_value_a * $maximum_pixel;
> > 
> > 
> > What to do?
> > 
> > 
> > cu
> > 
> > Konrad
> > 
> 
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to