diff options
author | nyamatongwe <devnull@localhost> | 2010-11-02 20:29:18 +1100 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2010-11-02 20:29:18 +1100 |
commit | 693ea2107843b455ca37bdf4dc65166cd892f6d2 (patch) | |
tree | afd98e205ea22fa370937e36cae3b34c952ab659 /src | |
parent | 8a2f5c937bed4c2473a183363b2c51070e094ddc (diff) | |
download | scintilla-mirror-693ea2107843b455ca37bdf4dc65166cd892f6d2.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')
-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); } } |