Last change
on this file since 338 was 338, checked in by Sanahuja Guillaume, 3 years ago |
remove opencv dep
|
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"
|
---|
[338] | 19 | #include "Image.h"
|
---|
[2] | 20 | #include "Layout.h"
|
---|
| 21 | #include "LayoutPosition.h"
|
---|
[330] | 22 | #include <string.h>
|
---|
[2] | 23 |
|
---|
| 24 | using std::string;
|
---|
| 25 |
|
---|
[15] | 26 | namespace flair {
|
---|
| 27 | namespace gui {
|
---|
[2] | 28 |
|
---|
| 29 | using namespace core;
|
---|
| 30 |
|
---|
[15] | 31 | Picture::Picture(const LayoutPosition *position, string name,
|
---|
[338] | 32 | const Image *image)
|
---|
[15] | 33 | : SendData(position, name, "Picture", 200) {
|
---|
| 34 | this->image = image;
|
---|
[2] | 35 |
|
---|
[15] | 36 | SetSendSize(image->GetDataType().GetSize());
|
---|
[2] | 37 |
|
---|
[15] | 38 | SetVolatileXmlProp("width", image->GetDataType().GetWidth());
|
---|
| 39 | SetVolatileXmlProp("height", image->GetDataType().GetHeight());
|
---|
| 40 | SendXml();
|
---|
[2] | 41 | }
|
---|
| 42 |
|
---|
[15] | 43 | Picture::~Picture() {}
|
---|
[2] | 44 |
|
---|
[15] | 45 | void Picture::CopyDatas(char *buf) const {
|
---|
| 46 | if (image != NULL) {
|
---|
| 47 | image->GetMutex();
|
---|
[330] | 48 | memcpy(buf, image->buffer, image->GetDataType().GetSize());
|
---|
[15] | 49 | image->ReleaseMutex();
|
---|
| 50 | }
|
---|
[2] | 51 | }
|
---|
| 52 |
|
---|
| 53 | } // end namespace gui
|
---|
| 54 | } // end namespace flair
|
---|
Note:
See
TracBrowser
for help on using the repository browser.