当前位置: 首页>>代码示例>>C#>>正文


C# LineStyle类代码示例

本文整理汇总了C#中LineStyle的典型用法代码示例。如果您正苦于以下问题:C# LineStyle类的具体用法?C# LineStyle怎么用?C# LineStyle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


LineStyle类属于命名空间,在下文中一共展示了LineStyle类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: getContourPen

 private Pen getContourPen(LineStyle style)
 {
      var result = new Pen(style.Color);
      result.Width = style.Width;
      result.DashStyle = style.DashStyle;
      return result;
 }
开发者ID:vlapchenko,项目名称:nfx,代码行数:7,代码来源:CandleMidLineView.cs

示例2: BorderProperties

 public BorderProperties(double? width = null, LineStyle style = null, string color = null)
 {
     Metric = MarkupMetric.Pixels;
     Width = width;
     Style = style;
     Color = color;
 }
开发者ID:medelbrock,项目名称:Html.Markup,代码行数:7,代码来源:BorderProperties.cs

示例3: SingleLine

        /// <summary>
        /// Creates a new instance of the class.
        /// </summary>
        /// <param name="orientation">The orientation of the line.</param>
        /// <param name="lineStyle">The style of the line.</param>
        public SingleLine(Orientation orientation, LineStyle lineStyle)
        {
            this.Controls.Add(_ForeLine);
            this.BackColor = SystemColors.ButtonShadow;
            this.ForeColor = SystemColors.ButtonHighlight;
            this.TabStop = false;

            this.Disposed += new EventHandler(OnComponentDisposed);
            this.Resize += new EventHandler(OnComponentResize);
            this.ForeColorChanged += new EventHandler(OnComponentColorChanged);
            this.BackColorChanged += new EventHandler(OnComponentColorChanged);

            _Orientation = orientation;
            _LineStyle = lineStyle;
            _ForeLine.BorderStyle = BorderStyle.None;
            _ForeLine.Enabled = false;

            RefreshLine();
            OnComponentColorChanged(this, null);

            try
            {
                SystemEvents.UserPreferenceChanged += new UserPreferenceChangedEventHandler(OnVisualStyleChanged);
            }
            catch
            { }
        }
开发者ID:ViniciusConsultor,项目名称:geansoft,代码行数:32,代码来源:SingleLine.cs

示例4: CurveInfo

		public CurveInfo(Func<double, double> function, LineStyle style, string caption, bool invertFunc = false)
		{
			Function = function;
			Style = style;
			Caption = caption;
			InvertFunc = invertFunc;
		}
开发者ID:pashkados,项目名称:EngineCalculate,代码行数:7,代码来源:CurveInfo.cs

示例5: Style

		internal Style(Workbook wb, XfRecord xf) : base(wb)
		{	
			if(xf.FontIdx > 0 && xf.FontIdx < wb.Fonts.Count)
    	        _font = wb.Fonts[xf.FontIdx - 1];
		    _format = wb.Formats[xf.FormatIdx];
			_typeAndProtection = xf.TypeAndProtection;
			if(_typeAndProtection.IsCell)
				_parentStyle = wb.Styles[xf.ParentIdx];
			_horizontalAlignment = xf.HorizontalAlignment;
			_wrapped = xf.Wrapped;
			_verticalAlignment = xf.VerticalAlignment;
			_rotation = xf.Rotation;
			_indentLevel = xf.IndentLevel;
			_shrinkContent = xf.ShrinkContent;
			_parentStyleAttributes = xf.ParentStyle;
			_leftLineStyle = xf.LeftLineStyle;
			_rightLineStyle = xf.RightLineStyle;
			_topLineStyle = xf.TopLineStyle;
			_bottomLineStyle = xf.BottomLineStyle;
			_leftLineColor = wb.Palette.GetColor(xf.LeftLineColor);
			_rightLineColor = wb.Palette.GetColor(xf.RightLineColor);
			_diagonalRightTopToLeftBottom = xf.DiagonalRightTopToLeftBottom;
			_diagonalLeftBottomToTopRight = xf.DiagonalLeftBottomToTopRight;
			_topLineColor = wb.Palette.GetColor(xf.TopLineColor);
			_bottomLineColor = wb.Palette.GetColor(xf.BottomLineColor);
			_diagonalLineColor = wb.Palette.GetColor(xf.DiagonalLineColor);
			_diagonalLineStyle = xf.DiagonalLineStyle;
			_fillPattern = xf.FillPattern;
			_patternColor = wb.Palette.GetColor(xf.PatternColor);
			_patternBackground = wb.Palette.GetColor(xf.PatternBackground);
		}
开发者ID:nicknystrom,项目名称:AscendRewards,代码行数:31,代码来源:Style.cs

示例6: LineStyleArray

 public LineStyleArray()
 {
     Styles = new LineStyle[]
     {
         new LineStyle()
     };
 }
开发者ID:kaldap,项目名称:XnaFlash,代码行数:7,代码来源:LineStyleArray.cs

示例7: OverlayShape

 protected OverlayShape(Color color, float width, LineStyle lineStyle)
 {
     Color = color;
     Width = width;
     LineStyle = lineStyle;
     _geos = new List<Geo>();
 }
开发者ID:AuditoryBiophysicsLab,项目名称:ESME-Workbench,代码行数:7,代码来源:OverlayShape.cs

