MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / PixelAt

Method PixelAt

scintilla/src/XPM.cxx:153–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153void XPM::PixelAt(int x, int y, ColourDesired &colour, bool &transparent) const {
154 if (pixels.empty() || (x<0) || (x >= width) || (y<0) || (y >= height)) {
155 colour = 0;
156 transparent = true;
157 return;
158 }
159 int code = pixels[y * width + x];
160 transparent = code == codeTransparent;
161 if (transparent) {
162 colour = 0;
163 } else {
164 colour = ColourFromCode(code).AsLong();
165 }
166}
167
168std::vector<const char *> XPM::LinesFormFromTextForm(const char *textForm) {
169 // Build the lines form out of the text form

Callers 1

RGBAImageMethod · 0.80

Calls 1

AsLongMethod · 0.80

Tested by

no test coverage detected