Changeset 15 in flair-src for trunk/lib/FlairCore/src/Picture.cpp


Ignore:
Timestamp:
04/08/16 15:40:57 (6 years ago)
Author:
Bayard Gildas
Message:

sources reformatted with flair-format-dir script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/Picture.cpp

    r2 r15  
    2424using std::string;
    2525
    26 namespace flair
    27 {
    28 namespace gui
    29 {
     26namespace flair {
     27namespace gui {
    3028
    3129using namespace core;
    3230
    33 Picture::Picture(const LayoutPosition* position,string name,const cvimage *image):SendData(position,name,"Picture",200)
    34 {
    35     this->image=image;
     31Picture::Picture(const LayoutPosition *position, string name,
     32                 const cvimage *image)
     33    : SendData(position, name, "Picture", 200) {
     34  this->image = image;
    3635
    37     SetSendSize(image->GetDataType().GetSize());
     36  SetSendSize(image->GetDataType().GetSize());
    3837
    39     SetVolatileXmlProp("width",image->GetDataType().GetWidth());
    40     SetVolatileXmlProp("height",image->GetDataType().GetHeight());
    41     SendXml();
     38  SetVolatileXmlProp("width", image->GetDataType().GetWidth());
     39  SetVolatileXmlProp("height", image->GetDataType().GetHeight());
     40  SendXml();
    4241}
    4342
    44 Picture::~Picture()
    45 {
     43Picture::~Picture() {}
     44
     45void 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  }
    4651}
    47 
    48 
    49 void Picture::CopyDatas(char* buf) const
    50 {
    51     if(image!=NULL)
    52     {
    53         image->GetMutex();
    54         memcpy(buf,image->img->imageData,image->GetDataType().GetSize());
    55         image->ReleaseMutex();
    56     }
    57 }
    58 
    5952
    6053} // end namespace gui
Note: See TracChangeset for help on using the changeset viewer.