mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-11-24 14:30:54 -05:00
FIX: load_from_svg_file_change_color() supports 8bit colour values
JIRA: nojira Change-Id: I72e68bd9cb547064736d130205074da0e7eabd60 (cherry picked from commit 8bdac292a0bd34786189f4ca320f646340157d2c)
This commit is contained in:
1 parent
94abdf8088
commit
9380260a74
2 files changed
+5
-3
No files matched your search
@@ -561,8 +561,10 @@ bool BitmapCache::load_from_svg_file_change_color(const std::string &filename, u
|
||||
if (image == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
unsigned int change_color = nsvg__parseColorHex(hexColor);
|
||||
char temp_color[8];
|
||||
strncpy(temp_color, hexColor, 7);
|
||||
temp_color[7] = '\0';
|
||||
unsigned int change_color = nsvg__parseColorHex(temp_color);
|
||||
change_color |= (unsigned int) (1.0f * 255) << 24; // opacity
|
||||
unsigned int green_color = 4282560000;
|
||||
for (NSVGshape* shape = image->shapes; shape != nullptr; shape = shape->next) {
|
||||
|
||||
Reference in new issue
Block a user