Fixed wxGraphicsPath concatenation with GDI+ renderer.
Since resulting wxGraphicPath should have the same state as appended path so we have to grab in wxGraphicsPath::AddPath also auxiliary data from appended wxGraphicsPath. See #17532
This commit is contained in:
@@ -96,7 +96,8 @@ public:
|
|||||||
void AddLineToPoint(const wxPoint2DDouble& p);
|
void AddLineToPoint(const wxPoint2DDouble& p);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Adds another path.
|
Adds another path onto the current path. After this call the current
|
||||||
|
point will be at the added path's current point.
|
||||||
*/
|
*/
|
||||||
virtual void AddPath(const wxGraphicsPath& path);
|
virtual void AddPath(const wxGraphicsPath& path);
|
||||||
|
|
||||||
|
@@ -1327,11 +1327,19 @@ void wxGDIPlusPathData::AddRectangle( wxDouble x, wxDouble y, wxDouble w, wxDoub
|
|||||||
|
|
||||||
void wxGDIPlusPathData::AddPath( const wxGraphicsPathData* path )
|
void wxGDIPlusPathData::AddPath( const wxGraphicsPathData* path )
|
||||||
{
|
{
|
||||||
m_path->AddPath( (GraphicsPath*) path->GetNativePath(), FALSE);
|
const wxGDIPlusPathData* pathData = static_cast<const wxGDIPlusPathData*>(path);
|
||||||
// We have to switch to the native current point.
|
const GraphicsPath* grPath = static_cast<const GraphicsPath*>(pathData->GetNativePath());
|
||||||
m_logCurrentPointSet = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
m_path->AddPath(grPath, FALSE);
|
||||||
|
// Copy auxiliary data if appended path is non-empty.
|
||||||
|
if( grPath->GetPointCount() > 0 || pathData->m_logCurrentPointSet || pathData->m_figureOpened )
|
||||||
|
{
|
||||||
|
m_logCurrentPointSet = pathData->m_logCurrentPointSet;
|
||||||
|
m_logCurrentPoint = pathData->m_logCurrentPoint;
|
||||||
|
m_figureOpened = pathData->m_figureOpened;
|
||||||
|
m_figureStart = pathData->m_figureStart;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// transforms each point of this path by the matrix
|
// transforms each point of this path by the matrix
|
||||||
void wxGDIPlusPathData::Transform( const wxGraphicsMatrixData* matrix )
|
void wxGDIPlusPathData::Transform( const wxGraphicsMatrixData* matrix )
|
||||||
|
Reference in New Issue
Block a user