aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2012-04-06 20:44:19 +1000
committernyamatongwe <devnull@localhost>2012-04-06 20:44:19 +1000
commitcd10b569de5c48298b9a45883ce851ae80362f82 (patch)
tree801b0a4855f66340180e46ce4c06355f82e382eb /src/Editor.cxx
parent66f72d2592991fefe6922a0e9745b776563a02a7 (diff)
downloadscintilla-mirror-cd10b569de5c48298b9a45883ce851ae80362f82.tar.gz
Bug #3513946. Make printing work when Direct2D is used for on screen drawing.
This will stop Scintilla from crashing. From Marko Njezic.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index b71d451b3..fcfc04998 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -3750,10 +3750,10 @@ long Editor::FormatRange(bool draw, Sci_RangeToFormat *pfr) {
if (!pfr)
return 0;
- AutoSurface surface(pfr->hdc, this);
+ AutoSurface surface(pfr->hdc, this, SC_TECHNOLOGY_DEFAULT);
if (!surface)
return 0;
- AutoSurface surfaceMeasure(pfr->hdcTarget, this);
+ AutoSurface surfaceMeasure(pfr->hdcTarget, this, SC_TECHNOLOGY_DEFAULT);
if (!surfaceMeasure) {
return 0;
}
@@ -3762,6 +3762,7 @@ long Editor::FormatRange(bool draw, Sci_RangeToFormat *pfr) {
posCache.Clear();
ViewStyle vsPrint(vs);
+ vsPrint.technology = SC_TECHNOLOGY_DEFAULT;
// Modify the view style for printing as do not normally want any of the transient features to be printed
// Printing supports only the line number margin.
@@ -3776,6 +3777,8 @@ long Editor::FormatRange(bool draw, Sci_RangeToFormat *pfr) {
vsPrint.showMarkedLines = false;
vsPrint.fixedColumnWidth = 0;
vsPrint.zoomLevel = printMagnification;
+ // Don't show indentation guides
+ // If this ever gets changed, cached pixmap would need to be recreated if technology != SC_TECHNOLOGY_DEFAULT
vsPrint.viewIndentationGuides = ivNone;
// Don't show the selection when printing
vsPrint.selbackset = false;