public void CopyProperties(ref Painters painter) { _BlendSmoothness = painter.BlendSmoothness; _Coverage = painter.Coverage; _Text = painter.Text; _TextPositionX = painter.TextPositionX; _TextPositionY = painter.TextPositionY; LinearMode = painter.LinearMode; blend = painter.blend; PaintBorder = painter.PaintBorder; PaintFill = painter.PaintFill; borderThickness = painter.borderThickness; if (colors != null) { colors.Clear(); } else { colors = new List <Color>(); } colors.Capacity = painter.colors.Capacity; colors.Add(painter.colors[0]); if (painter.colors.Count > 1) { colors.Add(painter.colors[1]); } BorderColor = painter.BorderColor; TextColor = painter.TextColor; Font = painter.Font; }
public ShapeLine() : base(0) { painter = new Painters(new Font("Times New Roman", 10), 2); painter.State.AcceptsEditing = true; hitTestPen = new Pen(Color.Black, 4); editingOn = true; painter.State.IsEditing = true; isInitializing = true; }
public ShapeText() : base(1) { _Size = new Size(100, 100); painter = new Painters(new Font("Times New Roman", 10), 2); painter.State.AcceptsEditing = true; painter.ChangeColor(0, Color.Black); painter.PaintBorder = false; editingOn = false; isSelected = true; }
public FormColorEditor(Painters painter) { InitializeComponent(); this.SetStyle(ControlStyles.DoubleBuffer | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true); _painter = new Painters(ref painter); sentPainter = painter; //copy the reference if (_painter.ColorCount > 1) tpEditor.SelectedIndex = 1; TabChanged(); }
public FormColorEditor(Painters painter) { InitializeComponent(); this.SetStyle(ControlStyles.DoubleBuffer | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true); _painter = new Painters(ref painter); sentPainter = painter; //copy the reference if (_painter.ColorCount > 1) { tpEditor.SelectedIndex = 1; } TabChanged(); }
public ShapeTriangle() : base(0) { painter = new Painters(new Font("Times New Roman",10),2); Size = new Size(100, 100); }
public Painters(ref Painters painter) { rectBounds = painter.rectBounds; CopyProperties(ref painter); }
public void CopyProperties(ref Painters painter) { _BlendSmoothness = painter.BlendSmoothness ; _Coverage = painter.Coverage; _Text = painter.Text; _TextPositionX = painter.TextPositionX; _TextPositionY = painter.TextPositionY; LinearMode = painter.LinearMode; blend = painter.blend; PaintBorder = painter.PaintBorder; PaintFill = painter.PaintFill; borderThickness = painter.borderThickness; if (colors != null) colors.Clear(); else colors = new List<Color>(); colors.Capacity = painter.colors.Capacity; colors.Add(painter.colors[0]); if (painter.colors.Count > 1) colors.Add(painter.colors[1]); BorderColor = painter.BorderColor; TextColor = painter.TextColor; Font = painter.Font; }