2
2
// libavg - Media Playback Engine.
3
// Copyright (C) 2003-2008 Ulrich von Zadow
3
// Copyright (C) 2003-2011 Ulrich von Zadow
5
5
// This library is free software; you can redistribute it and/or
6
6
// modify it under the terms of the GNU Lesser General Public
29
29
#include "../graphics/Bitmap.h"
30
30
#include "../graphics/Filterfill.h"
31
31
#include "../graphics/Pixel8.h"
32
#include "../base/Exception.h"
33
34
#include "../base/Logger.h"
39
40
TouchEvent::TouchEvent(int id, Type eventType, BlobPtr pBlob, const IntPoint& pos,
40
Source source, const DPoint& speed, const IntPoint& lastDownPos)
41
Source source, const DPoint& speed)
41
42
: CursorEvent(id, eventType, pos, source),
44
44
m_bHasHandOrientation(false)
46
setLastDownPos(lastDownPos);
48
48
m_Orientation = pBlob->getOrientation();
49
49
m_Area = pBlob->getArea();
64
64
m_Center = DPoint(0, 0);
65
65
m_Eccentricity = 0;
66
m_MajorAxis = DPoint(0, 0);
67
m_MinorAxis = DPoint(0, 0);
66
m_MajorAxis = DPoint(5, 0);
67
m_MinorAxis = DPoint(0, 5);
71
71
TouchEvent::TouchEvent(int id, Type eventType, const IntPoint& pos, Source source,
72
const DPoint& speed, double orientation, double area,
73
double eccentricity, DPoint majorAxis, DPoint minorAxis)
72
const DPoint& speed, double orientation, double area, double eccentricity,
73
DPoint majorAxis, DPoint minorAxis)
74
74
: CursorEvent(id, eventType, pos, source),
76
75
m_Orientation(orientation),
78
77
m_Eccentricity(eccentricity),
79
78
m_MajorAxis(majorAxis),
80
79
m_MinorAxis(minorAxis)
84
TouchEvent::TouchEvent(int id, Type eventType, const IntPoint& pos, Source source,
86
: CursorEvent(id, eventType, pos, source),
84
96
TouchEvent::~TouchEvent()
177
184
return pRelatedEvents;
187
void TouchEvent::removeBlob()
180
192
void TouchEvent::trace()
183
AVG_TRACE(Logger::EVENTS2, "pos: " << m_Position
194
CursorEvent::trace();
195
AVG_TRACE(Logger::EVENTS2, "pos: " << getPos()
184
196
<< ", ID: " << getCursorID()
185
197
<< ", Area: " << m_Area
186
198
<< ", Eccentricity: " << m_Eccentricity);