diff options
| author | nyamatongwe <devnull@localhost> | 2003-02-02 01:41:11 +0000 |
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2003-02-02 01:41:11 +0000 |
| commit | 13ad207b99e16fdf48db60a0ec49098e5a0626c9 (patch) | |
| tree | 77571d9565a2b712ea7e7efbe0df63100817fb25 /gtk/PlatGTK.cxx | |
| parent | 9e9e3c45aa3d52ecbae1c483bf2125957bac6038 (diff) | |
| download | scintilla-mirror-13ad207b99e16fdf48db60a0ec49098e5a0626c9.tar.gz | |
Two phase drawing.
Diffstat (limited to 'gtk/PlatGTK.cxx')
| -rw-r--r-- | gtk/PlatGTK.cxx | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index 7088a5f7e..9724c38bb 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -601,8 +601,10 @@ public: void Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back); void Copy(PRectangle rc, Point from, Surface &surfaceSource); + void DrawTextBase(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore); void DrawTextNoClip(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back); void DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back); + void DrawTextTransparent(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore); void MeasureWidths(Font &font_, const char *s, int len, int *positions); int WidthText(Font &font_, const char *s, int len); int WidthChar(Font &font_, char ch); @@ -821,9 +823,8 @@ void SurfaceImpl::Copy(PRectangle rc, Point from, Surface &surfaceSource) { #define MAX_US_LEN 5000 -void SurfaceImpl::DrawTextNoClip(PRectangle rc, Font &font_, int ybase, const char *s, int len, - ColourAllocated fore, ColourAllocated back) { - FillRectangle(rc, back); +void SurfaceImpl::DrawTextBase(PRectangle rc, Font &font_, int ybase, const char *s, int len, + ColourAllocated fore) { PenColour(fore); if (gc && drawable) { // Draw text as a series of segments to avoid limitations in X servers @@ -896,10 +897,23 @@ void SurfaceImpl::DrawTextNoClip(PRectangle rc, Font &font_, int ybase, const ch } } +void SurfaceImpl::DrawTextNoClip(PRectangle rc, Font &font_, int ybase, const char *s, int len, + ColourAllocated fore, ColourAllocated back) { + FillRectangle(rc, back); + DrawTextBase(rc, font_, ybase, s, len, fore); +} + // On GTK+, exactly same as DrawTextNoClip void SurfaceImpl::DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back) { - DrawTextNoClip(rc, font_, ybase, s, len, fore, back); + FillRectangle(rc, back); + DrawTextBase(rc, font_, ybase, s, len, fore); +} + +// On GTK+, exactly same as DrawTextNoClip +void SurfaceImpl::DrawTextTransparent(PRectangle rc, Font &font_, int ybase, const char *s, int len, + ColourAllocated fore) { + DrawTextBase(rc, font_, ybase, s, len, fore); } void SurfaceImpl::MeasureWidths(Font &font_, const char *s, int len, int *positions) { |
