20 #ifndef MODEL_ATTRIBUTEIMAGE_H_
21 #define MODEL_ATTRIBUTEIMAGE_H_
24 #include <ModelAPI_AttributeImage.h>
26 #include <TDF_Label.hxx>
46 MODEL_EXPORT
virtual void setTexture(
const int theWidth,
48 const std::list<unsigned char>& theByteArray,
49 const std::string& theFormat,
50 const bool sendUpdated =
true);
56 MODEL_EXPORT
virtual bool texture(
int& theWidth,
58 std::list<unsigned char>& theByteArray,
59 std::string& theFormat);
62 virtual void copyTo(std::shared_ptr<ModelAPI_AttributeImage> theTarget)
const;
API for the attribute that contains binary data.
Definition: ModelAPI_AttributeImage.h:37
API for the attribute that contains image inside.
Definition: Model_AttributeImage.h:40
virtual MODEL_EXPORT void setTexture(const int theWidth, const int theHeight, const std::list< unsigned char > &theByteArray, const std::string &theFormat, const bool sendUpdated=true)
Defines the value of the image attribute.
Definition: Model_AttributeImage.cpp:35
virtual MODEL_EXPORT bool hasTexture()
Returns true, if texture width and height are non-zero.
Definition: Model_AttributeImage.cpp:75
virtual void reinit()
Reinitializes the internal state of the attribute (may be needed on undo/redo, abort,...
Definition: Model_AttributeImage.cpp:144
Model_AttributeImage(TDF_Label &theLabel)
Initializes attributes.
Definition: Model_AttributeImage.cpp:138
virtual MODEL_EXPORT bool texture(int &theWidth, int &theHeight, std::list< unsigned char > &theByteArray, std::string &theFormat)
Returns the value of the image attribute.
Definition: Model_AttributeImage.cpp:90
virtual void copyTo(std::shared_ptr< ModelAPI_AttributeImage > theTarget) const
Copy the image data to the destination attribute.
Definition: Model_AttributeImage.cpp:126
General object of the application that allows to get/set attributes from the document and compute res...
Definition: Model_Data.h:62