Esempio n. 1
0
        public static Pen ThickPen(this Color color)
        {
            Pen p;

            if (!thickPenCache.TryGetValue(color, out p))
            {
                p           = new Pen(color);
                p.Width     = Dpi.GetWidth(2);
                p.Alignment = PenAlignment.Inset;
                thickPenCache.Add(color, p);
            }

            return(p);
        }
Esempio n. 2
0
        public static Pen DottedPen(this Color color)
        {
            Pen p;

            if (!dottedPenCache.TryGetValue(color, out p))
            {
                p           = new Pen(color);
                p.Alignment = PenAlignment.Inset;
                p.Width     = Dpi.GetWidth(1);
                p.DashStyle = DashStyle.Dot;
                dottedPenCache.Add(color, p);
            }

            return(p);
        }