~ubuntu-branches/ubuntu/trusty/libavg/trusty-proposed

« back to all changes in this revision

Viewing changes to src/player/RectNode.cpp

  • Committer: Package Import Robot
  • Author(s): OXullo Intersecans
  • Date: 2011-12-06 22:44:56 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20111206224456-qc7250z3ya1vi8s9
Tags: 1.7.0-0ubuntu1
* New upstream release (LP: #899183)
* Remove patches 0002-libav-0.7.patch, 0003-fglrx-segfault-on-startup.patch
  now merged to upstream
* Remove unnecessary .la files
* Update debian/watch file
* Fix debian/copyright dep-5 compliancy
* Update standards to version 3.9.2
* Add man pages for avg_checktouch, avg_checkvsync, avg_showsvg
* Minor debian/rules enhancement
* Add librsvg2-dev, libgdk-pixbuf2.0-dev to Build-Depends
* Proper transition to dh_python2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//
2
2
//  libavg - Media Playback Engine. 
3
 
//  Copyright (C) 2003-2008 Ulrich von Zadow
 
3
//  Copyright (C) 2003-2011 Ulrich von Zadow
4
4
//
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
107
107
 
108
108
void RectNode::setAngle(double angle)
109
109
{
110
 
    m_Angle = fmod(angle, 2*PI);
 
110
    m_Angle = fmod(angle, 2*M_PI);
111
111
    setDrawNeeded();
112
112
}
113
113
 
114
 
void RectNode::getElementsByPos(const DPoint& pos, vector<VisibleNodeWeakPtr>& pElements)
 
114
void RectNode::getElementsByPos(const DPoint& pos, vector<NodeWeakPtr>& pElements)
115
115
{
116
116
    DPoint pivot = m_Rect.tl+m_Rect.size()/2;
117
117
    DPoint rpos = pos.getRotatedPivot(m_Angle, pivot);
118
118
    if (rpos.x >= m_Rect.tl.x && rpos.y >= m_Rect.tl.y && rpos.x < m_Rect.br.x && 
119
119
            rpos.y < m_Rect.br.y && reactsToMouseEvents())
120
120
    {
121
 
        pElements.push_back(getVThis());
 
121
        pElements.push_back(shared_from_this());
122
122
    }
123
123
}
124
124