/// <summary> /// A history item for when shapes are finalized. /// </summary> /// <param name="passedEE">The EditEngine being used.</param> /// <param name="icon">The history item's icon.</param> /// <param name="text">The history item's title.</param> /// <param name="passedUserSurface">The stored UserLayer surface.</param> /// <param name="passedUserLayer">The UserLayer being modified.</param> /// <param name="passedSelectedPointIndex">The selected point's index.</param> /// <param name="passedSelectedShapeIndex">The selected point's shape index.</param> /// <param name="passedRedrawEverything">Whether every shape should be redrawn when undoing (e.g. finalization).</param> public ShapesHistoryItem(BaseEditEngine passedEE, string icon, string text, ImageSurface passedUserSurface, UserLayer passedUserLayer, int passedSelectedPointIndex, int passedSelectedShapeIndex, bool passedRedrawEverything) : base(icon, text) { ee = passedEE; userLayer = passedUserLayer; userSurfaceDiff = SurfaceDiff.Create(passedUserSurface, userLayer.Surface, true); if (userSurfaceDiff == null) { userSurface = passedUserSurface; } else { (passedUserSurface as IDisposable).Dispose(); } sEngines = BaseEditEngine.SEngines.PartialClone(); selectedPointIndex = passedSelectedPointIndex; selectedShapeIndex = passedSelectedShapeIndex; redrawEverything = passedRedrawEverything; }
/// <summary> /// A history item for when shapes are modified. /// </summary> /// <param name="passedEE">The EditEngine being used.</param> /// <param name="icon">The history item's icon.</param> /// <param name="text">The history item's title.</param> public ShapesModifyHistoryItem(BaseEditEngine passedEE, string icon, string text) : base(icon, text) { ee = passedEE; sEngines = BaseEditEngine.SEngines.PartialClone(); selectedPointIndex = ee.SelectedPointIndex; selectedShapeIndex = ee.SelectedShapeIndex; }
/// <summary> /// Create a new LineCurveSeriesEngine. /// </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="shape_type">The owner EditEngine.</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 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) { }