• R/O
  • HTTP
  • SSH
  • HTTPS

提交

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

修订版125667a2836b6a8155114591db7df867d9589734 (tree)
时间2023-07-23 08:30:43
作者Mio <stigma@disr...>
CommiterMio

Log Message

[magickd] Add PixelWand getters for quantum colors

更改概述

差异

--- a/source/magickd/pixel_wand.d
+++ b/source/magickd/pixel_wand.d
@@ -163,6 +163,78 @@ package(magickd):
163163 }
164164
165165 ///
166+ /// Returns the cyan color of the pixel wand.
167+ ///
168+ /// The color is in the range of [0..MaxRGB].
169+ ///
170+ /// MaxRGB = [Q8: `255`, Q16: `65_535`, Q32: `4_294_967_295`].
171+ ///
172+ @property public Quantum quantumCyan()
173+ {
174+ return this.getQuantumCyan();
175+ }
176+
177+ ///
178+ /// Returns the green color of the pixel wand.
179+ ///
180+ /// The color is in the range of [0..MaxRGB].
181+ ///
182+ /// MaxRGB = [Q8: `255`, Q16: `65_535`, Q32: `4_294_967_295`].
183+ ///
184+ @property public Quantum quantumGreen()
185+ {
186+ return this.getQuantumGreen();
187+ }
188+
189+ ///
190+ /// Returns the magenta color of the pixel wand.
191+ ///
192+ /// The color is in the range of [0..MaxRGB].
193+ ///
194+ /// MaxRGB = [Q8: `255`, Q16: `65_535`, Q32: `4_294_967_295`].
195+ ///
196+ @property public Quantum quantumMagenta()
197+ {
198+ return this.getQuantumMagenta();
199+ }
200+
201+ ///
202+ /// Returns the opacity of the pixel wand.
203+ ///
204+ /// The color is in the range of [0..MaxRGB].
205+ ///
206+ /// MaxRGB = [Q8: `255`, Q16: `65_535`, Q32: `4_294_967_295`].
207+ ///
208+ @property public Quantum quantumOpacity()
209+ {
210+ return this.getQuantumOpacity();
211+ }
212+
213+ ///
214+ /// Returns the red color of the pixel wand.
215+ ///
216+ /// The color is in the range of [0..MaxRGB].
217+ ///
218+ /// MaxRGB = [Q8: `255`, Q16: `65_535`, Q32: `4_294_967_295`].
219+ ///
220+ @property public Quantum quantumRed()
221+ {
222+ return this.getQuantumRed();
223+ }
224+
225+ ///
226+ /// Returns the yellow color of the pixel wand.
227+ ///
228+ /// The color is in the range of [0..MaxRGB].
229+ ///
230+ /// MaxRGB = [Q8: `255`, Q16: `65_535`, Q32: `4_294_967_295`].
231+ ///
232+ @property public Quantum quantumYellow()
233+ {
234+ return this.getQuantumYellow();
235+ }
236+
237+ ///
166238 /// Sets the black color of the pixel wand.
167239 ///
168240 /// The color must be in the range of [0..MaxRGB]
@@ -330,6 +402,96 @@ package(magickd):
330402 }
331403
332404 ///
405+ /// Returns the cyan color of the pixel wand.
406+ ///
407+ /// The color is in the range of [0..MaxRGB].
408+ ///
409+ /// MaxRGB = [Q8: `255`, Q16: `65_535`, Q32: `4_294_967_295`].
410+ ///
411+ public Quantum getQuantumCyan()
412+ in {
413+ assert(null !is this.ptr, "Attempting to use a PixelWand that hasn't been created.");
414+ }
415+ do {
416+ return PixelGetCyanQuantum(this.ptr);
417+ }
418+
419+ ///
420+ /// Returns the green color of the pixel wand.
421+ ///
422+ /// The color is in the range of [0..MaxRGB].
423+ ///
424+ /// MaxRGB = [Q8: `255`, Q16: `65_535`, Q32: `4_294_967_295`].
425+ ///
426+ public Quantum getQuantumGreen()
427+ in {
428+ assert(null !is this.ptr, "Attempting to use a PixelWand that hasn't been created.");
429+ }
430+ do {
431+ return PixelGetGreenQuantum(this.ptr);
432+ }
433+
434+ ///
435+ /// Returns the magenta color of the pixel wand.
436+ ///
437+ /// The color is in the range of [0..MaxRGB].
438+ ///
439+ /// MaxRGB = [Q8: `255`, Q16: `65_535`, Q32: `4_294_967_295`].
440+ ///
441+ public Quantum getQuantumMagenta()
442+ in {
443+ assert(null !is this.ptr, "Attempting to use a PixelWand that hasn't been created.");
444+ }
445+ do {
446+ return PixelGetMagentaQuantum(this.ptr);
447+ }
448+
449+ ///
450+ /// Returns the opacity of the pixel wand.
451+ ///
452+ /// The color is in the range of [0..MaxRGB].
453+ ///
454+ /// MaxRGB = [Q8: `255`, Q16: `65_535`, Q32: `4_294_967_295`].
455+ ///
456+ public Quantum getQuantumOpacity()
457+ in {
458+ assert(null !is this.ptr, "Attempting to use a PixelWand that hasn't been created.");
459+ }
460+ do {
461+ return PixelGetOpacityQuantum(this.ptr);
462+ }
463+
464+ ///
465+ /// Returns the red color of the pixel wand.
466+ ///
467+ /// The color is in the range of [0..MaxRGB].
468+ ///
469+ /// MaxRGB = [Q8: `255`, Q16: `65_535`, Q32: `4_294_967_295`].
470+ ///
471+ public Quantum getQuantumRed()
472+ in {
473+ assert(null !is this.ptr, "Attempting to use a PixelWand that hasn't been created.");
474+ }
475+ do {
476+ return PixelGetRedQuantum(this.ptr);
477+ }
478+
479+ ///
480+ /// Returns the yellow color of the pixel wand.
481+ ///
482+ /// The color is in the range of [0..MaxRGB].
483+ ///
484+ /// MaxRGB = [Q8: `255`, Q16: `65_535`, Q32: `4_294_967_295`].
485+ ///
486+ public Quantum getQuantumYellow()
487+ in {
488+ assert(null !is this.ptr, "Attempting to use a PixelWand that hasn't been created.");
489+ }
490+ do {
491+ return PixelGetYellowQuantum(this.ptr);
492+ }
493+
494+ ///
333495 /// Sets the normalized black color of the pixel wand.
334496 ///
335497 public void setBlack(double black_)