diff options
| author | Neil <nyamatongwe@gmail.com> | 2021-04-20 09:11:22 +1000 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2021-04-20 09:11:22 +1000 |
| commit | ed434975e5de00e91718b075f04492f69c1bb04a (patch) | |
| tree | e9026a3fa701c1e11babb26aea766bfa9abda7b9 /src/XPM.h | |
| parent | eb5616987e0c064a175d5eb111338e1e6f5af54c (diff) | |
| download | scintilla-mirror-ed434975e5de00e91718b075f04492f69c1bb04a.tar.gz | |
Feature [feature-requests:#1402]. Unify colour type with ColourAlpha.
Change ColourDesired to ColourAlpha in XPM and RGBAImage.
Diffstat (limited to 'src/XPM.h')
| -rw-r--r-- | src/XPM.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -18,9 +18,9 @@ class XPM { int width=1; int nColours=1; std::vector<unsigned char> pixels; - ColourDesired colourCodeTable[256]; + ColourAlpha colourCodeTable[256]; char codeTransparent=' '; - ColourDesired ColourFromCode(int ch) const noexcept; + ColourAlpha ColourFromCode(int ch) const noexcept; void FillRun(Surface *surface, int code, int startX, int y, int x) const; public: explicit XPM(const char *textForm); @@ -36,7 +36,7 @@ public: void Draw(Surface *surface, const PRectangle &rc); int GetHeight() const noexcept { return height; } int GetWidth() const noexcept { return width; } - void PixelAt(int x, int y, ColourDesired &colour, bool &transparent) const noexcept; + ColourAlpha PixelAt(int x, int y) const noexcept; private: static std::vector<const char *>LinesFormFromTextForm(const char *textForm); }; @@ -65,7 +65,7 @@ public: float GetScaledWidth() const noexcept { return width / scale; } int CountBytes() const noexcept; const unsigned char *Pixels() const noexcept; - void SetPixel(int x, int y, ColourDesired colour, int alpha) noexcept; + void SetPixel(int x, int y, ColourAlpha colour) noexcept; static void BGRAFromRGBA(unsigned char *pixelsBGRA, const unsigned char *pixelsRGBA, size_t count) noexcept; }; |
