/// <summary> /// Constructor of FormulaBack /// </summary> public FormulaBack() { BackGround = new BrushMapper(Color.White); // new SolidBrush(Color.White); LeftPen = new PenMapper(Color.Black); // Pen(Color.Black,1); TopPen = new PenMapper(Color.Black); // Pen(Color.Black,1); RightPen = new PenMapper(Color.Black); // Pen(Color.Black,1); BottomPen = new PenMapper(Color.Black); // Pen(Color.Black,1); }
public PenMapper Clone() { PenMapper pm = new PenMapper(); pm.color = color; pm.alpha = alpha; pm.dashStyle = dashStyle; pm.startCap = startCap; pm.endCap = endCap; pm.width = width; pm.dashPattern = dashPattern; return(pm); }
public override void PaintValue(PaintValueEventArgs e) { PenMapper op = (PenMapper)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 static bool NotDefault(PenMapper 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 || op.dashPattern != null); }
/// <summary> /// Used by Xml serializer /// </summary> /// <returns></returns> public bool ShouldSerializeCursorPen() { return(PenMapper.NotDefault(CursorPen)); }
/// <summary> /// Used by Xml serializer /// </summary> /// <returns></returns> public bool ShouldSerializeLinePen() { return(PenMapper.NotDefault(LinePen)); }
public bool ShouldSerializeBottomPen() { return(PenMapper.NotDefault(BottomPen)); }
public bool ShouldSerializeRightPen() { return(PenMapper.NotDefault(RightPen)); }
public bool ShouldSerializeTopPen() { return(PenMapper.NotDefault(TopPen)); }
public FormulaTick() { TickPen = new PenMapper(Color.DarkGray); //Color.White); LinePen = new PenMapper(Color.DarkGray); //new Pen(Color.Beige,1); LinePen.DashStyle = DashStyle.Dot; }