Fix closing sub-path created by MoveToPoint() in Direct2D
Because call to MoveToPoint() opens a new sub-path but doesn't open
a new D2D figure (this is to avoid the situation when multiple consequtive
calls to MoveToPoint() would open a spurious figures/paths, see c8fe811636
),
we need to check when sub-path is being closed if we have a sub-patch
without figure and if so, a new figure has to be open to get a required
in this case 1-point figure/path.
This commit is contained in:
@@ -1813,6 +1813,13 @@ void wxD2DPathData::AddPath(const wxGraphicsPathData* path)
|
|||||||
// closes the current sub-path
|
// closes the current sub-path
|
||||||
void wxD2DPathData::CloseSubpath()
|
void wxD2DPathData::CloseSubpath()
|
||||||
{
|
{
|
||||||
|
// If we have a sub-path open by call to MoveToPoint(),
|
||||||
|
// which doesn't open a new figure by itself,
|
||||||
|
// we have to open a new figure now to get a required 1-point path.
|
||||||
|
if ( !m_figureOpened && m_currentPointSet )
|
||||||
|
{
|
||||||
|
EnsureFigureOpen(m_currentPoint);
|
||||||
|
}
|
||||||
// Close sub-path and close the figure.
|
// Close sub-path and close the figure.
|
||||||
if ( m_figureOpened )
|
if ( m_figureOpened )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user