Line | |
---|
1 | // %flair:license{
|
---|
2 | // This file is part of the Flair framework distributed under the
|
---|
3 | // CECILL-C License, Version 1.0.
|
---|
4 | // %flair:license}
|
---|
5 | // created: 2012/01/30
|
---|
6 | // filename: Picture.cpp
|
---|
7 | //
|
---|
8 | // author: Guillaume Sanahuja
|
---|
9 | // Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
10 | //
|
---|
11 | // version: $Id: $
|
---|
12 | //
|
---|
13 | // purpose: Class displaying a Picture on the ground station
|
---|
14 | //
|
---|
15 | //
|
---|
16 | /*********************************************************************/
|
---|
17 |
|
---|
18 | #include "Picture.h"
|
---|
19 | #include "FrameworkManager.h"
|
---|
20 | #include "cvimage.h"
|
---|
21 | #include "Layout.h"
|
---|
22 | #include "LayoutPosition.h"
|
---|
23 |
|
---|
24 | using std::string;
|
---|
25 |
|
---|
26 | namespace flair
|
---|
27 | {
|
---|
28 | namespace gui
|
---|
29 | {
|
---|
30 |
|
---|
31 | using namespace core;
|
---|
32 |
|
---|
33 | Picture::Picture(const LayoutPosition* position,string name,const cvimage *image):SendData(position,name,"Picture",200)
|
---|
34 | {
|
---|
35 | this->image=image;
|
---|
36 |
|
---|
37 | SetSendSize(image->GetDataType().GetSize());
|
---|
38 |
|
---|
39 | SetVolatileXmlProp("width",image->GetDataType().GetWidth());
|
---|
40 | SetVolatileXmlProp("height",image->GetDataType().GetHeight());
|
---|
41 | SendXml();
|
---|
42 | }
|
---|
43 |
|
---|
44 | Picture::~Picture()
|
---|
45 | {
|
---|
46 | }
|
---|
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 |
|
---|
59 |
|
---|
60 | } // end namespace gui
|
---|
61 | } // end namespace flair
|
---|
Note:
See
TracBrowser
for help on using the repository browser.