Last change
on this file since 325 was 137, checked in by Sanahuja Guillaume, 8 years ago |
singleton manager
|
File size:
1.2 KB
|
Rev | Line | |
---|
[2] | 1 | // %flair:license{
|
---|
[15] | 2 | // This file is part of the Flair framework distributed under the
|
---|
| 3 | // CECILL-C License, Version 1.0.
|
---|
[2] | 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 "cvimage.h"
|
---|
| 20 | #include "Layout.h"
|
---|
| 21 | #include "LayoutPosition.h"
|
---|
| 22 |
|
---|
| 23 | using std::string;
|
---|
| 24 |
|
---|
[15] | 25 | namespace flair {
|
---|
| 26 | namespace gui {
|
---|
[2] | 27 |
|
---|
| 28 | using namespace core;
|
---|
| 29 |
|
---|
[15] | 30 | Picture::Picture(const LayoutPosition *position, string name,
|
---|
| 31 | const cvimage *image)
|
---|
| 32 | : SendData(position, name, "Picture", 200) {
|
---|
| 33 | this->image = image;
|
---|
[2] | 34 |
|
---|
[15] | 35 | SetSendSize(image->GetDataType().GetSize());
|
---|
[2] | 36 |
|
---|
[15] | 37 | SetVolatileXmlProp("width", image->GetDataType().GetWidth());
|
---|
| 38 | SetVolatileXmlProp("height", image->GetDataType().GetHeight());
|
---|
| 39 | SendXml();
|
---|
[2] | 40 | }
|
---|
| 41 |
|
---|
[15] | 42 | Picture::~Picture() {}
|
---|
[2] | 43 |
|
---|
[15] | 44 | void Picture::CopyDatas(char *buf) const {
|
---|
| 45 | if (image != NULL) {
|
---|
| 46 | image->GetMutex();
|
---|
| 47 | memcpy(buf, image->img->imageData, image->GetDataType().GetSize());
|
---|
| 48 | image->ReleaseMutex();
|
---|
| 49 | }
|
---|
[2] | 50 | }
|
---|
| 51 |
|
---|
| 52 | } // end namespace gui
|
---|
| 53 | } // end namespace flair
|
---|
Note:
See
TracBrowser
for help on using the repository browser.