• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

D bindings to the GraphicsMagick library.


Commit MetaInfo

Revisionbd1a27ba52f2e6a523ee5b53e900937acc1ad07f (tree)
Zeit2023-07-23 08:38:37
AutorMio <stigma@disr...>
CommiterMio

Log Message

[magickd] Add PixelWand.setColor

Ändern Zusammenfassung

Diff

--- a/source/magickd/pixel_wand.d
+++ b/source/magickd/pixel_wand.d
@@ -139,6 +139,28 @@ package(magickd):
139139 }
140140
141141 ///
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+ ///
142164 /// Returns the black color of the pixel wand.
143165 ///
144166 /// The color is in the range of [0..MaxRGB].
@@ -259,31 +281,6 @@ package(magickd):
259281 }
260282
261283 ///
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- ///
287284 /// Returns the normalized black color of the pixel wand.
288285 ///
289286 public double getBlack()
@@ -514,6 +511,31 @@ package(magickd):
514511 }
515512
516513 ///
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+ ///
517539 /// Sets the black color of the pixel wand.
518540 ///
519541 /// The color must be in the range of [0..MaxRGB]