source: flair-src/trunk/lib/FlairCore/src/Picture.cpp@ 45

Last change on this file since 45 was 15, checked in by Bayard Gildas, 9 years ago

sources reformatted with flair-format-dir script

File size: 1.3 KB
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
24using std::string;
25
26namespace flair {
27namespace gui {
28
29using namespace core;
30
31Picture::Picture(const LayoutPosition *position, string name,
32 const cvimage *image)
33 : SendData(position, name, "Picture", 200) {
34 this->image = image;
35
36 SetSendSize(image->GetDataType().GetSize());
37
38 SetVolatileXmlProp("width", image->GetDataType().GetWidth());
39 SetVolatileXmlProp("height", image->GetDataType().GetHeight());
40 SendXml();
41}
42
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 }
51}
52
53} // end namespace gui
54} // end namespace flair
Note: See TracBrowser for help on using the repository browser.