mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 23:46:24 -06:00
FIX: color is not correct after sync ams
Change-Id: Ib681f84c3b2d8267fa832072a32d1f49c21145fd
This commit is contained in:
parent
c351ac54aa
commit
65ea350f01
2 changed files with 18 additions and 0 deletions
|
@ -430,6 +430,14 @@ wxBitmap BitmapCache::mksolid(size_t width, size_t height, unsigned char r, unsi
|
|||
|
||||
bool BitmapCache::parse_color(const std::string& scolor, unsigned char* rgb_out)
|
||||
{
|
||||
if (scolor.size() == 9) {
|
||||
unsigned char rgba[4];
|
||||
parse_color4(scolor, rgba);
|
||||
rgb_out[0] = rgba[0];
|
||||
rgb_out[1] = rgba[1];
|
||||
rgb_out[2] = rgba[2];
|
||||
return true;
|
||||
}
|
||||
rgb_out[0] = rgb_out[1] = rgb_out[2] = 0;
|
||||
if (scolor.size() != 7 || scolor.front() != '#')
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue