/// <summary> /// Initializes a new instance of the <see cref="GeometryNode"/> class. /// </summary> /// <param name="transform">The transform.</param> /// <param name="brush">The fill brush.</param> /// <param name="pen">The stroke pen.</param> /// <param name="geometry">The geometry.</param> /// <param name="aux">Auxiliary data required to draw the brush.</param> public GeometryNode(Matrix transform, IBrush?brush, IPen?pen, IGeometryImpl geometry, IDisposable?aux) : base(geometry.GetRenderBounds(pen).CalculateBoundsWithLineCaps(pen), transform, aux) { Transform = transform; Brush = brush?.ToImmutable(); Pen = pen?.ToImmutable(); Geometry = geometry; }
/// <summary> /// Initializes a new instance of the <see cref="GeometryNode"/> class. /// </summary> /// <param name="transform">The transform.</param> /// <param name="brush">The fill brush.</param> /// <param name="pen">The stroke pen.</param> /// <param name="geometry">The geometry.</param> /// <param name="childScenes">Child scenes for drawing visual brushes.</param> public GeometryNode(Matrix transform, IBrush brush, IPen pen, IGeometryImpl geometry, IDictionary <IVisual, Scene> childScenes = null) : base(geometry.GetRenderBounds(pen), transform) { Transform = transform; Brush = brush?.ToImmutable(); Pen = pen?.ToImmutable(); Geometry = geometry; ChildScenes = childScenes; }
/// <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; }
public EllipseNode( Matrix transform, IBrush?brush, IPen?pen, Rect rect, IDisposable?aux = null) : base(rect.Inflate(pen?.Thickness ?? 0), transform, aux) { Transform = transform; Brush = brush?.ToImmutable(); Pen = pen?.ToImmutable(); Rect = rect; }
/// <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; }
public EllipseNode( Matrix transform, IBrush?brush, IPen?pen, Rect rect, IDictionary <IVisual, Scene>?childScenes = null) : base(rect.Inflate(pen?.Thickness ?? 0), transform) { Transform = transform; Brush = brush?.ToImmutable(); Pen = pen?.ToImmutable(); Rect = rect; ChildScenes = childScenes; }
/// <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(new Rect(p1, p2), transform, pen) { Transform = transform; Pen = pen?.ToImmutable(); P1 = p1; P2 = p2; ChildScenes = childScenes; }
/// <summary> /// Initializes a new instance of the <see cref="RectangleNode"/> class. /// </summary> /// <param name="transform">The transform.</param> /// <param name="brush">The fill brush.</param> /// <param name="pen">The stroke pen.</param> /// <param name="rect">The rectangle to draw.</param> /// <param name="boxShadows">The box shadow parameters</param> /// <param name="aux">Auxiliary data required to draw the brush.</param> public RectangleNode( Matrix transform, IBrush?brush, IPen?pen, RoundedRect rect, BoxShadows boxShadows, IDisposable?aux = null) : base(boxShadows.TransformBounds(rect.Rect).Inflate((pen?.Thickness ?? 0) / 2), transform, aux) { Transform = transform; Brush = brush?.ToImmutable(); Pen = pen?.ToImmutable(); Rect = rect; BoxShadows = boxShadows; }
/// <summary> /// Initializes a new instance of the <see cref="RectangleNode"/> class. /// </summary> /// <param name="transform">The transform.</param> /// <param name="brush">The fill brush.</param> /// <param name="pen">The stroke pen.</param> /// <param name="rect">The rectangle to draw.</param> /// <param name="boxShadows">The box shadow parameters</param> /// <param name="childScenes">Child scenes for drawing visual brushes.</param> public RectangleNode( Matrix transform, IBrush brush, IPen pen, RoundedRect rect, BoxShadows boxShadows, IDictionary <IVisual, Scene> childScenes = null) : base(boxShadows.TransformBounds(rect.Rect).Inflate((pen?.Thickness ?? 0) / 2), transform) { Transform = transform; Brush = brush?.ToImmutable(); Pen = pen?.ToImmutable(); Rect = rect; ChildScenes = childScenes; BoxShadows = boxShadows; }
/// <summary> /// Initializes a new instance of the <see cref="RectangleNode"/> class. /// </summary> /// <param name="transform">The transform.</param> /// <param name="brush">The fill brush.</param> /// <param name="pen">The stroke pen.</param> /// <param name="rect">The rectangle to draw.</param> /// <param name="cornerRadius">The rectangle corner radius.</param> /// <param name="childScenes">Child scenes for drawing visual brushes.</param> public RectangleNode( Matrix transform, IBrush brush, IPen pen, Rect rect, float cornerRadius, IDictionary <IVisual, Scene> childScenes = null) : base(rect, transform, pen) { Transform = transform; Brush = brush?.ToImmutable(); Pen = pen?.ToImmutable(); Rect = rect; CornerRadius = cornerRadius; ChildScenes = childScenes; }
/// <summary> /// Initializes a new instance of the <see cref="RectangleNode"/> class. /// </summary> /// <param name="transform">The transform.</param> /// <param name="brush">The fill brush.</param> /// <param name="pen">The stroke pen.</param> /// <param name="rect">The rectangle to draw.</param> /// <param name="radiusY">The radius in the Y dimension of the rounded corners.</param> /// <param name="radiusX">The radius in the X dimension of the rounded corners.</param> /// <param name="childScenes">Child scenes for drawing visual brushes.</param> public RectangleNode( Matrix transform, IBrush brush, IPen pen, Rect rect, double radiusX, double radiusY, IDictionary <IVisual, Scene> childScenes = null) : base(rect, transform, pen) { Transform = transform; Brush = brush?.ToImmutable(); Pen = pen?.ToImmutable(); Rect = rect; RadiusX = radiusX; RadiusY = radiusY; ChildScenes = childScenes; }