Skip to content

Commit

Permalink
Merge pull request #67 from szymach/tests
Browse files Browse the repository at this point in the history
Fixes, updated docs and Travis
  • Loading branch information
szymach authored Sep 17, 2020
2 parents 1ddb25a + ee05ae3 commit c71e1d8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ cache:

matrix:
include:
- php: 5.5
- php: 5.6
env:
- COMPOSER_FLAGS='--prefer-lowest'
- php: 7.0
- php: 7.1
- php: 7.2
Expand Down
4 changes: 2 additions & 2 deletions resources/doc/spline.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ use CpChart\Image;

// Create and populate data
$data = new Data();
$data->addPoints([], "Serie1")
$data->addPoints([], "Serie1");

// Create the image and set the data
$image = $factory->newImage(700, 230, $data);
$image = new Image(700, 230, $data);
$image->setShadow(true, ["X" => 1, "Y" => 1, "R" => 0, "G" => 0, "B" => 0, "Alpha" => 20]);

// 1st spline drawn in white with control points visible
Expand Down
1 change: 1 addition & 0 deletions src/Draw.php
Original file line number Diff line number Diff line change
Expand Up @@ -2489,6 +2489,7 @@ public function drawLegend($X, $Y, array $Format = [])
*/
public function drawScale(array $Format = [])
{
$FloatingOffset = 0;
$Pos = isset($Format["Pos"]) ? $Format["Pos"] : SCALE_POS_LEFTRIGHT;
$Floating = isset($Format["Floating"]) ? $Format["Floating"] : false;
$Mode = isset($Format["Mode"]) ? $Format["Mode"] : SCALE_MODE_FLOATING;
Expand Down
5 changes: 1 addition & 4 deletions src/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@ public function __construct(

$this->TransparentBackground = $TransparentBackground;

if ($DataSet) {
$this->DataSet = $DataSet;
}

$this->DataSet = null !== $DataSet ? $DataSet : new Data();
$this->XSize = $XSize;
$this->YSize = $YSize;
$this->Picture = imagecreatetruecolor($XSize, $YSize);
Expand Down
Empty file removed tests/_output/.gitkeep
Empty file.

0 comments on commit c71e1d8

Please sign in to comment.