Example #1
0
 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;
 }
Example #2
0
 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;
 }
Example #3
0
 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();
        }
Example #6
0
 public ShapeTriangle()
     : base(0)
 {
     painter = new Painters(new Font("Times New Roman",10),2);
     Size = new Size(100, 100);
 }
Example #7
0
 public Painters(ref Painters painter)
 {
     rectBounds = painter.rectBounds;
     CopyProperties(ref painter);
 }
Example #8
0
 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;
 }
Example #9
0
 public Painters(ref Painters painter)
 {
     rectBounds = painter.rectBounds;
     CopyProperties(ref painter);
 }