Don't look for alpha in nanosvg color
Nanosvg colors are only RGB, so we will never get an alpha value here. Fixes https://gitlab.com/kicad/code/kicad/issues/13033
This commit is contained in:
parent
b6bd74d822
commit
436f95e02e
|
@ -73,16 +73,10 @@ bool SVG_IMPORT_PLUGIN::Load( const wxString& aFileName )
|
|||
|
||||
bool SVG_IMPORT_PLUGIN::Import()
|
||||
{
|
||||
auto alpha =
|
||||
[]( int color )
|
||||
{
|
||||
return color >> 24;
|
||||
};
|
||||
|
||||
for( NSVGshape* shape = m_parsedImage->shapes; shape != nullptr; shape = shape->next )
|
||||
{
|
||||
double lineWidth = shape->strokeWidth;
|
||||
bool filled = shape->fill.type == NSVG_PAINT_COLOR && alpha( shape->fill.color ) > 0;
|
||||
bool filled = shape->fill.type != NSVG_PAINT_NONE;
|
||||
|
||||
GRAPHICS_IMPORTER::POLY_FILL_RULE rule = GRAPHICS_IMPORTER::PF_NONZERO;
|
||||
|
||||
|
|
Loading…
Reference in New Issue