Message 1 of 2
Converting from ACI to RGB in AC2021
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to use AcCmColor to convert from ACI to RGB and it doesn't work.
union {
Adesk::UInt32 val;
Adesk::UInt8 rgbs[4];
} c;
AcCmColor s;
Adesk::UInt16 ic;
ic = inletColor;
Acad::ErrorStatus es = s.setColorIndex(ic);
c.val = s.getRGB();
int r = s.red();
int g = s.green();
int b = s.blue();
The last 4 lines all return zero. ic=5 and I can see the value in s looks okay with blue=5. mData values are fine. So why do all these methods fail in 2021? Since the SetColorMethod is deprecated I can't change the method. Is that why it fails? How to do this?
Thanks,
Dave