示例8: GetDashArray

 /// <summary>
 /// Gets the stroke dash array for a given <see cref="LineStyle"/>.
 /// </summary>
 /// <param name="style">
 /// The line style.
 /// </param>
 /// <returns>
 /// A dash array.
 /// </returns>
 public static double[] GetDashArray(LineStyle style)
 {
     switch (style)
     {
         case LineStyle.Solid:
             return null;
         case LineStyle.Dash:
             return new double[] { 4, 1 };
         case LineStyle.Dot:
             return new double[] { 1, 1 };
         case LineStyle.DashDot:
             return new double[] { 4, 1, 1, 1 };
         case LineStyle.DashDashDot:
             return new double[] { 4, 1, 4, 1, 1, 1 };
         case LineStyle.DashDotDot:
             return new double[] { 4, 1, 1, 1, 1, 1 };
         case LineStyle.DashDashDotDot:
             return new double[] { 4, 1, 4, 1, 1, 1, 1, 1 };
         case LineStyle.LongDash:
             return new double[] { 10, 1 };
         case LineStyle.LongDashDot:
             return new double[] { 10, 1, 1, 1 };
         case LineStyle.LongDashDotDot:
             return new double[] { 10, 1, 1, 1, 1, 1 };
         default:
             return null;
     }
 }
开发者ID:jgodinez,项目名称:OxyPlot.2DGraphLib.MonoTouch,代码行数:37,代码来源:LineStyleHelper.cs

示例9: Line

 public Line(Point start, Point stop, LineType type, LineStyle style)
 {
     Start = start;
     Stop = stop;
     Type = type;
     Style = style;
 }
开发者ID:GNOME,项目名称:longomatch,代码行数:7,代码来源:Line.cs

示例10: CombineStyles

 LineStyle CombineStyles(LineStyle one, LineStyle two)
 {
     if (one == LineStyle.Add || two == LineStyle.Add)
         return LineStyle.Add;
     if (one == LineStyle.Delete || two == LineStyle.Delete)
         return LineStyle.Delete;
     return LineStyle.Unchanged;
 }
开发者ID:nuxleus,项目名称:flexwikicore,代码行数:8,代码来源:StyledLine.cs

示例11: OverlayLineSegment

        public OverlayLineSegment(Geo p1, Geo p2, Color color, float width, LineStyle lineStyle)
            : base(color, width, lineStyle)
        {
            Add(p1);
            Add(p2);

            Course = new Course(p1, p2);
            ComputeCoefficients();
        }
开发者ID:AuditoryBiophysicsLab,项目名称:ESME-Workbench,代码行数:9,代码来源:OverlayLineSegment.cs

示例12: CustomStartEndLineStyle

 public CustomStartEndLineStyle(string startFontName, int startCharacterIndex, Color startColor, float startSize,
                                string endFontName, int endCharacterIndex, Color endColor, float endSize,
                                Color lineColor, float lineSize)
 {
     var startFont = new GeoFont(startFontName, startSize);
     var endFont = new GeoFont(endFontName, endSize);
     _startPointStyle = new PointStyle(startFont, startCharacterIndex, new GeoSolidBrush(GeoColor.FromArgb(startColor.A, startColor.R, startColor.G, startColor.B)));
     _endPointStyle = new PointStyle(endFont, endCharacterIndex, new GeoSolidBrush(GeoColor.FromArgb(endColor.A, endColor.R, endColor.G, endColor.B)));
     _lineStyle = new LineStyle(new GeoPen(GeoColor.FromArgb(lineColor.A, lineColor.R, lineColor.G, lineColor.B), lineSize));
 }
开发者ID:AuditoryBiophysicsLab,项目名称:ESME-Workbench,代码行数:10,代码来源:CustomStartEndLineStyle.cs

示例13: ConfigureOGLLineProperties

 protected void ConfigureOGLLineProperties(LineStyle style, int width) { 
     int stipFact = 0; 
     short stipple = ILPanel.StippleFromLineStyle(style,ref stipFact); 
     GL.LineWidth(width); 
     if (style == LineStyle.Solid || style == LineStyle.None) {
         GL.Disable(EnableCap.LineStipple); 
     } else {
         GL.Enable(EnableCap.LineStipple); 
         GL.LineStipple (stipFact,stipple); 
     }
 }
开发者ID:wdxa,项目名称:ILNumerics,代码行数:11,代码来源:ILOGLAxis.cs

示例14: IsValid

        /// <summary>
        /// Determines if the given value represents a valid state of this property.
        /// </summary>
        /// <param name="value">The state that should be used.</param>
        /// <returns>True if the state is valid, otherwise false.</returns>
        protected override Boolean IsValid(CSSValue value)
        {
            var style = value.ToLineStyle();

            if (style.HasValue)
                _style = style.Value;
            else if (value != CSSValue.Inherit)
                return false;

            return true;
        }
开发者ID:jogibear9988,项目名称:AngleSharp,代码行数:16,代码来源:CSSColumnRuleStyleProperty.cs

示例15: OverlayLineSegments

 public OverlayLineSegments(ICollection<Geo> points, Color color, float size = 1f, LineStyle lineStyle = LineStyle.Solid)
     : base(color, size, lineStyle)
 {
     Segments = new List<OverlayLineSegment>();
     Add(points);
     if (points.Count < 2) return;
     CreateSegments();
     ComputeBoundingBox();
     CheckForClosure();
     CheckCrossingSegments();
 }
开发者ID:AuditoryBiophysicsLab,项目名称:ESME-Workbench,代码行数:11,代码来源:OverlayLineSegments.cs


注:本文中的LineStyle类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。