Skip to content

Commit 898d6f4

Browse files
authored
Fix PHP 8.2 deprication warnings
1 parent e36d951 commit 898d6f4

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/phplot.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1908,7 +1908,7 @@ protected function ProcessTextGD($draw_it, $font, $angle, $x, $y, $color, $text,
19081908
$y = $ypos - $r10 * $factor;
19091909

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

19131913
// Step to the next line of text. This is a rotation of (x=0, y=interline_spacing)
19141914
$xpos += $r01 * $interline_step;
@@ -7520,10 +7520,10 @@ protected function DrawLegend()
75207520
// Draw color boxes:
75217521
ImageFilledRectangle(
75227522
$this->img,
7523-
$dot_left_x,
7524-
$y1,
7525-
$dot_right_x,
7526-
$y2,
7523+
(int) $dot_left_x,
7524+
(int) $y1,
7525+
(int) $dot_right_x,
7526+
(int) $y2,
75277527
$this->ndx_data_colors[$color_index]
75287528
);
75297529
// Draw a rectangle around the box, if enabled.
@@ -8327,13 +8327,13 @@ protected function DrawPieChart()
83278327
// Draw the slice
83288328
ImageFilledArc(
83298329
$this->img,
8330-
$xpos,
8331-
$ypos + $h,
8332-
$pie_width,
8333-
$pie_height,
8334-
$arc_end_angle,
8335-
$arc_start_angle,
8336-
$slicecol,
8330+
(int) $xpos,
8331+
(int) $ypos + $h,
8332+
(int) $pie_width,
8333+
(int) $pie_height,
8334+
(int) $arc_end_angle,
8335+
(int) $arc_start_angle,
8336+
(int) $slicecol,
83378337
IMG_ARC_PIE
83388338
);
83398339

@@ -10029,4 +10029,4 @@ protected function DrawError($error_message)
1002910029
}
1003010030

1003110031
// PRS12: Move subclasses to separate files
10032-
// require_once 'phplot_truecolor.php';
10032+
// require_once 'phplot_truecolor.php';

0 commit comments

Comments
 (0)