Exemple #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);
 }
Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
 }
 /// <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));
 }
Exemple #7
0
 public bool ShouldSerializeBottomPen()
 {
     return(PenMapper.NotDefault(BottomPen));
 }
Exemple #8
0
 public bool ShouldSerializeRightPen()
 {
     return(PenMapper.NotDefault(RightPen));
 }
Exemple #9
0
 public bool ShouldSerializeTopPen()
 {
     return(PenMapper.NotDefault(TopPen));
 }
Exemple #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;
 }