Beispiel #1
0
        private void ObjectManager_AfterCreateStart(object sender, BaseObject Object)
        {
            ObjectPen defaultPen = this.ToolPanel.DefaultPen;

            Object.LinePen.Color     = defaultPen.Color;
            Object.LinePen.Width     = defaultPen.Width;
            Object.LinePen.DashStyle = defaultPen.DashStyle;
        }
Beispiel #2
0
        public override void PaintValue(PaintValueEventArgs e)
        {
            ObjectPen pen    = (ObjectPen)e.Value;
            Rectangle bounds = e.Bounds;
            Region    clip   = e.Graphics.Clip;

            e.Graphics.SetClip(bounds);
            e.Graphics.SmoothingMode = SmoothingMode.HighQuality;
            e.Graphics.DrawLine(pen.GetPen(), e.Bounds.X, e.Bounds.Y, e.Bounds.Right - 1, e.Bounds.Bottom - 1);
            e.Graphics.SmoothingMode = SmoothingMode.Default;
            e.Graphics.Clip          = clip;
            base.PaintValue(e);
        }
Beispiel #3
0
 public BaseObject()
 {
     this.linePen       = new ObjectPen();
     this.smoothingMode = ObjectSmoothingMode.AntiAlias;
     this.Init();
 }