diff options
| author | Mike Wey | 2011-08-15 22:02:15 +0200 |
|---|---|---|
| committer | Mike Wey | 2011-08-15 22:02:15 +0200 |
| commit | 0b7d66fea114d6bc45586a8c62cd98df4ee7d507 (patch) | |
| tree | 12cf74764753fdd41950ef13a5aec09360e5e73c /dmagick/ColorRGB.d | |
| parent | e48e1f4f081a2c84addc604136c4383bb92de8c6 (diff) | |
Add ColorGray for grayscale colors.
Diffstat (limited to 'dmagick/ColorRGB.d')
| -rw-r--r-- | dmagick/ColorRGB.d | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/dmagick/ColorRGB.d b/dmagick/ColorRGB.d index 1cbd48d..80c85f9 100644 --- a/dmagick/ColorRGB.d +++ b/dmagick/ColorRGB.d @@ -26,12 +26,10 @@ class ColorRGB : Color */ this(ubyte red, ubyte green, ubyte blue, ubyte opacity = 0) { - super(); - - pixelPacket.red = ScaleCharToQuantum(red); - pixelPacket.green = ScaleCharToQuantum(green); - pixelPacket.blue = ScaleCharToQuantum(blue); - pixelPacket.opacity = ScaleCharToQuantum(opacity); + super(ScaleCharToQuantum(red), + ScaleCharToQuantum(green), + ScaleCharToQuantum(blue), + ScaleCharToQuantum(opacity)); } /** @@ -40,12 +38,10 @@ class ColorRGB : Color */ this(double red, double green, double blue, double opacity = 0) { - super(); - - pixelPacket.red = scaleDoubleToQuantum(red); - pixelPacket.green = scaleDoubleToQuantum(green); - pixelPacket.blue = scaleDoubleToQuantum(blue); - pixelPacket.opacity = scaleDoubleToQuantum(opacity); + super(scaleDoubleToQuantum(red), + scaleDoubleToQuantum(green), + scaleDoubleToQuantum(blue), + scaleDoubleToQuantum(opacity)); } /** |
