• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# LineStyle类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: OnStartEvent

        public override void OnStartEvent()
        {
            LineStyle lineStyle = new LineStyle();
            lineStyle.SetPatternStyle((int)EnumLinePattern.LP_DashedLine);
            lineStyle.SetColor(100, 0, 100);

            tempLineNode.SetLineStyle(lineStyle);

            this.ShowTempNode(tempLineNode);
            GetRenderer().RequestDraw(1);
        }
开发者ID:xazk027,项目名称:anycadnetsdkpro,代码行数:11,代码来源:DrawLineEditor.cs


示例17: XfRecord

		/// <summary>
		/// The constructor for the record.
		/// </summary>
		/// <param name="biff">The GenericBiff record that should contain the correct type and data for the XF record.</param>
		/// <exception cref="InvalidRecordIdException">
		/// An InvalidRecordIdException is thrown if biff contains an invalid type or invalid data.
		/// </exception>
		public XfRecord(GenericBiff biff) 
		{
			if(biff.Id == (ushort)RecordType.Xf)
			{
				BinaryReader reader = new BinaryReader(biff.GetDataStream());
				
				_fontIdx = reader.ReadUInt16();
				_formatIdx = reader.ReadUInt16();

				ushort data = reader.ReadUInt16();
				_typeAndProtection = new TypeAndProtection(data & 0x000F);
				_parentIdx = (ushort)((data & 0xFFF0) >> 8);

				byte data2 = reader.ReadByte();
				_horizontalAlignment = (HorizontalAlignment)(data2 & 0x07);
				_wrapped = (data & 0x088) != 0;
				_verticalAlignment = (VerticalAlignment)((data2 & 0x70) >> 4);
				
				data2 = reader.ReadByte();
				_rotation = new Rotation(data2);

				data2 = reader.ReadByte();
				_indentLevel = new Nibble((byte)(data2 & 0x0F));
				_shrinkContent = (data2 & 0x10) == 1;

				_parentStyle = (ParentStyleAttributes)(reader.ReadByte());
					
				uint data3 = reader.ReadUInt32();
				_leftLineStyle = (LineStyle)(data3 & 0x0000000F);
				_rightLineStyle = (LineStyle)((data3 & 0x000000F0) >> 1);
				_topLineStyle = (LineStyle)((data3 & 0x00000F00) >> 2);
				_bottomLineStyle = (LineStyle)((data3 & 0x0000F000) >> 3);
				_rightLineColor = (ushort)((data3 & 0x007F0000) >> 4);
				_leftLineColor = (ushort)((data3 & 0x3F800000) >> 5);
				_diagonalRightTopToLeftBottom = (data & 0x40000000) == 1;
				_diagonalLeftBottomToTopRight = (data & 0x80000000) == 1;

				data3 = reader.ReadUInt32();
				_topLineColor = (ushort)(data3 & 0x0000007F);
				_bottomLineColor = (ushort)((data3 & 0x00003F80) >> 1);
				_diagonalLineColor = (ushort)((data3 & 0x001FC000) >> 3);
				_diagonalLineStyle = (LineStyle)((data3 & 0x01E00000) >> 5);
				_fillPattern = (FillPattern)((data3 & 0xFC000000) >> 6);

				data = reader.ReadUInt16();
				_patternColor = (ushort)(data & 0x007F);
				_patternBackground = (ushort)((data & 0x3F80) >> 7);

				Debug.Assert(reader.BaseStream.Position == reader.BaseStream.Length);
			}
			else
				throw new InvalidRecordIdException(biff.Id, RecordType.Xf);
		}
开发者ID:nicknystrom,项目名称:AscendRewards,代码行数:60,代码来源:XfRecord.cs


示例18: OxyPen

 /// <summary>
 /// Initializes a new instance of the <see cref="OxyPen"/> class.
 /// </summary>
 /// <param name="color">
 /// The color.
 /// </param>
 /// <param name="thickness">
 /// The thickness.
 /// </param>
 /// <param name="lineStyle">
 /// The line style.
 /// </param>
 /// <param name="lineJoin">
 /// The line join.
 /// </param>
 public OxyPen(
     OxyColor color,
     double thickness = 1.0,
     LineStyle lineStyle = LineStyle.Solid,
     OxyPenLineJoin lineJoin = OxyPenLineJoin.Miter)
 {
     this.Color = color;
     this.Thickness = thickness;
     this.DashArray = LineStyleHelper.GetDashArray(lineStyle);
     this.LineStyle = lineStyle;
     this.LineJoin = lineJoin;
 }
开发者ID:AndrewTPohlmann,项目名称:open-hardware-monitor,代码行数:27,代码来源:OxyPen.cs


示例19: YLevel

          public YLevel(string name, int order)
          {
            if (name.IsNullOrWhiteSpace()) name = Guid.NewGuid().ToString();

            m_Name = name;
            m_Order = order;
            Visible = true;
            AffectsScale = true;
            HLineStyle = new LineStyle{ Color = Color.FromArgb(240, 255, 100, 0), 
                                        Width = 1,
                                        DashStyle= System.Drawing.Drawing2D.DashStyle.Dot};
            ValueFormat = "n2";
          }
开发者ID:vlapchenko,项目名称:nfx,代码行数:13,代码来源:Series.cs


示例20: RadiusMearsureTrackInteractiveOverlay

        public RadiusMearsureTrackInteractiveOverlay(DistanceUnit distanceUnit, GeographyUnit mapUnit)
        {
            DistanceUnit = distanceUnit;
            MapUnit = mapUnit;

            textBlock = new TextBlock();
            textBlock.Visibility = Visibility.Collapsed;
            OverlayCanvas.Children.Add(textBlock);

            PolygonTrackMode = PolygonTrackMode.LineWithFill;
            RenderMode = RenderMode.DrawingVisual;

            areaStyle = AreaStyles.CreateSimpleAreaStyle(GeoColor.FromArgb(80, GeoColor.SimpleColors.LightGreen), GeoColor.SimpleColors.White, 2);
            pointStyle = PointStyles.CreateSimpleCircleStyle(GeoColor.SimpleColors.DarkBlue, 8);
            lineStyle = LineStyles.CreateSimpleLineStyle(GeoColor.SimpleColors.White, 3, true);

            SetStylesForInMemoryFeatureLayer(TrackShapeLayer);
            SetStylesForInMemoryFeatureLayer(TrackShapesInProcessLayer);
        }
开发者ID:MapSuiteSamples,项目名称:MapSuiteSamples,代码行数:19,代码来源:RadiusMearsureTrackInteractiveOverlay.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# LineType类代码示例发布时间:2022-05-24
下一篇:
C# LineSeries类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap