diff options
| author | nyamatongwe <nyamatongwe@gmail.com> | 2012-07-21 16:57:24 +1000 |
|---|---|---|
| committer | nyamatongwe <nyamatongwe@gmail.com> | 2012-07-21 16:57:24 +1000 |
| commit | 7dcbdef9d6ae95e7c9232418d12195582faaa54b (patch) | |
| tree | dbdbea4b99a427a3dec598bc49247e57b58654fa /src/XPM.h | |
| parent | 38dc2df4119595f2a553cec3f9b51adaa160c973 (diff) | |
| download | scintilla-mirror-7dcbdef9d6ae95e7c9232418d12195582faaa54b.tar.gz | |
Scale factor implemented for RGBAImages to allow for high definition markers on retina displays.
Diffstat (limited to 'src/XPM.h')
| -rw-r--r-- | src/XPM.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -80,13 +80,17 @@ class RGBAImage { RGBAImage &operator=(const RGBAImage &); int height; int width; + float scale; std::vector<unsigned char> pixelBytes; public: - RGBAImage(int width_, int height_, const unsigned char *pixels_); + RGBAImage(int width_, int height_, float scale_, const unsigned char *pixels_); RGBAImage(const XPM &xpm); virtual ~RGBAImage(); int GetHeight() const { return height; } int GetWidth() const { return width; } + float GetScale() const { return scale; } + float GetScaledHeight() const { return height / scale; } + float GetScaledWidth() const { return width / scale; } int CountBytes() const; const unsigned char *Pixels() const; void SetPixel(int x, int y, ColourDesired colour, int alpha=0xff); |
