Phpledads 2.2 > Ledads / Lib / Jpgraph / Jpgraph Canvas.php

Questions? Need Help? Want to share? » PHP Forum
Script Name:
Phpledads 2.2

Download:
phpledads-2.2.zip

Category:
Ad Management

Archive Content:

Ledads

Ledads > Dev

Ledads > Lib

Ledads > Lib > Jpgraph

Ledads > Lib > Jpgraph > TTF

Ledads > Lib > Jpgraph

Ledads > Lib

Ledads > Data

Ledads

Jpgraph Canvas.php:


<?php
/*=======================================================================
// File:     JPGRAPH_CANVAS.PHP
// Description:    Canvas drawing extension for JpGraph
// Created:     2001-01-08
// Author:    Johan Persson (johanp <at> aditus <dot> nu)
// Ver:        $Id: jpgraph_canvas.php, v 1.12 2003/01/09 12:56:56 aditus Exp $
//
// License:    This code is released under QPL
// Copyright (C) 2001, 2002 Johan Persson
//========================================================================
*/

//===================================================
// CLASS CanvasGraph
// Description: Creates a simple canvas graph which
// might be used together with the basic Image drawing
// primitives. Useful to auickoly produce some arbitrary
// graphic which benefits from all the functionality in the
// graph liek caching for example. 
//===================================================
class CanvasGraph extends Graph {
//---------------
// CONSTRUCTOR
    
function CanvasGraph($aWidth=300, $aHeight=200, $aCachedName="", $timeout=0, $inline=1) {
    
$this->Graph($aWidth, $aHeight, $aCachedName, $timeout, $inline);
    }

//---------------
// PUBLIC METHODS    

    
function InitFrame() {
    
$this->StrokePlotArea();
    }

    
// Method description
    
function Stroke($aStrokeFileName="") {
    if( 
$this->texts != null ) {
        for(
$i=0$i<count($this->texts); ++$i) {
        
$this->texts[$i]->Stroke($this->img);
        }
    }                
    
$this->StrokeTitles();

    
// If the filename is given as the special _IMG_HANDLER
    // then the image handler is returned and the image is NOT
    // streamed back
    
if( $aStrokeFileName == _IMG_HANDLER ) {
        return 
$this->img->img;
    }
    else {
        
// Finally stream the generated picture                    
        
$this->cache->PutAndStream($this->img, $this->cache_name, $this->inline,
                       
$aStrokeFileName);        
    }
    }
// Class
/* EOF */
?>


Other Ad Management Scripts:

WebMaster Resources Home

©RingsWorld.com