aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LineMarker.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2011-06-25 07:58:03 +1000
committernyamatongwe <unknown>2011-06-25 07:58:03 +1000
commit640bc7546d4d8ad5228e09ed2d280ea12b0690e9 (patch)
tree8b0e456078c1db7c0751a9edee6bfbe258a24792 /src/LineMarker.cxx
parentaa198d68b4f938a20aadfb53267fab87f64a7004 (diff)
downloadscintilla-mirror-640bc7546d4d8ad5228e09ed2d280ea12b0690e9.tar.gz
Initial implementation of RGBA images.
Diffstat (limited to 'src/LineMarker.cxx')
-rw-r--r--src/LineMarker.cxx13
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++;