phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] phpgwapi/inc/class.gdgraph.inc.php, 1.14


From: nomail
Subject: [Phpgroupware-cvs] phpgwapi/inc/class.gdgraph.inc.php, 1.14
Date: Tue, 1 Jun 2004 17:44:03 +0200

Update of /phpgwapi/inc
Modified Files:
        Branch: 
          class.gdgraph.inc.php

date: 2004/06/01 15:44:03;  author: ceb;  state: Exp;  lines: +16 -4

Log Message:
update
=====================================================================
Index: phpgwapi/inc/class.gdgraph.inc.php
diff -u phpgwapi/inc/class.gdgraph.inc.php:1.13 
phpgwapi/inc/class.gdgraph.inc.php:1.14
--- phpgwapi/inc/class.gdgraph.inc.php:1.13     Mon May 17 14:54:41 2004
+++ phpgwapi/inc/class.gdgraph.inc.php  Tue Jun  1 15:44:03 2004
@@ -646,14 +646,14 @@
                                        {
                                                
$this->img->Line(1+$x1,$y1+$w,$x2,$y2+$w);
                                        }*/
-                                       
$this->img->draw_rectangle($x1,$y1-5,$x2,$y2+5);
+                                       
$this->img->draw_rectangle(array($x1,$y1-5,$x2,$y2+5));
                                }
 
                                // progress
                                $this->img->SetColor(180, 180, 180);
                                if($x1 > 0 && $gx > 0 && $y1 > 0 && $y2 > 0)
                                {
-                                       
$this->img->draw_rectangle($x1,$y1-2,$gx,$y2+2);
+                                       
$this->img->draw_rectangle(array($x1,$y1-2,$gx,$y2+2));
                                }
 
                                //$color_index++;
@@ -727,7 +727,7 @@
                                $y = $this->graph_height - $this->margin_bottom 
- ($space * $linespace);
                                $this->img->MoveTo(1,$y);
 
-                               $strlen = $this->line_font_size==4?18:23;
+                               $strlen = $this->line_font_size==4?15:20;
 
                                if (strlen($ytext['title']) > $strlen)
                                {
@@ -735,6 +735,17 @@
                                } 
                                $this->img->DrawText(array('text' => 
$ytext['title'],'justification' => 'left','margin_left' => $this->margin_left));
                                $space++;
+
+                               if($ytext['map'])
+                               {
+                                       $this->img->SetColor(0,0,0);
+                                       $map_start = 
(($this->img->GetFontWidth())*$strlen) + 10;
+                                       $map = array($map_start,$y + 
2,$map_start + 10,$y + 12);
+                                       $this->img->draw_rectangle($map);
+
+                                       $gantt_map[] = array('project_id'       
=> $ytext['project_id'],
+                                                                               
                'map'   => $map[0] . ',' . $map[1] . ',' . $map[2] . ',' . 
$map[3]);
+                               }
                        }
                        }
 
@@ -777,7 +788,8 @@
                        }
                        $img_file = $this->img->save_img();
                        $this->img->Done();
-                       return $img_file;
+                       return array('img_file' => $img_file,
+                                               'map'           => $gantt_map);
                }
 
                function Open()




reply via email to

[Prev in Thread] Current Thread [Next in Thread]