D bindings to the GraphicsMagick library.
Revisão | bd1a27ba52f2e6a523ee5b53e900937acc1ad07f (tree) |
---|---|
Hora | 2023-07-23 08:38:37 |
Autor | Mio <stigma@disr...> |
Commiter | Mio |
[magickd] Add PixelWand.setColor
@@ -139,6 +139,28 @@ package(magickd): | ||
139 | 139 | } |
140 | 140 | |
141 | 141 | /// |
142 | + /// Sets the color of the pixel wand with a string. | |
143 | + /// | |
144 | + /// ```d | |
145 | + /// PixelWand pixel = PixelWand.create(); | |
146 | + /// // Supports Color Names, Hex Values, and RGB Values | |
147 | + /// pixel.color = "white"; | |
148 | + /// pixel.color = "#FFFFFF"; | |
149 | + /// pixel.color = "rgb(255, 255, 255)"; | |
150 | + /// ``` | |
151 | + /// | |
152 | + /// Params: | |
153 | + /// color = The pixel wand color | |
154 | + /// | |
155 | + /// See_Also: www.graphicsmagick.org/color.html for a full reference | |
156 | + /// of colours. | |
157 | + /// | |
158 | + @property public void color(string color_) | |
159 | + { | |
160 | + this.setColor(color_); | |
161 | + } | |
162 | + | |
163 | + /// | |
142 | 164 | /// Returns the black color of the pixel wand. |
143 | 165 | /// |
144 | 166 | /// The color is in the range of [0..MaxRGB]. |
@@ -259,31 +281,6 @@ package(magickd): | ||
259 | 281 | } |
260 | 282 | |
261 | 283 | /// |
262 | - /// Sets the color of the pixel wand with a string. | |
263 | - /// | |
264 | - /// ```d | |
265 | - /// PixelWand pixel = PixelWand.create(); | |
266 | - /// // Supports Color Names, Hex Values, and RGB Values | |
267 | - /// pixel.color = "white"; | |
268 | - /// pixel.color = "#FFFFFF"; | |
269 | - /// pixel.color = "rgb(255, 255, 255)"; | |
270 | - /// ``` | |
271 | - /// | |
272 | - /// Params: | |
273 | - /// color = The pixel wand color | |
274 | - /// | |
275 | - /// See_Also: www.graphicsmagick.org/color.html for a full reference | |
276 | - /// of colours. | |
277 | - /// | |
278 | - @property public void color(string color) | |
279 | - in { | |
280 | - assert(null !is this.ptr, "Attempting to use a PixelWand that hasn't been created."); | |
281 | - } | |
282 | - do { | |
283 | - PixelSetColor(this.ptr, toStringz(color)); | |
284 | - } | |
285 | - | |
286 | - /// | |
287 | 284 | /// Returns the normalized black color of the pixel wand. |
288 | 285 | /// |
289 | 286 | public double getBlack() |
@@ -514,6 +511,31 @@ package(magickd): | ||
514 | 511 | } |
515 | 512 | |
516 | 513 | /// |
514 | + /// Sets the color of the pixel wand with a string. | |
515 | + /// | |
516 | + /// ```d | |
517 | + /// PixelWand pixel = PixelWand.create(); | |
518 | + /// // Supports Color Names, Hex Values, and RGB Values | |
519 | + /// pixel.color = "white"; | |
520 | + /// pixel.color = "#FFFFFF"; | |
521 | + /// pixel.color = "rgb(255, 255, 255)"; | |
522 | + /// ``` | |
523 | + /// | |
524 | + /// Params: | |
525 | + /// color = The pixel wand color | |
526 | + /// | |
527 | + /// See_Also: www.graphicsmagick.org/color.html for a full reference | |
528 | + /// of colours. | |
529 | + /// | |
530 | + @property public void setColor(string color_) | |
531 | + in { | |
532 | + assert(null !is this.ptr, "Attempting to use a PixelWand that hasn't been created."); | |
533 | + } | |
534 | + do { | |
535 | + PixelSetColor(this.ptr, toStringz(color_)); | |
536 | + } | |
537 | + | |
538 | + /// | |
517 | 539 | /// Sets the black color of the pixel wand. |
518 | 540 | /// |
519 | 541 | /// The color must be in the range of [0..MaxRGB] |