Skip to content

Commit

Permalink
[TD]fix SectionFace hatch on SVG Export
Browse files Browse the repository at this point in the history
  • Loading branch information
WandererFan committed Dec 18, 2019
1 parent c05ad5c commit e499f38
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions src/Mod/TechDraw/Gui/QGIViewSection.cpp
Expand Up @@ -113,12 +113,19 @@ void QGIViewSection::drawSectionFace()
newFace->setFillColor(faceColor);
newFace->setFillStyle(Qt::SolidPattern);
} else if (section->CutSurfaceDisplay.isValue("SvgHatch")) {
newFace->isHatched(true);
newFace->setFillMode(QGIFace::SvgFill);
newFace->setHatchColor(sectionVp->HatchColor.getValue());
newFace->setHatchScale(section->HatchScale.getValue());
std::string hatchSpec = section->FileHatchPattern.getValue();
newFace->setHatchFile(hatchSpec);
if (getExporting()) {
newFace->hideSvg(true);
newFace->isHatched(false);
newFace->setFillMode(QGIFace::PlainFill);
} else {
newFace->hideSvg(false);
newFace->isHatched(true);
newFace->setFillMode(QGIFace::SvgFill);
newFace->setHatchColor(sectionVp->HatchColor.getValue());
newFace->setHatchScale(section->HatchScale.getValue());
std::string hatchSpec = section->FileHatchPattern.getValue();
newFace->setHatchFile(hatchSpec);
}
} else if (section->CutSurfaceDisplay.isValue("PatHatch")) {
newFace->isHatched(true);
newFace->setFillMode(QGIFace::GeomHatchFill);
Expand Down

0 comments on commit e499f38

Please sign in to comment.