Hi,
I am trying to make complex shape using StreamGeometry Class
https://msdn.microsoft.com/en-us/library/system.windows.media.streamgeometry.aspx
and its definition says that it uses StreamGeometryContext Class which is abstract class
https://msdn.microsoft.com/en-us/library/system.windows.media.streamgeometrycontext.aspx
I saw that on C# and other languages they just create StreamGeometryContext object. But how it is possible to create object of the class which is abstract?
Here is example:
var geometry = new StreamGeometry();
using (var context = geometry.Open())
{
bool isStroked = pen != null;
const bool isSmoothJoin = true;
context.BeginFigure(rect.TopLeft + new Vector(0, cornerRadius.TopLeft), brush != null, true);
context.ArcTo(new Point(rect.TopLeft.X + cornerRadius.TopLeft, rect.TopLeft.Y),
new Size(cornerRadius.TopLeft, cornerRadius.TopLeft),
90, false, SweepDirection.Clockwise, isStroked, isSmoothJoin);
context.LineTo(rect.TopRight - new Vector(cornerRadius.TopRight, 0), isStroked, isSmoothJoin);
context.ArcTo(new Point(rect.TopRight.X, rect.TopRight.Y + cornerRadius.TopRight),
new Size(cornerRadius.TopRight, cornerRadius.TopRight),