void fillPath (const Path& p, const AffineTransform& transform)
    {
        currentState->createBrush();
        ComSmartPtr <ID2D1Geometry> geometry (pathToPathGeometry (p, transform.followedBy (currentState->transform)));

        if (renderingTarget != nullptr)
            renderingTarget->FillGeometry (geometry, currentState->currentBrush);
    }
void Direct2DLowLevelGraphicsContext::fillPath (const Path& p, const AffineTransform& transform)
{
    renderingTarget->SetTransform (D2D1::IdentityMatrix());
    currentState->createBrush();
    ComSmartPtr <ID2D1Geometry> geometry (pathToPathGeometry (p, transform.followedBy (currentState->transform)));

    if (renderingTarget != nullptr)
        renderingTarget->FillGeometry (geometry, currentState->currentBrush);
}
 void clipToPath (const Path& path, const AffineTransform& transform)
 {
     currentState->clipToPath (pathToPathGeometry (path, transform));
 }
void Direct2DLowLevelGraphicsContext::clipToPath (const Path& path, const AffineTransform& transform)
{
    renderingTarget->SetTransform (D2D1::IdentityMatrix());
    currentState->clipToPath (pathToPathGeometry (path, transform));
}