Implement wxGraphicsContext::SetInterpolationQuality() for wxMSW.
Provide implementation of the previously stubbed out method. Closes #14134. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -514,6 +514,7 @@ MSW:
|
||||
wxWebViewIE to improve the default behaviour (Allonii).
|
||||
- Update stretchable spaces in wxToolBar after tool removal (Catalin Raceanu).
|
||||
- Add support for horizontal mouse wheel events (Lauri Nurmi).
|
||||
- Implement wxGraphicsContext::SetInterpolationQuality() (Eric Jarvi).
|
||||
|
||||
OSX:
|
||||
|
||||
|
@@ -787,12 +787,14 @@ public:
|
||||
virtual wxAntialiasMode GetAntialiasMode() const ;
|
||||
|
||||
/**
|
||||
Sets the interpolation quality, returns true if it supported
|
||||
Sets the interpolation quality, returns true if it is supported.
|
||||
|
||||
Not implemented in Cairo backend currently.
|
||||
*/
|
||||
virtual bool SetInterpolationQuality(wxInterpolationQuality interpolation) = 0;
|
||||
|
||||
/**
|
||||
Returns the current interpolation quality
|
||||
Returns the current interpolation quality.
|
||||
*/
|
||||
virtual wxInterpolationQuality GetInterpolationQuality() const;
|
||||
|
||||
|
@@ -1390,6 +1390,7 @@ void wxGDIPlusContext::Init(Graphics* graphics, int width, int height)
|
||||
m_context->SetTextRenderingHint(TextRenderingHintSystemDefault);
|
||||
m_context->SetPixelOffsetMode(PixelOffsetModeHalf);
|
||||
m_context->SetSmoothingMode(SmoothingModeHighQuality);
|
||||
m_context->SetInterpolationMode(InterpolationModeHighQuality);
|
||||
m_state1 = m_context->Save();
|
||||
m_state2 = m_context->Save();
|
||||
}
|
||||
@@ -1535,10 +1536,41 @@ bool wxGDIPlusContext::SetAntialiasMode(wxAntialiasMode antialias)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxGDIPlusContext::SetInterpolationQuality(wxInterpolationQuality WXUNUSED(interpolation))
|
||||
bool wxGDIPlusContext::SetInterpolationQuality(wxInterpolationQuality interpolation)
|
||||
{
|
||||
// placeholder
|
||||
if (m_interpolation == interpolation)
|
||||
return true;
|
||||
|
||||
m_interpolation = interpolation;
|
||||
|
||||
InterpolationMode interpolationMode = InterpolationModeDefault;
|
||||
switch (interpolation)
|
||||
{
|
||||
case wxINTERPOLATION_DEFAULT:
|
||||
interpolationMode = InterpolationModeDefault;
|
||||
break;
|
||||
|
||||
case wxINTERPOLATION_NONE:
|
||||
interpolationMode = InterpolationModeNearestNeighbor;
|
||||
break;
|
||||
|
||||
case wxINTERPOLATION_FAST:
|
||||
interpolationMode = InterpolationModeLowQuality;
|
||||
break;
|
||||
|
||||
case wxINTERPOLATION_GOOD:
|
||||
interpolationMode = InterpolationModeHighQuality;
|
||||
break;
|
||||
|
||||
case wxINTERPOLATION_BEST:
|
||||
interpolationMode = InterpolationModeHighQualityBicubic;
|
||||
break;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
m_context->SetInterpolationMode(interpolationMode);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxGDIPlusContext::SetCompositionMode(wxCompositionMode op)
|
||||
|
Reference in New Issue
Block a user