color lib

Manu via Digitalmars-d digitalmars-d at puremagic.com
Thu Oct 6 18:57:06 PDT 2016


On 7 October 2016 at 04:48, Random D user via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> On Thursday, 6 October 2016 at 14:53:52 UTC, Manu wrote:
>>
>> I've done another pass incorporating prior feedback, mostly focusing on
>> documentation.
>
>
> Just a quick minor comment on:
> A8  RGB!("a",ubyte,false,0)  8 bit alpha-only color type.
> -->
> Reads like, "False what ???". Also "What is 0 ???".
> -->
> How about RGB!("a", ubyte, Linear.No, Colorspace.sRGB) or something like
> that,
> since there's going to be a list of these in the docs.
>
> What does colorspace 0 mean actually? (AdobeRGB??? i.e. first from
> colorspace enum according the docs).

It's kind of upsetting that the docs don't show the default arg as the
enum it is...
The struct is defined:
  struct RGB(string components_, ComponentType_, bool linear_ = false,
RGBColorSpace colorSpace_ = RGBColorSpace.sRGB)

I don't know why the docs translate that to be '0'? Why not just omit
the default args from the docs as they are in the code:
  alias A8 = RGB!("a", ubyte);

??

It also seems the docs have rearranged the order of the enum... seriously?
Why wouldn't that retain the order the programmer specified?

Regarding 'Linear.No'... yeah... I dunno. I've had this argument before.
I really hate that pattern. If it's required, I'll do it, otherwise
I'm really not enthusiastic about it personally.
It just seems like pointless bloat in symbol names to me, is if they
weren't already bloated enough.


More information about the Digitalmars-d mailing list