05-05-2020, 10:41 AM
hdicoreArtColor.h includes a function to create a named custom color. According to the docs, the named color is automatically added to the swatches panel, even though "makeNamed" operated successfully.
Am I doing something wrong?
Also, how would one retrieve a named swatch color? I would expect to find it in either hdicoreArtColor.h or more likely hdicoreCurrentDocument.h, but don't see anything.
I would presume that a document's colors are stored in its dictionary and thought I could find named colors there, but stepping through the document dictionary I don't see any entries of ArtColorType (presumably because it's "Reserved for future use").
Any suggestions would be much appreciated.
Code:
hdi::core::ArtColor aColor = hdi::core::ArtColor::white();
bool success = aColor.makeNamed("TestColor");
Am I doing something wrong?
Also, how would one retrieve a named swatch color? I would expect to find it in either hdicoreArtColor.h or more likely hdicoreCurrentDocument.h, but don't see anything.
I would presume that a document's colors are stored in its dictionary and thought I could find named colors there, but stepping through the document dictionary I don't see any entries of ArtColorType (presumably because it's "Reserved for future use").
Any suggestions would be much appreciated.