diff options
| author | nyamatongwe <unknown> | 2010-11-02 20:29:18 +1100 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2010-11-02 20:29:18 +1100 | 
| commit | 997becee99fae9c846a95b43d4488e3def41b229 (patch) | |
| tree | 5d0607112ea590407af99f7c5517686a0b59d498 /src/Editor.cxx | |
| parent | 8c4c056cf47368978a18e8be32202ca4e434f975 (diff) | |
| download | scintilla-mirror-997becee99fae9c846a95b43d4488e3def41b229.tar.gz | |
Change creation of stippled pixmaps to use FillRectangle calls rather than LineTo
to avoid blurry images when using an antialiased drawing library like Cairo.
Diffstat (limited to 'src/Editor.cxx')
| -rw-r--r-- | src/Editor.cxx | 17 | 
1 files changed, 8 insertions, 9 deletions
| diff --git a/src/Editor.cxx b/src/Editor.cxx index 46080557e..1d2e2ac9a 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -3165,11 +3165,11 @@ void Editor::RefreshPixMaps(Surface *surfaceWindow) {  		}  		pixmapSelPattern->FillRectangle(rcPattern, colourFMFill); -		pixmapSelPattern->PenColour(colourFMStripes); -		for (int stripe = 0; stripe < patternSize; stripe++) { -			// Alternating 1 pixel stripes is same as checkerboard. -			pixmapSelPattern->MoveTo(0, stripe * 2); -			pixmapSelPattern->LineTo(patternSize, stripe * 2 - patternSize); +		for (int y = 0; y < patternSize; y++) { +			for (int x = y % 2; x < patternSize; x+=2) { +				PRectangle rcPixel(x, y, x+1, y+1); +				pixmapSelPattern->FillRectangle(rcPixel, colourFMStripes); +			}  		}  	} @@ -3183,10 +3183,9 @@ void Editor::RefreshPixMaps(Surface *surfaceWindow) {  		pixmapIndentGuideHighlight->FillRectangle(rcIG, vs.styles[STYLE_BRACELIGHT].back.allocated);  		pixmapIndentGuideHighlight->PenColour(vs.styles[STYLE_BRACELIGHT].fore.allocated);  		for (int stripe = 1; stripe < vs.lineHeight + 1; stripe += 2) { -			pixmapIndentGuide->MoveTo(0, stripe); -			pixmapIndentGuide->LineTo(2, stripe); -			pixmapIndentGuideHighlight->MoveTo(0, stripe); -			pixmapIndentGuideHighlight->LineTo(2, stripe); +			PRectangle rcPixel(0, stripe, 1, stripe+1); +			pixmapIndentGuide->FillRectangle(rcPixel, vs.styles[STYLE_INDENTGUIDE].fore.allocated); +			pixmapIndentGuideHighlight->FillRectangle(rcPixel, vs.styles[STYLE_BRACELIGHT].fore.allocated);  		}  	} | 
