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

Last change on this file since 137 was 137, checked in by Sanahuja Guillaume, 6 years ago

singleton manager

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