Changeset 15 in flair-src for trunk/lib/FlairCore/src/Picture.cpp
- Timestamp:
- 04/08/16 15:40:57 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairCore/src/Picture.cpp
r2 r15 24 24 using std::string; 25 25 26 namespace flair 27 { 28 namespace gui 29 { 26 namespace flair { 27 namespace gui { 30 28 31 29 using namespace core; 32 30 33 Picture::Picture(const LayoutPosition* position,string name,const cvimage *image):SendData(position,name,"Picture",200) 34 { 35 this->image=image; 31 Picture::Picture(const LayoutPosition *position, string name, 32 const cvimage *image) 33 : SendData(position, name, "Picture", 200) { 34 this->image = image; 36 35 37 36 SetSendSize(image->GetDataType().GetSize()); 38 37 39 SetVolatileXmlProp("width",image->GetDataType().GetWidth());40 SetVolatileXmlProp("height",image->GetDataType().GetHeight());41 38 SetVolatileXmlProp("width", image->GetDataType().GetWidth()); 39 SetVolatileXmlProp("height", image->GetDataType().GetHeight()); 40 SendXml(); 42 41 } 43 42 44 Picture::~Picture() 45 { 43 Picture::~Picture() {} 44 45 void Picture::CopyDatas(char *buf) const { 46 if (image != NULL) { 47 image->GetMutex(); 48 memcpy(buf, image->img->imageData, image->GetDataType().GetSize()); 49 image->ReleaseMutex(); 50 } 46 51 } 47 48 49 void Picture::CopyDatas(char* buf) const50 {51 if(image!=NULL)52 {53 image->GetMutex();54 memcpy(buf,image->img->imageData,image->GetDataType().GetSize());55 image->ReleaseMutex();56 }57 }58 59 52 60 53 } // end namespace gui
Note:
See TracChangeset
for help on using the changeset viewer.