forked from halo-battle/game
Upgrade jpgrah to 4.3.4
This commit is contained in:
parent
7c3999c5cd
commit
b5868f05f6
72 changed files with 19157 additions and 10327 deletions
|
|
@ -1,11 +1,11 @@
|
|||
<?php
|
||||
//=======================================================================
|
||||
// File: JPGRAPH_ICONPLOT.PHP
|
||||
// Description: PHP4 Graph Plotting library. Extension module.
|
||||
// Created: 2004-02-18
|
||||
// Ver: $Id: jpgraph_iconplot.php 781 2006-10-08 08:07:47Z ljp $
|
||||
// File: JPGRAPH_ICONPLOT.PHP
|
||||
// Description: Extension module to add icons to plots
|
||||
// Created: 2004-02-18
|
||||
// Ver: $Id: jpgraph_iconplot.php 1404 2009-06-28 15:25:41Z ljp $
|
||||
//
|
||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||
// Copyright (c) Asial Corporation. All rights reserved.
|
||||
//========================================================================
|
||||
|
||||
|
||||
|
|
@ -31,7 +31,7 @@ class IconPlot
|
|||
private $iImgString='';
|
||||
|
||||
|
||||
public function IconPlot($aFile="", $aX=0, $aY=0, $aScale=1.0, $aMix=100)
|
||||
public function __construct($aFile="", $aX=0, $aY=0, $aScale=1.0, $aMix=100)
|
||||
{
|
||||
$this->iFile = $aFile;
|
||||
$this->iX=$aX;
|
||||
|
|
@ -95,7 +95,7 @@ class IconPlot
|
|||
$this->iHorAnchor=$aXAnchor;
|
||||
$this->iVertAnchor=$aYAnchor;
|
||||
}
|
||||
|
||||
|
||||
public function PreStrokeAdjust($aGraph)
|
||||
{
|
||||
// Nothing to do ...
|
||||
|
|
@ -143,15 +143,15 @@ class IconPlot
|
|||
return true;
|
||||
}
|
||||
|
||||
public function Stroke($aImg, $axscale, $ayscale)
|
||||
public function Stroke($aImg, $axscale=null, $ayscale=null)
|
||||
{
|
||||
$this->StrokeWithScale($aImg, $axscale, $ayscale);
|
||||
}
|
||||
|
||||
public function StrokeWithScale($aImg, $axscale, $ayscale)
|
||||
{
|
||||
if ($this->iScalePosX === null ||
|
||||
$this->iScalePosY === null) {
|
||||
if ($this->iScalePosX === null || $this->iScalePosY === null ||
|
||||
$axscale === null || $ayscale === null) {
|
||||
$this->_Stroke($aImg);
|
||||
} else {
|
||||
$this->_Stroke(
|
||||
|
|
@ -188,7 +188,7 @@ class IconPlot
|
|||
|
||||
$iconw = imagesx($gdimg);
|
||||
$iconh = imagesy($gdimg);
|
||||
|
||||
|
||||
if ($aReturnWidthHeight) {
|
||||
return array(round($iconw*$this->iScale),round($iconh*$this->iScale));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue