[TD]add separate property for geom hatch
This commit is contained in:
@@ -130,7 +130,7 @@ void QGIViewSection::drawSectionFace()
|
||||
} else if (section->CutSurfaceDisplay.isValue("PatHatch")) {
|
||||
newFace->isHatched(true);
|
||||
newFace->setFillMode(QGIFace::GeomHatchFill);
|
||||
newFace->setHatchColor(sectionVp->HatchColor.getValue());
|
||||
newFace->setHatchColor(sectionVp->GeomHatchColor.getValue());
|
||||
newFace->setHatchScale(section->HatchScale.getValue());
|
||||
newFace->setLineWeight(sectionVp->WeightPattern.getValue());
|
||||
std::vector<TechDraw::LineSet> lineSets = section->getDrawableLines(i);
|
||||
|
||||
@@ -46,6 +46,9 @@
|
||||
#include <Gui/ViewProvider.h>
|
||||
#include <Gui/WaitCursor.h>
|
||||
|
||||
#include <Mod/TechDraw/App/DrawHatch.h>
|
||||
#include <Mod/TechDraw/App/DrawGeomHatch.h>
|
||||
|
||||
#include "TaskSectionView.h"
|
||||
|
||||
#include "ViewProviderViewSection.h"
|
||||
@@ -67,7 +70,12 @@ ViewProviderViewSection::ViewProviderViewSection()
|
||||
ADD_PROPERTY_TYPE(CutSurfaceColor,(0.0,0.0,0.0),sgroup,App::Prop_None,"The color to shade the cut surface");
|
||||
//HatchCutSurface is obsolete - use CutSurfaceDisplay
|
||||
ADD_PROPERTY_TYPE(HatchCutSurface ,(false),hgroup,App::Prop_Hidden,"Hatch the cut surface");
|
||||
ADD_PROPERTY_TYPE(HatchColor,(0.0,0.0,0.0),hgroup,App::Prop_None,"The color of the hatch pattern");
|
||||
|
||||
ADD_PROPERTY_TYPE(HatchColor,(TechDraw::DrawHatch::prefSvgHatchColor()),
|
||||
hgroup,App::Prop_None,"The color of the Svg hatch pattern");
|
||||
ADD_PROPERTY_TYPE(GeomHatchColor,(TechDraw::DrawGeomHatch::prefGeomHatchColor()),
|
||||
hgroup,App::Prop_None,"The color of the Geometric hatch pattern");
|
||||
|
||||
ADD_PROPERTY_TYPE(WeightPattern,(0.1),hgroup,App::Prop_None,"GeomHatch pattern line thickness");
|
||||
|
||||
getParameters();
|
||||
@@ -103,6 +111,7 @@ void ViewProviderViewSection::onChanged(const App::Property* prop)
|
||||
if (prop == &WeightPattern ||
|
||||
// prop == &HatchCutSurface ||
|
||||
prop == &HatchColor ||
|
||||
prop == &GeomHatchColor ||
|
||||
// prop == &ShowCutSurface ||
|
||||
prop == &CutSurfaceColor ) {
|
||||
updateGraphic();
|
||||
@@ -178,8 +187,9 @@ void ViewProviderViewSection::getParameters(void)
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Colors");
|
||||
App::Color cutColor = App::Color((uint32_t) hGrp->GetUnsigned("CutSurfaceColor", 0xC8C8C800));
|
||||
CutSurfaceColor.setValue(cutColor);
|
||||
App::Color hatchColor = App::Color((uint32_t) hGrp->GetUnsigned("SectionHatchColor", 0x00000000));
|
||||
HatchColor.setValue(hatchColor);
|
||||
|
||||
// App::Color hatchColor = App::Color((uint32_t) hGrp->GetUnsigned("SectionHatchColor", 0x00000000));
|
||||
// HatchColor.setValue(hatchColor);
|
||||
|
||||
hGrp = App::GetApplication().GetUserParameter()
|
||||
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/PAT");
|
||||
|
||||
@@ -48,6 +48,7 @@ public:
|
||||
App::PropertyColor CutSurfaceColor;
|
||||
App::PropertyBool HatchCutSurface; //obsolete - use CutSurfaceDisplay
|
||||
App::PropertyColor HatchColor;
|
||||
App::PropertyColor GeomHatchColor;
|
||||
App::PropertyFloat WeightPattern;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user