Skip to content

Commit

Permalink
avoid php deprecation warnings by ensuring integer values
Browse files Browse the repository at this point in the history
  • Loading branch information
remluben authored and AJRepo committed Aug 20, 2023
1 parent b9793bf commit b1adc25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/phplot.php
Original file line number Diff line number Diff line change
Expand Up @@ -2115,7 +2115,7 @@ protected function ProcessTextTTF($draw_it, $font, $angle, $x, $y, $color, $text
$ry = $qy + $r10 * $width_factor + $r11 * $font_height;

// Finally, draw the text:
ImageTTFText($this->img, $font_size, $angle, $rx, $ry, $color, $font_file, $lines[$i]);
ImageTTFText($this->img, $font_size, $angle, (int)$rx, (int)$ry, (int)$color, $font_file, $lines[$i]);

// Step to position of next line.
// This is a rotation of (x=0,y=height+line_spacing) by $angle:
Expand Down Expand Up @@ -7858,7 +7858,7 @@ protected function DrawBar(
}

// Draw the bar
ImageFilledRectangle($this->img, $x1, $y1, $x2, $y2, $data_color);
ImageFilledRectangle($this->img, (int)$x1, (int)$y1, (int)$x2, (int)$y2, (int)$data_color);

// Draw a shade, if shading is on.
if (isset($shade_color)) {
Expand Down

0 comments on commit b1adc25

Please sign in to comment.