diff options
| author | nyamatongwe <devnull@localhost> | 2011-06-25 07:58:03 +1000 |
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2011-06-25 07:58:03 +1000 |
| commit | a35215c303f35e22892193728026b408d083a665 (patch) | |
| tree | 388603057382fa1d784e6fee72e88ba80f5e03a3 /src/LineMarker.cxx | |
| parent | 85dc0204832948824579888601f33c7894b5dd50 (diff) | |
| download | scintilla-mirror-a35215c303f35e22892193728026b408d083a665.tar.gz | |
Initial implementation of RGBA images.
Diffstat (limited to 'src/LineMarker.cxx')
| -rw-r--r-- | src/LineMarker.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/LineMarker.cxx b/src/LineMarker.cxx index 747c5ff12..1415c609b 100644 --- a/src/LineMarker.cxx +++ b/src/LineMarker.cxx @@ -7,6 +7,9 @@ #include <string.h> +#include <vector> +#include <map> + #include "Platform.h" #include "Scintilla.h" @@ -38,6 +41,12 @@ void LineMarker::SetXPM(const char *const *linesForm) { markType = SC_MARK_PIXMAP; } +void LineMarker::SetRGBAImage(Point sizeRGBAImage, const unsigned char *pixelsRGBAImage) { + delete image; + image = new RGBAImage(sizeRGBAImage.x, sizeRGBAImage.y, pixelsRGBAImage); + markType = SC_MARK_RGBAIMAGE; +} + static void DrawBox(Surface *surface, int centreX, int centreY, int armSize, ColourAllocated fore, ColourAllocated back) { PRectangle rc; rc.left = centreX - armSize; @@ -96,6 +105,10 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharac pxpm->Draw(surface, rcWhole); return; } + if ((markType == SC_MARK_RGBAIMAGE) && (image)) { + surface->DrawRGBAImage(rcWhole, image->GetWidth(), image->GetHeight(), image->Pixels()); + return; + } // Restrict most shapes a bit PRectangle rc = rcWhole; rc.top++; |
