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 | 543346f2f1de2761d801b029bb8c658533aa9950 (patch) | |
| tree | 707bb85611a56d1b775c1ab88655799932a394cb /src/XPM.h | |
| parent | b8dbea549073db7d6fe9c3c5c738ee894ef768cc (diff) | |
| download | scintilla-mirror-543346f2f1de2761d801b029bb8c658533aa9950.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); |
