Skip to content
This repository was archived by the owner on Mar 30, 2019. It is now read-only.

Commit b647089

Browse files
committed
Add CreateSvgDocument overload, that takes a stream and returns document
1 parent 4e8fb65 commit b647089

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

Source/SharpDX.Direct2D1/DeviceContext5.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1919
// THE SOFTWARE.
2020

21+
using SharpDX.Win32;
2122
using System;
2223

2324
namespace SharpDX.Direct2D1
@@ -38,5 +39,18 @@ public DeviceContext5(Device5 device, DeviceContextOptions options)
3839
{
3940
device.CreateDeviceContext(options, this);
4041
}
42+
43+
/// <summary>
44+
/// Creates an Svg document from an xml string
45+
/// </summary>
46+
/// <param name="stream"></param>
47+
/// <param name="viewportSize"></param>
48+
/// <returns>Svg document model</returns>
49+
public SvgDocument CreateSvgDocument(IStream stream, SharpDX.Size2F viewportSize)
50+
{
51+
SvgDocument result;
52+
CreateSvgDocument_(ComStream.ToIntPtr(stream), viewportSize, out result);
53+
return result;
54+
}
4155
}
4256
}

0 commit comments

Comments
 (0)