From 640bc7546d4d8ad5228e09ed2d280ea12b0690e9 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 25 Jun 2011 07:58:03 +1000 Subject: Initial implementation of RGBA images. --- macosx/PlatMacOSX.cxx | 12 ++++++++++++ macosx/PlatMacOSX.h | 1 + macosx/ScintillaMacOSX.h | 1 + 3 files changed, 14 insertions(+) (limited to 'macosx') diff --git a/macosx/PlatMacOSX.cxx b/macosx/PlatMacOSX.cxx index 56c9d32c2..381be992d 100644 --- a/macosx/PlatMacOSX.cxx +++ b/macosx/PlatMacOSX.cxx @@ -12,6 +12,9 @@ #include +#include +#include + #include #include "QuartzTextLayout.h" #include "TCarbonEvent.h" @@ -482,6 +485,10 @@ void Scintilla::SurfaceImpl::AlphaRectangle(PRectangle rc, int /*cornerSize*/, C } } +void SurfaceImpl::DrawRGBAImage(PRectangle /* rc */, int /* width */, int /* height */, const unsigned char * /* pixelsImage*/) { + // Not supported for Carbon +} + void SurfaceImpl::Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back) { // Drawing an ellipse with bezier curves. Code modified from: // http://www.codeguru.com/gdi/ellipse.shtml @@ -1128,6 +1135,7 @@ public: int Find(const char *prefix); void GetValue(int n, char *value, int len); void RegisterImage(int type, const char *xpm_data); + void RegisterRGBAImage(int type, int width, int height, const unsigned char *pixelsImage); void ClearRegisteredImages(); void SetDoubleClickAction(CallBackAction action, void *data) { doubleClickAction = action; @@ -1635,6 +1643,10 @@ void ListBoxImpl::RegisterImage(int type, const char *xpm_data) { xset.Add(type, xpm_data); } +void ListBoxImpl::RegisterRGBAImage(int /* type */, int /* width */, int /* height */, const unsigned char * /*pixelsImage */) { + // Not supported for Carbon +} + void ListBoxImpl::ClearRegisteredImages() { xset.Clear(); } diff --git a/macosx/PlatMacOSX.h b/macosx/PlatMacOSX.h index 58e1bc6d7..492c0d18a 100644 --- a/macosx/PlatMacOSX.h +++ b/macosx/PlatMacOSX.h @@ -70,6 +70,7 @@ public: void RoundedRectangle(PRectangle rc, ColourAllocated fore, ColourAllocated back); void AlphaRectangle(PRectangle rc, int cornerSize, ColourAllocated fill, int alphaFill, ColourAllocated outline, int alphaOutline, int flags); + void DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage); void Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back); void Copy(PRectangle rc, Scintilla::Point from, Surface &surfaceSource); diff --git a/macosx/ScintillaMacOSX.h b/macosx/ScintillaMacOSX.h index df3e1c8e1..fe871119b 100644 --- a/macosx/ScintillaMacOSX.h +++ b/macosx/ScintillaMacOSX.h @@ -17,6 +17,7 @@ #include #include +#include #include "Platform.h" #include "Scintilla.h" -- cgit v1.2.3