Skip to content

Commit

Permalink
Fix PHP 8.2 deprication warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
foadadeli authored Apr 23, 2024
1 parent e36d951 commit 898d6f4
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/phplot.php
Original file line number Diff line number Diff line change
Expand Up @@ -1908,7 +1908,7 @@ protected function ProcessTextGD($draw_it, $font, $angle, $x, $y, $color, $text,
$y = $ypos - $r10 * $factor;

// Call ImageString or ImageStringUp:
$draw_func($this->img, $font_number, $x, $y, $lines[$i], $color);
$draw_func($this->img, $font_number, (int)$x, (int)$y, $lines[$i], (int)$color);

// Step to the next line of text. This is a rotation of (x=0, y=interline_spacing)
$xpos += $r01 * $interline_step;
Expand Down Expand Up @@ -7520,10 +7520,10 @@ protected function DrawLegend()
// Draw color boxes:
ImageFilledRectangle(
$this->img,
$dot_left_x,
$y1,
$dot_right_x,
$y2,
(int) $dot_left_x,
(int) $y1,
(int) $dot_right_x,
(int) $y2,
$this->ndx_data_colors[$color_index]
);
// Draw a rectangle around the box, if enabled.
Expand Down Expand Up @@ -8327,13 +8327,13 @@ protected function DrawPieChart()
// Draw the slice
ImageFilledArc(
$this->img,
$xpos,
$ypos + $h,
$pie_width,
$pie_height,
$arc_end_angle,
$arc_start_angle,
$slicecol,
(int) $xpos,
(int) $ypos + $h,
(int) $pie_width,
(int) $pie_height,
(int) $arc_end_angle,
(int) $arc_start_angle,
(int) $slicecol,
IMG_ARC_PIE
);

Expand Down Expand Up @@ -10029,4 +10029,4 @@ protected function DrawError($error_message)
}

// PRS12: Move subclasses to separate files
// require_once 'phplot_truecolor.php';
// require_once 'phplot_truecolor.php';

0 comments on commit 898d6f4

Please sign in to comment.