svg: Use grouping

Uses existing grouping in SVG output.  Sets schematic components as a
grouped element in SVG as well as pcbnew elements per layer.

Fixes: lp:1011754
* https://bugs.launchpad.net/kicad/+bug/1011754
This commit is contained in:
Seth Hillbrand
2019-01-30 16:58:33 -08:00
parent 37741048ce
commit b14bc1bead
3 changed files with 37 additions and 0 deletions
+18
View File
@@ -288,6 +288,24 @@ void SVG_PLOTTER::SetCurrentLineWidth( int width, void* aData )
}
void SVG_PLOTTER::StartBlock( void* aData )
{
std::string* idstr = reinterpret_cast<std::string*>( aData );
fputs( "<svg:g ", outputFile );
if( idstr )
fprintf( outputFile, "id=\"%s\"", idstr->c_str() );
fprintf( outputFile, ">\n" );
}
void SVG_PLOTTER::EndBlock( void* aData )
{
fprintf( outputFile, "</g>\n" );
}
/* initialize m_red, m_green, m_blue ( 0 ... 255)
* from reduced values r, g ,b ( 0.0 to 1.0 )
*/