/// <summary> /// Initializes a new instance of the <see cref="GeometryNode"/> class. /// </summary> /// <param name="transform">The transform.</param> /// <param name="pen">The stroke pen.</param> /// <param name="p1">The start point of the line.</param> /// <param name="p2">The end point of the line.</param> /// <param name="aux">Auxiliary data required to draw the brush.</param> public LineNode( Matrix transform, IPen pen, Point p1, Point p2, IDisposable?aux = null) : base(LineBoundsHelper.CalculateBounds(p1, p2, pen), transform, aux) { Transform = transform; Pen = pen.ToImmutable(); P1 = p1; P2 = p2; }
/// <summary> /// Initializes a new instance of the <see cref="GeometryNode"/> class. /// </summary> /// <param name="transform">The transform.</param> /// <param name="pen">The stroke pen.</param> /// <param name="p1">The start point of the line.</param> /// <param name="p2">The end point of the line.</param> /// <param name="childScenes">Child scenes for drawing visual brushes.</param> public LineNode( Matrix transform, IPen pen, Point p1, Point p2, IDictionary <IVisual, Scene> childScenes = null) : base(LineBoundsHelper.CalculateBounds(p1, p2, pen), transform) { Transform = transform; Pen = pen?.ToImmutable(); P1 = p1; P2 = p2; ChildScenes = childScenes; }