Implement 0-width pen consistently in wxGraphicsContext
Emulate a 1-pixel pen width as closely as possible. This reverts:334cf1cc91(Take HiDPI scale into account for wxGCDC 0-width pen, 2021-04-03)0d80050057(Make wxGCDC behavior with 0-width wxPen consistent with MSW wxDC, 2021-03-02) See #19077, #19115
This commit is contained in:
@@ -572,6 +572,7 @@ wxGraphicsContext::wxGraphicsContext(wxGraphicsRenderer* renderer,
|
||||
m_enableOffset(false),
|
||||
m_window(window)
|
||||
{
|
||||
m_contentScaleFactor = window ? window->GetContentScaleFactor() : 1.0;
|
||||
}
|
||||
|
||||
wxGraphicsContext::~wxGraphicsContext()
|
||||
@@ -605,6 +606,12 @@ void wxGraphicsContext::EnableOffset(bool enable)
|
||||
m_enableOffset = enable;
|
||||
}
|
||||
|
||||
void wxGraphicsContext::SetContentScaleFactor(double contentScaleFactor)
|
||||
{
|
||||
m_enableOffset = true;
|
||||
m_contentScaleFactor = contentScaleFactor;
|
||||
}
|
||||
|
||||
#if 0
|
||||
void wxGraphicsContext::SetAlpha( wxDouble WXUNUSED(alpha) )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user