From 846bd1de37e9dfbbcf33f21d86e755ac833c4e5d Mon Sep 17 00:00:00 2001 From: Mike Wey Date: Thu, 24 Feb 2011 23:46:03 +0100 Subject: Add geometry argumants to Options.d, and add some documentation. --- dmagick/ColorRGB.d | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'dmagick/ColorRGB.d') diff --git a/dmagick/ColorRGB.d b/dmagick/ColorRGB.d index 777c300..94ff72f 100644 --- a/dmagick/ColorRGB.d +++ b/dmagick/ColorRGB.d @@ -53,55 +53,79 @@ class ColorRGB : Color super(color); } + /** + * The value for red as a byte + */ void redByte(ubyte red) { pixelPacket.red = ScaleCharToQuantum(red); } + ///ditto ubyte redByte() { return ScaleQuantumToChar(pixelPacket.red); } + /** + * The value for green as a byte + */ void greenByte(ubyte green) { pixelPacket.green = ScaleCharToQuantum(green); } + ///ditto ubyte greenByte() { return ScaleQuantumToChar(pixelPacket.green); } + /** + * The value for blue as a byte + */ void blueByte(ubyte blue) { pixelPacket.blue = ScaleCharToQuantum(blue); } + ///ditto ubyte blueByte() { return ScaleQuantumToChar(pixelPacket.blue); } + /** + * The value for red as a double in the range [0.0 .. 1.0] + */ void red(double red) { pixelPacket.red = scaleDoubleToQuantum(red); } + ///ditto double red() { return scaleQuantumToDouble(pixelPacket.red); } + /** + * The value for green as a double in the range [0.0 .. 1.0] + */ void green(double green) { pixelPacket.green = scaleDoubleToQuantum(green); } + ///ditto double green() { return scaleQuantumToDouble(pixelPacket.green); } + /** + * The value for blue as a double in the range [0.0 .. 1.0] + */ void blue(double blue) { pixelPacket.blue = scaleDoubleToQuantum(blue); } + ///ditto double blue() { return scaleQuantumToDouble(pixelPacket.blue); -- cgit v1.2.3