diff options
Diffstat (limited to 'src/LineMarker.h')
-rw-r--r-- | src/LineMarker.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/LineMarker.h b/src/LineMarker.h index 7897aa775..50194d65c 100644 --- a/src/LineMarker.h +++ b/src/LineMarker.h @@ -8,6 +8,27 @@ #ifndef LINEMARKER_H #define LINEMARKER_H +class XPM { + int height; + int width; + int nColours; + char *data; + char codeTransparent; + char *codes; + ColourPair *colours; + void Init(const char * const *linesForm); + ColourAllocated ColourFromCode(char ch); + void FillRun(Surface *surface, char code, int startX, int y, int x); +public: + XPM(const char *textForm); + XPM(const char * const *linesForm); + ~XPM(); + // Similar to same named method in ViewStyle: + void RefreshColourPalette(Palette &pal, bool want); + // Decompose image into runs and use FillRectangle for each run: + void Draw(Surface *surface, PRectangle &rc); +}; + /** */ class LineMarker { @@ -15,11 +36,19 @@ public: int markType; ColourPair fore; ColourPair back; + XPM *pxpm; LineMarker() { markType = SC_MARK_CIRCLE; fore = ColourDesired(0,0,0); back = ColourDesired(0xff,0xff,0xff); + pxpm = NULL; + } + ~LineMarker() { + delete pxpm; } + void RefreshColourPalette(Palette &pal, bool want); + void SetXPM(const char *textForm); + void SetXPM(const char * const *linesForm); void Draw(Surface *surface, PRectangle &rc, Font &fontForCharacter); }; |