comparison view/ViewProxy.h @ 954:17cb48115d22 osx-retina

Fix positioning of local feature illumination rectangle
author Chris Cannam
date Wed, 29 Apr 2015 13:02:57 +0100
parents 43888f891733
children 477fbf3f10ca
comparison
equal deleted inserted replaced
953:fe46201414c8 954:17cb48115d22
83 return QRect(r.x() * m_scaleFactor, 83 return QRect(r.x() * m_scaleFactor,
84 r.y() * m_scaleFactor, 84 r.y() * m_scaleFactor,
85 r.width() * m_scaleFactor, 85 r.width() * m_scaleFactor,
86 r.height() * m_scaleFactor); 86 r.height() * m_scaleFactor);
87 } 87 }
88 virtual QSize getPaintSize() const { return getPaintRect().size(); } 88 virtual QSize getPaintSize() const {
89 virtual int getPaintWidth() const { return getPaintRect().width(); } 89 return getPaintRect().size();
90 virtual int getPaintHeight() const { return getPaintRect().height(); } 90 }
91 virtual int getPaintWidth() const {
92 return getPaintRect().width();
93 }
94 virtual int getPaintHeight() const {
95 return getPaintRect().height();
96 }
91 virtual bool hasLightBackground() const { 97 virtual bool hasLightBackground() const {
92 return m_view->hasLightBackground(); 98 return m_view->hasLightBackground();
93 } 99 }
94 virtual QColor getForeground() const { 100 virtual QColor getForeground() const {
95 return m_view->getForeground(); 101 return m_view->getForeground();
99 } 105 }
100 virtual ViewManager *getViewManager() const { 106 virtual ViewManager *getViewManager() const {
101 return m_view->getViewManager(); 107 return m_view->getViewManager();
102 } 108 }
103 109
104 virtual bool shouldIlluminateLocalFeatures(const Layer *layer, QPoint &point) const { 110 virtual bool shouldIlluminateLocalFeatures(const Layer *layer,
105 return m_view->shouldIlluminateLocalFeatures(layer, point); 111 QPoint &point) const {
112 QPoint p;
113 bool should = m_view->shouldIlluminateLocalFeatures(layer, p);
114 point = QPoint(p.x() * m_scaleFactor, p.y() * m_scaleFactor);
115 return should;
106 } 116 }
117
107 virtual bool shouldShowFeatureLabels() const { 118 virtual bool shouldShowFeatureLabels() const {
108 return m_view->shouldShowFeatureLabels(); 119 return m_view->shouldShowFeatureLabels();
109 } 120 }
110 121
111 virtual void drawVisibleText(QPainter &p, int x, int y, 122 virtual void drawVisibleText(QPainter &p, int x, int y,