source: contrib/ProjectManager/inc/jpgraph-1.5.2/src/jpgraph_canvas.php @ 3594

Revision 3594, 1.4 KB checked in by afernandes, 13 years ago (diff)

Ticket #1416 - Disponibilizado o módulo ProjectManager? para a comunidade

  • Property svn:executable set to *
Line 
1<?php
2/*=======================================================================
3// File:        JPGRAPH_CANVAS.PHP
4// Description: Canvas drawing extension for JpGraph
5// Created:     2001-01-08
6// Author:      Johan Persson (johanp@aditus.nu)
7// Ver:         $Id: jpgraph_canvas.php 18250 2005-05-07 14:13:43Z ralfbecker $
8//
9// License:     This code is released under GPL 2.0
10// Copyright (C) 2001 Johan Persson
11//========================================================================
12*/
13
14//===================================================
15// CLASS CanvasGraph
16// Description: Creates a simple canvas graph which
17// might be used together with the basic Image drawing
18// primitives. Useful to auickoly produce some arbitrary
19// graphic which benefits from all the functionality in the
20// graph liek caching for example.
21//===================================================
22class CanvasGraph extends Graph {
23//---------------
24// CONSTRUCTOR
25    function CanvasGraph($aWidth=300,$aHeight=200,$aCachedName="",$timeout=0,$inline=1) {
26        $this->Graph($aWidth,$aHeight,$aCachedName,$timeout,$inline);
27    }
28
29//---------------
30// PUBLIC METHODS       
31
32    // Method description
33    function Stroke($aStrokeFileName="") {
34        if( $this->texts != null ) {
35            for($i=0; $i<count($this->texts); ++$i) {
36                $this->texts[$i]->Stroke($this->img);
37            }
38        }                               
39        // Stream the generated picture                                 
40        $this->cache->PutAndStream($this->img,$this->cache_name,$this->inline,$aStrokeFileName);       
41    }
42} // Class
43/* EOF */
44?>
Note: See TracBrowser for help on using the repository browser.