public void Test_CanvasStroke_2() { // Invalid data CanvasDevice device = new CanvasDevice(); Assert.IsNotNull(device, "Could not create CanvasDevice instance."); var stroke = CanvasPathGeometry.CreateStroke(device, "ST 4.5 6 LG M 0 0 Z80 80 S 0.00 #ffff0000, 0.5 #ff00ff00, 0.99 #ff0000ff CSS DS 2 Do 2 SC 1 EC 2 CDS 2 2 0 2 1 3"); }
public void Test_CanvasStroke_4() { // Extra characters in the stroke data CanvasDevice device = new CanvasDevice(); Assert.IsNotNull(device, "Could not create CanvasDevice instance."); var stroke = CanvasPathGeometry.CreateStroke(device, "ST 4.5 LG M 0 0 Z80 80 S 0.00 #ffff0000, 0.5 #ff00ff00, 0.99 #ff0000ff CSS DS 2 Do 2 SC 1 EC 2 CDS 2 2 0 2 1 3 A 10"); }
public void Test_CanvasStroke_1() { CanvasDevice device = new CanvasDevice(); Assert.IsNotNull(device, "Could not create CanvasDevice instance."); var stroke = CanvasPathGeometry.CreateStroke(device, "ST 4.5 LG M 0 0 Z80 80 S 0.00 #ffff0000, 0.5 #ff00ff00, 0.99 #ff0000ff CSS DS 2 LJ1 Do 2 SC 1 EC 2 CDS 2 2 0 2 1 3"); Assert.AreEqual(true, stroke.Width == 4.5f); Assert.AreEqual(true, stroke.Style.LineJoin == CanvasLineJoin.Bevel); Assert.AreEqual(true, stroke.Style.StartCap == CanvasCapStyle.Square); Assert.AreEqual(true, stroke.Style.EndCap == CanvasCapStyle.Round); Assert.AreEqual(true, stroke.Style.TransformBehavior == CanvasStrokeTransformBehavior.Normal); }