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; }
public override void PaintValue(PaintValueEventArgs e) { ObjectPen op = (ObjectPen)e.Value; Rectangle R = e.Bounds; Region OldClip = e.Graphics.Clip; e.Graphics.SetClip(R); e.Graphics.SmoothingMode = SmoothingMode.HighQuality; e.Graphics.DrawLine(op.GetPen(), e.Bounds.X, e.Bounds.Y, e.Bounds.Right - 1, e.Bounds.Bottom - 1); e.Graphics.SmoothingMode = SmoothingMode.Default; e.Graphics.Clip = OldClip; base.PaintValue(e); }
public BaseObject() { this.linePen = new ObjectPen(); this.smoothingMode = ObjectSmoothingMode.AntiAlias; this.Init(); }
public static bool NotDefault(ObjectPen op) { return(defaultPen.Alpha != op.Alpha || defaultPen.Color != op.Color || defaultPen.DashCap != op.DashCap || defaultPen.DashStyle != op.DashStyle || defaultPen.EndCap != op.EndCap || defaultPen.StartCap != op.StartCap || defaultPen.Width != op.Width); }