Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | /** |
3 | * Pop PHP Framework (http://www.popphp.org/) |
4 | * |
5 | * @link https://github.com/popphp/popphp-framework |
6 | * @author Nick Sagona, III <dev@nolainteractive.com> |
7 | * @copyright Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com) |
8 | * @license http://www.popphp.org/license New BSD License |
9 | */ |
10 | |
11 | /** |
12 | * @namespace |
13 | */ |
14 | namespace Pop\Image\Type; |
15 | |
16 | |
17 | use Pop\Color\Color; |
18 | |
19 | /** |
20 | * Type interface |
21 | * |
22 | * @category Pop |
23 | * @package Pop\Image |
24 | * @author Nick Sagona, III <dev@nolainteractive.com> |
25 | * @copyright Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com) |
26 | * @license http://www.popphp.org/license New BSD License |
27 | * @version 4.0.0 |
28 | */ |
29 | interface TypeInterface |
30 | { |
31 | |
32 | /** |
33 | * Get the opacity |
34 | * |
35 | * @return int|float|null |
36 | */ |
37 | public function getOpacity(): int|float|null; |
38 | |
39 | /** |
40 | * Get fill color |
41 | * |
42 | * @return Color\ColorInterface |
43 | */ |
44 | public function getFillColor(): Color\ColorInterface; |
45 | |
46 | /** |
47 | * Get stroke color |
48 | * |
49 | * @return Color\ColorInterface |
50 | */ |
51 | public function getStrokeColor(): Color\ColorInterface; |
52 | |
53 | /** |
54 | * Get stroke width |
55 | * |
56 | * @return int |
57 | */ |
58 | public function getStrokeWidth(): int; |
59 | |
60 | /** |
61 | * Set fill color |
62 | * |
63 | * @param Color\ColorInterface $color |
64 | * @return TypeInterface |
65 | */ |
66 | public function setFillColor(Color\ColorInterface $color): TypeInterface; |
67 | |
68 | /** |
69 | * Set stroke color |
70 | * |
71 | * @param Color\ColorInterface $color |
72 | * @return TypeInterface |
73 | */ |
74 | public function setStrokeColor(Color\ColorInterface $color): TypeInterface; |
75 | |
76 | /** |
77 | * Set stroke width |
78 | * |
79 | * @param int $w |
80 | * @return TypeInterface |
81 | */ |
82 | public function setStrokeWidth(int $w): TypeInterface; |
83 | |
84 | /** |
85 | * Set the font size |
86 | * |
87 | * @param int $size |
88 | * @return TypeInterface |
89 | */ |
90 | public function size(int $size): TypeInterface; |
91 | |
92 | /** |
93 | * Set the font |
94 | * |
95 | * @param string $font |
96 | * @return TypeInterface |
97 | */ |
98 | public function font(string $font): TypeInterface; |
99 | |
100 | /** |
101 | * Set the X-position |
102 | * |
103 | * @param int $x |
104 | * @return TypeInterface |
105 | */ |
106 | public function x(int $x): TypeInterface; |
107 | |
108 | /** |
109 | * Set the Y-position |
110 | * |
111 | * @param int $y |
112 | * @return TypeInterface |
113 | */ |
114 | public function y(int $y): TypeInterface; |
115 | |
116 | /** |
117 | * Set both the X- and Y-positions |
118 | * |
119 | * @param int $x |
120 | * @param int $y |
121 | * @return TypeInterface |
122 | */ |
123 | public function xy(int $x, int $y): TypeInterface; |
124 | |
125 | /** |
126 | * Set the rotation of the text |
127 | * |
128 | * @param int $degrees |
129 | * @return TypeInterface |
130 | */ |
131 | public function rotate(int $degrees): TypeInterface; |
132 | |
133 | /** |
134 | * Set the opacity |
135 | * |
136 | * @param int|float $opacity |
137 | * @return TypeInterface |
138 | */ |
139 | public function setOpacity(int|float $opacity): TypeInterface; |
140 | |
141 | } |