Server IP : 103.119.228.120 / Your IP : 18.119.121.234 Web Server : Apache System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64 User : nobody ( 99) PHP Version : 5.6.40 Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/local/ssl/local/ssl/local/ssl/local/share/perl5/GD/Graph/ |
Upload File : |
#========================================================================== # Copyright (c) 1995-1998 Martien Verbruggen #-------------------------------------------------------------------------- # # Name: # GD::Graph::lines.pm # # $Id: lines.pm,v 1.15 2005/12/14 04:13:00 ben Exp $ # #========================================================================== package GD::Graph::lines; ($GD::Graph::lines::VERSION) = '$Revision: 1.15 $' =~ /\s([\d.]+)/; use strict; use GD; use GD::Graph::axestype; @GD::Graph::lines::ISA = qw( GD::Graph::axestype ); # PRIVATE sub draw_data_set { my $self = shift; my $ds = shift; my @values = $self->{_data}->y_values($ds) or return $self->_set_error("Impossible illegal data set: $ds", $self->{_data}->error); my $dsci = $self->set_clr($self->pick_data_clr($ds) ); my $type = $self->pick_line_type($ds); my ($xb, $yb); if (defined $values[0]) { if (defined($self->{x_min_value}) && defined($self->{x_max_value})) { ($xb, $yb) = $self->val_to_pixel($self->{_data}->get_x(0), $values[0], $ds); } else { ($xb, $yb) = $self->val_to_pixel(1, $values[0], $ds); } } for (my $i = 0; $i < @values; $i++) { if (!defined $values[$i]) { ($xb, $yb) = () if $self->{skip_undef}; next; } my ($xe, $ye); if (defined($self->{x_min_value}) && defined($self->{x_max_value})) { ($xe, $ye) = $self->val_to_pixel( $self->{_data}->get_x($i), $values[$i], $ds); } else { ($xe, $ye) = $self->val_to_pixel($i+1, $values[$i], $ds); } if (defined $xb) { $self->draw_line($xb, $yb, $xe, $ye, $type, $dsci) if defined $dsci; $self->{_hotspots}->[$ds]->[$i] = ['line', $xb, $yb, $xe, $ye, $self->{line_width}]; } ($xb, $yb) = ($xe, $ye); } return $ds; } sub pick_line_type { my $self = shift; my $num = shift; ref $self->{line_types} ? $self->{line_types}[ $num % (1 + $#{$self->{line_types}}) - 1 ] : $num % 4 ? $num % 4 : 4 } sub draw_line # ($xs, $ys, $xe, $ye, $type, $colour_index) { my $self = shift; my ($xs, $ys, $xe, $ye, $type, $clr) = @_; my $lw = $self->{line_width}; my $lts = $self->{line_type_scale}; my $style = gdStyled; my @pattern = (); LINE: { ($type == 2) && do { # dashed for (1 .. $lts) { push @pattern, $clr } for (1 .. $lts) { push @pattern, gdTransparent } $self->{graph}->setStyle(@pattern); last LINE; }; ($type == 3) && do { # dotted, for (1 .. 2) { push @pattern, $clr } for (1 .. 2) { push @pattern, gdTransparent } $self->{graph}->setStyle(@pattern); last LINE; }; ($type == 4) && do { # dashed and dotted for (1 .. $lts) { push @pattern, $clr } for (1 .. 2) { push @pattern, gdTransparent } for (1 .. 2) { push @pattern, $clr } for (1 .. 2) { push @pattern, gdTransparent } $self->{graph}->setStyle(@pattern); last LINE; }; # default: solid $style = $clr; } # Tried the line_width thing with setBrush, ugly results # TODO: This loop probably should be around the datasets # for nicer results my $i; for $i (1..$lw) { my $yslw = $ys + int($lw/2) - $i; my $yelw = $ye + int($lw/2) - $i; # Need the setstyle to reset $self->{graph}->setStyle(@pattern) if (@pattern); $self->{graph}->line( $xs, $yslw, $xe, $yelw, $style ); } } sub draw_legend_marker # (data_set_number, x, y) { my $self = shift; my ($n, $x, $y) = @_; my $ci = $self->set_clr($self->pick_data_clr($n)); return unless defined $ci; my $type = $self->pick_line_type($n); $y += int($self->{lg_el_height}/2); # Joe Smith <jms@tardis.Tymnet.COM> local($self->{line_width}) = 2; # Make these show up better $self->draw_line( $x, $y, $x + $self->{legend_marker_width}, $y, $type, $ci ); } "Just another true value";