diff options
| author | nyamatongwe <devnull@localhost> | 2001-09-07 08:01:30 +0000 | 
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2001-09-07 08:01:30 +0000 | 
| commit | 9179b488c0aacb3a624142dd9a3b2c7a7efe1569 (patch) | |
| tree | ff44f1a8ea2ef437516aafcf704e5d24cf096f8e /src/LineMarker.cxx | |
| parent | 912e86ac5b4c2d049805861f34934d73702c9e01 (diff) | |
| download | scintilla-mirror-9179b488c0aacb3a624142dd9a3b2c7a7efe1569.tar.gz | |
Marker can be any character.
Diffstat (limited to 'src/LineMarker.cxx')
| -rw-r--r-- | src/LineMarker.cxx | 12 | 
1 files changed, 11 insertions, 1 deletions
diff --git a/src/LineMarker.cxx b/src/LineMarker.cxx index dc1468d83..9cb5d0d79 100644 --- a/src/LineMarker.cxx +++ b/src/LineMarker.cxx @@ -40,7 +40,7 @@ static void DrawMinus(Surface *surface, int centreX, int centreY, int armSize, C  	surface->FillRectangle(rcH, fore);  } -void LineMarker::Draw(Surface *surface, PRectangle &rcWhole) { +void LineMarker::Draw(Surface *surface, PRectangle &rcWhole, Font &fontForCharacter) {  	// Restrict most shapes a bit  	PRectangle rc = rcWhole;  	rc.top++; @@ -230,6 +230,16 @@ void LineMarker::Draw(Surface *surface, PRectangle &rcWhole) {  		surface->MoveTo(centreX, rcWhole.top);  		surface->LineTo(centreX, centreY - blobSize); +	} else if (markType >= SC_MARK_CHARACTER) { +		char character[2]; +		character[0] = ' '; +		character[0] = markType - SC_MARK_CHARACTER; +		int width = surface->WidthText(fontForCharacter, character, 1); +		rc.left += (rc.Width() - width) / 2; +		rc.right = rc.left + width; +		surface->DrawTextClipped(rc, fontForCharacter, rc.bottom - 2,  +			character, 1, fore.allocated, back.allocated); +  	} else { // SC_MARK_SHORTARROW  		Point pts[] = {  			Point(centreX, centreY + dimOn2),  | 
