diff options
| author | nyamatongwe <unknown> | 2003-02-02 01:41:11 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2003-02-02 01:41:11 +0000 | 
| commit | 3f329e8a6b1c4735ab1cf4f43848292db8df3d3b (patch) | |
| tree | 77571d9565a2b712ea7e7efbe0df63100817fb25 /gtk/PlatGTK.cxx | |
| parent | f566263f31075e3d36782dd3f5901466b789f763 (diff) | |
| download | scintilla-mirror-3f329e8a6b1c4735ab1cf4f43848292db8df3d3b.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) {  | 
