color library

Rikki Cattermole via Digitalmars-d digitalmars-d at puremagic.com
Mon Jun 22 01:08:27 PDT 2015


On 22/06/2015 7:55 p.m., Andrea Fontana wrote:
> On Sunday, 21 June 2015 at 15:42:39 UTC, Rikki Cattermole wrote:
>> interface IImage(COLOR) {
>>     @property {
>>         size_t width() @nogc nothrow;
>>         size_t height() @nogc nothrow;
>>         void* storage() @nogc nothrow;
>>     }
>>
>>     COLOR pixelAt(size_t x, size_t y) @nogc;
>>     void pixelStoreAt(size_t x, size_t y, COLOR value) @nogc;
>>
>>     // COLOR opIndex(size_t x, size_t y)
>>     // void opIndexAssign(COLOR value, size_t x, size_t y)
>> }
>
> What about alpha? I don't see it on "color" or "IImage".
>
> Anyway I always hope to have something like antigrain (heavily template
> based library for c++, really really fast!), implemented in D. Maybe you
> should check it for some ideas.

Why would IImage support alpha? Shouldn't that be on the color?
If so, the PR does support it see RGBA8 and friends.

I just had a look at antigrain. It really is beyond this code. Well and 
truly out of scope.


More information about the Digitalmars-d mailing list