Skip to content

Commit

Permalink
BoardGerberExport: Cleanup circle drawing code
Browse files Browse the repository at this point in the history
  • Loading branch information
ubruhin committed Aug 31, 2019
1 parent 9150f41 commit d27b74f
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions libs/librepcb/project/boards/boardgerberexport.cpp
Expand Up @@ -483,14 +483,15 @@ void BoardGerberExport::drawFootprint(GerberGenerator& gen,
? GraphicsLayer::getMirroredLayerName(layerName)
: layerName;
if (layer == circle.getLayerName()) {
Circle e = circle;
if (footprint.getIsMirrored())
e.setCenter(e.getCenter().mirrored(Qt::Horizontal));
e.setCenter(e.getCenter() + footprint.getPosition());
e.setLineWidth(calcWidthOfLayer(e.getLineWidth(), layer));
gen.drawCircleOutline(e);
if (e.isFilled()) {
gen.drawCircleArea(e);
Circle copy = circle;
Point absolutePos = copy.getCenter();
if (footprint.getIsMirrored()) absolutePos.mirror(Qt::Horizontal);
absolutePos += footprint.getPosition();
copy.setCenter(absolutePos);
copy.setLineWidth(calcWidthOfLayer(copy.getLineWidth(), layer));
gen.drawCircleOutline(copy);
if (copy.isFilled()) {
gen.drawCircleArea(copy);
}
}
}
Expand Down

0 comments on commit d27b74f

Please sign in to comment.