diff options
| author | Neil <nyamatongwe@gmail.com> | 2014-09-03 11:25:38 +1000 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2014-09-03 11:25:38 +1000 | 
| commit | b42a204c6cea47b0bee61c4015d44f59f4e8dba0 (patch) | |
| tree | 24f43c9bbbeaeb3902eeadd6735e7443da1c6c63 /win32/ScintillaWin.cxx | |
| parent | 24e83c72f610bf71f5c928d52fc6eb5172bc22a3 (diff) | |
| download | scintilla-mirror-b42a204c6cea47b0bee61c4015d44f59f4e8dba0.tar.gz | |
Added SC_TECHNOLOGY_DIRECTWRITERETAIN mode.
Diffstat (limited to 'win32/ScintillaWin.cxx')
| -rw-r--r-- | win32/ScintillaWin.cxx | 12 | 
1 files changed, 8 insertions, 4 deletions
| diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 2ff660a09..86e274178 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -457,7 +457,8 @@ void ScintillaWin::EnsureRenderTarget() {  		D2D1_HWND_RENDER_TARGET_PROPERTIES dhrtp;  		dhrtp.hwnd = hw;  		dhrtp.pixelSize = size; -		dhrtp.presentOptions = D2D1_PRESENT_OPTIONS_NONE; +		dhrtp.presentOptions = (technology == SC_TECHNOLOGY_DIRECTWRITERETAIN) ? +			D2D1_PRESENT_OPTIONS_RETAIN_CONTENTS : D2D1_PRESENT_OPTIONS_NONE;  		D2D1_RENDER_TARGET_PROPERTIES drtp;  		drtp.type = D2D1_RENDER_TARGET_TYPE_DEFAULT; @@ -1402,9 +1403,11 @@ sptr_t ScintillaWin::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam  			return keysAlwaysUnicode;  		case SCI_SETTECHNOLOGY: -			if ((wParam == SC_TECHNOLOGY_DEFAULT) || (wParam == SC_TECHNOLOGY_DIRECTWRITE)) { +			if ((wParam == SC_TECHNOLOGY_DEFAULT) ||  +				(wParam == SC_TECHNOLOGY_DIRECTWRITERETAIN) || +				(wParam == SC_TECHNOLOGY_DIRECTWRITE)) {  				if (technology != static_cast<int>(wParam)) { -					if (static_cast<int>(wParam) == SC_TECHNOLOGY_DIRECTWRITE) { +					if (static_cast<int>(wParam) > SC_TECHNOLOGY_DEFAULT) {  #if defined(USE_D2D)  						if (!LoadD2D())  							// Failed to load Direct2D or DirectWrite so no effect @@ -2960,7 +2963,8 @@ sptr_t PASCAL ScintillaWin::CTWndProc(  						D2D1_HWND_RENDER_TARGET_PROPERTIES dhrtp;  						dhrtp.hwnd = hWnd;  						dhrtp.pixelSize = D2D1::SizeU(rc.right - rc.left, rc.bottom - rc.top); -						dhrtp.presentOptions = D2D1_PRESENT_OPTIONS_NONE; +						dhrtp.presentOptions = (sciThis->technology == SC_TECHNOLOGY_DIRECTWRITERETAIN) ? +							D2D1_PRESENT_OPTIONS_RETAIN_CONTENTS : D2D1_PRESENT_OPTIONS_NONE;  						D2D1_RENDER_TARGET_PROPERTIES drtp;  						drtp.type = D2D1_RENDER_TARGET_TYPE_DEFAULT; | 
