A cross-platform UI framework for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

36 lines
1.0 KiB

// -----------------------------------------------------------------------
// <copyright file="Direct2DStreamGeometry.cs" company="Steven Kirk">
// Copyright 2014 MIT Licence. See licence.md for more information.
// </copyright>
// -----------------------------------------------------------------------
namespace Perspex.Direct2D1.Media
{
using System;
using Perspex.Media;
using Perspex.Platform;
using SharpDX.Direct2D1;
using Splat;
public class StreamGeometryImpl : GeometryImpl, IStreamGeometryImpl
{
private PathGeometry geometry;
public StreamGeometryImpl()
{
Factory factory = Locator.Current.GetService<Factory>();
this.geometry = new PathGeometry(factory);
this.Geometry = this.geometry;
}
public override Rect Bounds
{
get { return geometry.GetBounds().ToPerspex(); }
}
public IStreamGeometryContextImpl Open()
{
return new StreamGeometryContextImpl(geometry.Open());
}
}
}