/// <summary> /// Create a new EllipseEngine. /// </summary> /// <param name="parent_layer">The parent UserLayer for the re-editable DrawingLayer.</param> /// <param name="drawing_layer">An existing ReEditableLayer to reuse. This is for cloning only. If not cloning, pass in null.</param> /// <param name="antialiasing">Whether or not antialiasing is enabled.</param> /// <param name="outline_color">The outline color for the shape.</param> /// <param name="fill_color">The fill color for the shape.</param> /// <param name="brush_width">The width of the outline of the shape.</param> public EllipseEngine(UserLayer parent_layer, ReEditableLayer drawing_layer, bool antialiasing, Color outline_color, Color fill_color, int brush_width) : base(parent_layer, drawing_layer, BaseEditEngine.ShapeTypes.Ellipse, antialiasing, true, outline_color, fill_color, brush_width) { }
protected ShapeEngine(ShapeEngine src) { DrawingLayer = src.DrawingLayer; ShapeType = src.ShapeType; AntiAliasing = src.AntiAliasing; Closed = src.Closed; OutlineColor = src.OutlineColor.Clone(); FillColor = src.OutlineColor.Clone(); BrushWidth = src.BrushWidth; // Don't clone the GeneratedPoints or OrganizedPoints, as they will be calculated. ControlPoints = src.ControlPoints.Select(i => i.Clone()).ToList(); DashPattern = src.DashPattern; }
protected ShapeEngine(ShapeEngine src) { DrawingLayer = src.DrawingLayer; ShapeType = src.ShapeType; AntiAliasing = src.AntiAliasing; Closed = src.Closed; OutlineColor = src.OutlineColor.Clone(); FillColor = src.FillColor.Clone(); BrushWidth = src.BrushWidth; // Don't clone the GeneratedPoints or OrganizedPoints, as they will be calculated. ControlPoints = src.ControlPoints.Select(i => i.Clone()).ToList(); DashPattern = src.DashPattern; parent_layer = null !; // NRT - This constructor needs to set parent_layer somehow as code expects it to be not-null }
/// <summary> /// Create a new ShapeEngine. /// </summary> /// <param name="passedParentLayer">The parent UserLayer for the ReEditable DrawingLayer.</param> /// <param name="passedDrawingLayer">An existing ReEditableLayer to reuse. This is for cloning only. If not cloning, pass in null.</param> /// <param name="passedShapeType">The type of shape to create.</param> /// <param name="passedAA">Whether or not antialiasing is enabled.</param> /// <param name="passedClosed">Whether or not the shape is closed (first and last points are connected).</param> /// <param name="passedOutlineColor">The outline color for the shape.</param> /// <param name="passedFillColor">The fill color for the shape.</param> /// <param name="passedBrushWidth">The width of the outline of the shape.</param> public ShapeEngine(UserLayer passedParentLayer, ReEditableLayer passedDrawingLayer, BaseEditEngine.ShapeTypes passedShapeType, bool passedAA, bool passedClosed, Color passedOutlineColor, Color passedFillColor, int passedBrushWidth) { parentLayer = passedParentLayer; if (passedDrawingLayer == null) { DrawingLayer = new ReEditableLayer(parentLayer); } else { DrawingLayer = passedDrawingLayer; } ShapeType = passedShapeType; AntiAliasing = passedAA; Closed = passedClosed; OutlineColor = passedOutlineColor.Clone(); FillColor = passedFillColor.Clone(); BrushWidth = passedBrushWidth; }
/// <summary> /// Create a new ShapeEngine. /// </summary> /// <param name="parent_layer">The parent UserLayer for the ReEditable DrawingLayer.</param> /// <param name="drawing_layer">An existing ReEditableLayer to reuse. This is for cloning only. If not cloning, pass in null.</param> /// <param name="shape_type">The type of shape to create.</param> /// <param name="antialiasing">Whether or not antialiasing is enabled.</param> /// <param name="closed">Whether or not the shape is closed (first and last points are connected).</param> /// <param name="outline_color">The outline color for the shape.</param> /// <param name="fill_color">The fill color for the shape.</param> /// <param name="brush_width">The width of the outline of the shape.</param> public ShapeEngine(UserLayer parent_layer, ReEditableLayer?drawing_layer, BaseEditEngine.ShapeTypes shape_type, bool antialiasing, bool closed, Color outline_color, Color fill_color, int brush_width) { this.parent_layer = parent_layer; if (drawing_layer == null) { DrawingLayer = new ReEditableLayer(parent_layer); } else { DrawingLayer = drawing_layer; } ShapeType = shape_type; AntiAliasing = antialiasing; Closed = closed; OutlineColor = outline_color.Clone(); FillColor = fill_color.Clone(); BrushWidth = brush_width; }
/// <summary> /// Create a new RoundedLineEngine. /// </summary> /// <param name="parent_layer">The parent UserLayer for the re-editable DrawingLayer.</param> /// <param name="drawing_layer">An existing ReEditableLayer to reuse. This is for cloning only. If not cloning, pass in null.</param> /// <param name="passedRadius">The radius of the corners.</param> /// <param name="antialiasing">Whether or not antialiasing is enabled.</param> /// <param name="outline_color">The outline color for the shape.</param> /// <param name="fill_color">The fill color for the shape.</param> /// <param name="brush_width">The width of the outline of the shape.</param> public RoundedLineEngine(UserLayer parentLayer, ReEditableLayer passedDrawingLayer, double passedRadius, bool passedAA, Color passedOutlineColor, Color passedFillColor, int passedBrushWidth) : base(parentLayer, passedDrawingLayer, BaseEditEngine.ShapeTypes.RoundedLineSeries, passedAA, true, passedOutlineColor, passedFillColor, passedBrushWidth) { Radius = passedRadius; }
/// <summary> /// Create a new LineCurveSeriesEngine. /// </summary> /// <param name="parentLayer">The parent UserLayer for the re-editable DrawingLayer.</param> /// <param name="passedDrawingLayer">An existing ReEditableLayer to reuse. This is for cloning only. If not cloning, pass in null.</param> /// <param name="passedShapeType">The owner EditEngine.</param> /// <param name="passedAA">Whether or not antialiasing is enabled.</param> /// <param name="passedClosed">Whether or not the shape is closed (first and last points are connected).</param> /// <param name="passedOutlineColor">The outline color for the shape.</param> /// <param name="passedFillColor">The fill color for the shape.</param> /// <param name="passedBrushWidth">The width of the outline of the shape.</param> public LineCurveSeriesEngine(UserLayer parentLayer, ReEditableLayer passedDrawingLayer, BaseEditEngine.ShapeTypes passedShapeType, bool passedAA, bool passedClosed, Color passedOutlineColor, Color passedFillColor, int passedBrushWidth) : base(parentLayer, passedDrawingLayer, passedShapeType, passedAA, passedClosed, passedOutlineColor, passedFillColor, passedBrushWidth) { }
/// <summary> /// Create a new EllipseEngine. /// </summary> /// <param name="parentLayer">The parent UserLayer for the re-editable DrawingLayer.</param> /// <param name="passedDrawingLayer">An existing ReEditableLayer to reuse. This is for cloning only. If not cloning, pass in null.</param> /// <param name="passedAA">Whether or not antialiasing is enabled.</param> /// <param name="passedOutlineColor">The outline color for the shape.</param> /// <param name="passedFillColor">The fill color for the shape.</param> /// <param name="passedBrushWidth">The width of the outline of the shape.</param> public EllipseEngine(UserLayer parentLayer, ReEditableLayer passedDrawingLayer, bool passedAA, Color passedOutlineColor, Color passedFillColor, int passedBrushWidth) : base(parentLayer, passedDrawingLayer, BaseEditEngine.ShapeTypes.Ellipse, passedAA, true, passedOutlineColor, passedFillColor, passedBrushWidth) { }