Salome HOME
bos #26449: SHAPER: save imported images
[modules/shaper.git] / src / ModelAPI / ModelAPI_Tools.h
index e740cd1c95c59801de766a54963eb8fc1f01fcf5..bf49fe5dfd510b2154a0a9ef6c5d1997c50b408b 100644 (file)
@@ -50,7 +50,7 @@ MODELAPI_EXPORT std::shared_ptr<GeomAPI_Shape> shape(
 MODELAPI_EXPORT std::string getFeatureError(const std::shared_ptr<ModelAPI_Feature>& theFeature);
 
 /*!
- * Searches for variable with name \param theName in \param theDocument. 
+ * Searches for variable with name \param theName in \param theDocument.
  * If found, set it value in the \param outValue and returns true.
  * theSearcher must be located later in the history than the found variable.
  */
@@ -294,6 +294,13 @@ MODELAPI_EXPORT void setTransparency(std::shared_ptr<ModelAPI_Result> theResult,
 MODELAPI_EXPORT void copyVisualizationAttrs(std::shared_ptr<ModelAPI_Result> theSource,
                                             std::shared_ptr<ModelAPI_Result> theDest);
 
+/*! Copies image attribute from one result to another.
+* \param theSource a result that contains the image data
+* \param theDest a destination result that takes the image data
+*/
+MODELAPI_EXPORT void copyImageAttribute(std::shared_ptr<ModelAPI_Result> theSource,
+                                        std::shared_ptr<ModelAPI_Result> theDest);
+
 /*! Produces list of features that reference to the given target (directly or through sub-results)
 * \param theTarget the referenced result
 * \param theFeatureKind the resulting features filter: the feature kind or all for the empty string
@@ -302,6 +309,16 @@ MODELAPI_EXPORT void copyVisualizationAttrs(std::shared_ptr<ModelAPI_Result> the
 MODELAPI_EXPORT std::list<std::shared_ptr<ModelAPI_Feature> > referencedFeatures(
   std::shared_ptr<ModelAPI_Result> theTarget, const std::string& theFeatureKind,
   const bool theSortResults);
+
+
+/*! Returns a container with the current color value.
+*   These are tree int values for RGB definition.
+*   It returns the next random color.
+* \param theValues vector of values
+* \param theReset flag to call when disabling Auto-color
+*/
+MODELAPI_EXPORT void findRandomColor(std::vector<int>& theValues, bool theReset = false);
+
 }
 
 #endif