コード例 #1
0
        /// <summary>
        /// Defines the supplied pen with this style
        /// </summary>
        /// <param name="pen">The pen to define</param>
        /// <param name="draw">The definition of the draw</param>
        internal override void DefinePen(ScaleSpecificPen pen, ISpatialDisplay draw)
        {
            float fwt = (m_Weight > 0.0 ? draw.LengthToDisplay(m_Weight) : 0.0F);

            if (m_Pattern != null)
            {
                m_Pattern.DefinePen(pen.Pen, draw, fwt, new SolidBrush(this.Color));
            }

            // MUST be solid for anything that has non-zero weight
            //else if ((int)fwt != 0)
            //    pen.CreateSolidPen(fwt, this.Color);
            else
            {
                pen.CreateSolidPen(0.0F, this.Color);
                Pen p = pen.Pen;
                p.DashStyle = m_Style;
                p.Width     = fwt;
                p.StartCap  = LineCap.Round;
                p.EndCap    = LineCap.Round;
            }
        }
コード例 #2
0
ファイル: Style.cs プロジェクト: 15831944/backsight
 /// <summary>
 /// Defines the supplied pen with this style This implementation just defines a solid pen
 /// with this style's color and a width of 1 pixel.
 /// </summary>
 /// <param name="pen">The pen to define</param>
 internal void DefinePen(ScaleSpecificPen pen)
 {
     pen.CreateSolidPen(0, m_Color);
 }
コード例 #3
0
ファイル: Style.cs プロジェクト: steve-stanton/backsight
 /// <summary>
 /// Defines the supplied pen with this style This implementation just defines a solid pen
 /// with this style's color and a width of 1 pixel.
 /// </summary> 
 /// <param name="pen">The pen to define</param>
 internal void DefinePen(ScaleSpecificPen pen)
 {
     pen.CreateSolidPen(0, m_Color);
 }
コード例 #4
0
ファイル: LineStyle.cs プロジェクト: steve-stanton/backsight
        /// <summary>
        /// Defines the supplied pen with this style
        /// </summary>
        /// <param name="pen">The pen to define</param>
        /// <param name="draw">The definition of the draw</param>
        internal override void DefinePen(ScaleSpecificPen pen, ISpatialDisplay draw)
        {
            float fwt = (m_Weight > 0.0 ? draw.LengthToDisplay(m_Weight) : 0.0F);

            if (m_Pattern != null)
                m_Pattern.DefinePen(pen.Pen, draw, fwt, new SolidBrush(this.Color));

            // MUST be solid for anything that has non-zero weight
            //else if ((int)fwt != 0)
            //    pen.CreateSolidPen(fwt, this.Color);
            else
            {
                pen.CreateSolidPen(0.0F, this.Color);
                Pen p = pen.Pen;
                p.DashStyle = m_Style;
                p.Width = fwt;
                p.StartCap = LineCap.Round;
                p.EndCap = LineCap.Round;
            }
        }