D bindings to the GraphicsMagick library.
Revision | c467022db72df2e36c7c6a434c4301b10c555134 (tree) |
---|---|
Zeit | 2023-07-23 13:18:43 |
Autor | Mio <stigma@disr...> |
Commiter | Mio |
[magickd] Add PixelWand color setters
@@ -25,7 +25,7 @@ module magickd.pixel_wand; | ||
25 | 25 | |
26 | 26 | import std.string : toStringz; |
27 | 27 | |
28 | -import graphicsmagick_c.magick.image : Quantum; | |
28 | +import graphicsmagick_c.magick.image : PixelPacket, Quantum; | |
29 | 29 | |
30 | 30 | import graphicsmagick_c.wand.pixel_wand; |
31 | 31 | import graphicsmagick_c.wand.pixel_wand : cPixelWand = PixelWand; |
@@ -147,6 +147,54 @@ package(magickd): | ||
147 | 147 | } |
148 | 148 | |
149 | 149 | /// |
150 | + /// Sets the normalized cyan color of the pixel wand. | |
151 | + /// | |
152 | + @property public void cyan(double cyan_) | |
153 | + { | |
154 | + this.setCyan(cyan_); | |
155 | + } | |
156 | + | |
157 | + /// | |
158 | + /// Sets the normalized green color of the pixel wand. | |
159 | + /// | |
160 | + @property public void green(double green_) | |
161 | + { | |
162 | + this.setGreen(green_); | |
163 | + } | |
164 | + | |
165 | + /// | |
166 | + /// Sets the normalized magenta color of the pixel wand. | |
167 | + /// | |
168 | + @property public void magenta(double magenta_) | |
169 | + { | |
170 | + this.setMagenta(magenta_); | |
171 | + } | |
172 | + | |
173 | + /// | |
174 | + /// Sets the normalized opacity of the pixel wand. | |
175 | + /// | |
176 | + @property public void opacity(double opacity_) | |
177 | + { | |
178 | + this.setOpacity(opacity_); | |
179 | + } | |
180 | + | |
181 | + /// | |
182 | + /// Sets the normalized red color of the pixel wand. | |
183 | + /// | |
184 | + @property public void red(double red_) | |
185 | + { | |
186 | + this.setRed(red_); | |
187 | + } | |
188 | + | |
189 | + /// | |
190 | + /// Sets the normalized yellow color of the pixel wand. | |
191 | + /// | |
192 | + @property public void yellow(double yellow_) | |
193 | + { | |
194 | + this.setYellow(yellow_); | |
195 | + } | |
196 | + | |
197 | + /// | |
150 | 198 | /// Sets the color of the pixel wand with a string. |
151 | 199 | /// |
152 | 200 | /// ```d |
@@ -551,6 +599,72 @@ package(magickd): | ||
551 | 599 | } |
552 | 600 | |
553 | 601 | /// |
602 | + /// Sets the normalized cyan color of the pixel wand. | |
603 | + /// | |
604 | + public void setCyan(double cyan_) | |
605 | + in { | |
606 | + assert(null !is this.ptr, "Attempting to use a PixelWand that hasn't been created."); | |
607 | + } | |
608 | + do { | |
609 | + PixelSetCyan(this.ptr, cyan_); | |
610 | + } | |
611 | + | |
612 | + /// | |
613 | + /// Sets the normalized green color of the pixel wand. | |
614 | + /// | |
615 | + public void setGreen(double green_) | |
616 | + in { | |
617 | + assert(null !is this.ptr, "Attempting to use a PixelWand that hasn't been created."); | |
618 | + } | |
619 | + do { | |
620 | + PixelSetGreen(this.ptr, green_); | |
621 | + } | |
622 | + | |
623 | + /// | |
624 | + /// Sets the normalized magenta color of the pixel wand. | |
625 | + /// | |
626 | + public void setMagenta(double magenta_) | |
627 | + in { | |
628 | + assert(null !is this.ptr, "Attempting to use a PixelWand that hasn't been created."); | |
629 | + } | |
630 | + do { | |
631 | + PixelSetMagenta(this.ptr, magenta_); | |
632 | + } | |
633 | + | |
634 | + /// | |
635 | + /// Sets the normalized opacity of the pixel wand. | |
636 | + /// | |
637 | + public void setOpacity(double opacity_) | |
638 | + in { | |
639 | + assert(null !is this.ptr, "Attempting to use a PixelWand that hasn't been created."); | |
640 | + } | |
641 | + do { | |
642 | + PixelSetOpacity(this.ptr, opacity_); | |
643 | + } | |
644 | + | |
645 | + /// | |
646 | + /// Sets the normalized red color of the pixel wand. | |
647 | + /// | |
648 | + public void setRed(double red_) | |
649 | + in { | |
650 | + assert(null !is this.ptr, "Attempting to use a PixelWand that hasn't been created."); | |
651 | + } | |
652 | + do { | |
653 | + PixelSetRed(this.ptr, red_); | |
654 | + } | |
655 | + | |
656 | + /// | |
657 | + /// Sets the normalized yellow color of the pixel wand. | |
658 | + /// | |
659 | + public void setYellow(double yellow_) | |
660 | + in { | |
661 | + assert(null !is this.ptr, "Attempting to use a PixelWand that hasn't been created."); | |
662 | + } | |
663 | + do { | |
664 | + PixelSetYellow(this.ptr, yellow_); | |
665 | + } | |
666 | + | |
667 | + /// | |
554 | 668 | /// Sets the color of the pixel wand with a string. |
555 | 669 | /// |
556 | 670 | /// ```d |