示例#1
0
 /// <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);
 }
示例#2
0
        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);
        }
示例#3
0
        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);
        }
示例#4
0
 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);
 }
示例#5
0
 /// <summary>
 /// Used by Xml serializer
 /// </summary>
 /// <returns></returns>
 public bool ShouldSerializeCursorPen()
 {
     return(PenMapper.NotDefault(CursorPen));
 }
示例#6
0
 /// <summary>
 /// Used by Xml serializer
 /// </summary>
 /// <returns></returns>
 public bool ShouldSerializeLinePen()
 {
     return(PenMapper.NotDefault(LinePen));
 }
示例#7
0
 public bool ShouldSerializeBottomPen()
 {
     return(PenMapper.NotDefault(BottomPen));
 }
示例#8
0
 public bool ShouldSerializeRightPen()
 {
     return(PenMapper.NotDefault(RightPen));
 }
示例#9
0
 public bool ShouldSerializeTopPen()
 {
     return(PenMapper.NotDefault(TopPen));
 }
示例#10
0
 public FormulaTick()
 {
     TickPen           = new PenMapper(Color.DarkGray);  //Color.White);
     LinePen           = new PenMapper(Color.DarkGray);  //new Pen(Color.Beige,1);
     LinePen.DashStyle = DashStyle.Dot;
 }