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_IMGTRANS.PHP
|
||||
// Description: Extension for JpGraph to do some simple img transformations
|
||||
// Created: 2003-09-06
|
||||
// Ver: $Id: jpgraph_imgtrans.php 781 2006-10-08 08:07:47Z ljp $
|
||||
// File: JPGRAPH_IMGTRANS.PHP
|
||||
// Description: Extension for JpGraph to do some simple img transformations
|
||||
// Created: 2003-09-06
|
||||
// Ver: $Id: jpgraph_imgtrans.php 1106 2009-02-22 20:16:35Z ljp $
|
||||
//
|
||||
// Copyright (c) Aditus Consulting. All rights reserved.
|
||||
// Copyright (c) Asial Corporation. All rights reserved.
|
||||
//========================================================================
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
|
|
@ -16,7 +16,7 @@ class ImgTrans
|
|||
{
|
||||
private $gdImg=null;
|
||||
|
||||
public function ImgTrans($aGdImg)
|
||||
public function __construct($aGdImg)
|
||||
{
|
||||
// Constructor
|
||||
$this->gdImg = $aGdImg;
|
||||
|
|
@ -30,7 +30,7 @@ class ImgTrans
|
|||
{
|
||||
|
||||
|
||||
// Parameter check
|
||||
// Parameter check
|
||||
if ($aHorizonPos < 0 || $aHorizonPos > 1.0) {
|
||||
JpGraphError::RaiseL(9001);
|
||||
//("Value for image transformation out of bounds.\nVanishing point on horizon must be specified as a value between 0 and 1.");
|
||||
|
|
@ -46,7 +46,7 @@ class ImgTrans
|
|||
} else {
|
||||
$hh = $h;
|
||||
}
|
||||
|
||||
|
||||
$newgdh = imagecreatetruecolor($ww, $hh);
|
||||
$crgb = new RGB($newgdh);
|
||||
$fillColor = $crgb->Allocate($aFillColor);
|
||||
|
|
@ -58,7 +58,7 @@ class ImgTrans
|
|||
}
|
||||
|
||||
$mid = round($w * $aHorizonPos);
|
||||
|
||||
|
||||
$last=$h;
|
||||
for ($y=0; $y < $h; ++$y) {
|
||||
$yp = $h-$y-1;
|
||||
|
|
@ -127,7 +127,7 @@ class ImgTrans
|
|||
} else {
|
||||
$ww = $w;
|
||||
}
|
||||
|
||||
|
||||
$newgdh = imagecreatetruecolor($ww, $hh);
|
||||
$crgb = new RGB($newgdh);
|
||||
$fillColor = $crgb->Allocate($aFillColor);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue