+bool CurveCreator_Curve::setColorSection( int SectInd, Quantity_Color theNewColor )
+{
+ bool res = false;
+ // Set the difference.
+ startOperation();
+
+ int ColorParam[3] = { (int)( theNewColor.Red() * 255 ),
+ (int)( theNewColor.Green() * 255 ),
+ (int)( theNewColor.Blue() * 255 ) };
+
+ if (addEmptyDiff())
+ myListDiffs.back().init(this, CurveCreator_Operation::SetColorSection, SectInd, ColorParam);
+
+ setColorSectionInternal(SectInd, theNewColor);
+
+ finishOperation();
+ return res;
+}
+
+void CurveCreator_Curve::setColorSectionInternal( int SectInd, Quantity_Color theNewColor )
+{
+ CurveCreator_Section* aSec = (CurveCreator_Section*)(getSection(SectInd));
+ aSec->myColor = theNewColor;
+
+ redisplayCurve(false);
+}
+
+Quantity_Color CurveCreator_Curve::getColorSection( int SectInd ) const
+{
+ CurveCreator_Section* aSec = (CurveCreator_Section*)(getSection(SectInd));
+ return aSec->myColor;
+}
+
+Quantity_Color CurveCreator_Curve::getLastRemovedColor() const
+{
+ return myRemColors.empty() ? Quantity_NOC_BLACK : myRemColors.back();
+}
+
+void CurveCreator_Curve::popLastRemovedColor()
+{
+ myRemColors.pop_back();
+}
+