comparison layer/ImageLayer.h @ 304:4b7e8da8f069

* More work on image layer display &c
author Chris Cannam
date Fri, 05 Oct 2007 13:27:21 +0000
parents 46faec7aae12
children 013a37723c0a
comparison
equal deleted inserted replaced
303:46faec7aae12 304:4b7e8da8f069
94 void setProperties(const QXmlAttributes &attributes); 94 void setProperties(const QXmlAttributes &attributes);
95 95
96 protected: 96 protected:
97 ImageModel::PointList getLocalPoints(View *v, int x, int y) const; 97 ImageModel::PointList getLocalPoints(View *v, int x, int y) const;
98 98
99 float getImageAspect(QString name) const; 99 bool getImageOriginalSize(QString name, QSize &size) const;
100 QImage getImage(View *v, QString name, QSize maxSize) const; 100 QImage getImage(View *v, QString name, QSize maxSize) const;
101
102 void drawImage(View *v, QPainter &paint, const ImageModel::Point &p,
103 int x, int nx) const;
101 104
102 //!!! how to reap no-longer-used images? 105 //!!! how to reap no-longer-used images?
103 106
104 typedef std::map<QString, QImage> ImageMap; 107 typedef std::map<QString, QImage> ImageMap;
105 typedef std::map<const View *, ImageMap> ViewImageMap; 108 typedef std::map<const View *, ImageMap> ViewImageMap;
109
110
106 111
107 static ImageMap m_images; 112 static ImageMap m_images;
108 mutable ViewImageMap m_scaled; 113 mutable ViewImageMap m_scaled;
109 114
110 ImageModel *m_model; 115 ImageModel *m_model;