PluginProbe
QuickWebP – WebP & AVIF Image Optimizer, Compression & SEO for WordPress / 3.2.1
QuickWebP – WebP & AVIF Image Optimizer, Compression & SEO for WordPress v3.2.1
4.1.2 4.1.1 4.1.0 4.0.1 4.0.0 3.3.1 3.3.0 trunk 1.0.0 2.0.0 2.1.0 3.0.0 3.1.0 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8
quickwebp / includes / vendor / intervention / image / src / Intervention / Image / Point.php

Point.php in QuickWebP – WebP & AVIF Image Optimizer, Compression & SEO for WordPress 3.2.1, at includes/vendor/intervention/image/src/Intervention/Image/Point.php

65 lines 957 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Intervention\Image;
4
5 class Point
6 {
7 /**
8 * X coordinate
9 *
10 * @var int
11 */
12 public $x;
13
14 /**
15 * Y coordinate
16 *
17 * @var int
18 */
19 public $y;
20
21 /**
22 * Creates a new instance
23 *
24 * @param int $x
25 * @param int $y
26 */
27 public function __construct($x = null, $y = null)
28 {
29 $this->x = is_numeric($x) ? intval($x) : 0;
30 $this->y = is_numeric($y) ? intval($y) : 0;
31 }
32
33 /**
34 * Sets X coordinate
35 *
36 * @param int $x
37 */
38 public function setX($x)
39 {
40 $this->x = intval($x);
41 }
42
43 /**
44 * Sets Y coordinate
45 *
46 * @param int $y
47 */
48 public function setY($y)
49 {
50 $this->y = intval($y);
51 }
52
53 /**
54 * Sets both X and Y coordinate
55 *
56 * @param int $x
57 * @param int $y
58 */
59 public function setPosition($x, $y)
60 {
61 $this->setX($x);
62 $this->setY($y);
63 }
64 }
65