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


C# LineJoin类代码示例

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


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

示例1: DrawLine

 /// <summary>
 /// Draws a polyline.
 /// </summary>
 /// <param name="points">The points.</param>
 /// <param name="stroke">The stroke color.</param>
 /// <param name="thickness">The stroke thickness.</param>
 /// <param name="dashArray">The dash array.</param>
 /// <param name="lineJoin">The line join type.</param>
 /// <param name="aliased">if set to <c>true</c> the shape will be aliased.</param>
 public abstract void DrawLine(
     IList<ScreenPoint> points,
     OxyColor stroke,
     double thickness,
     double[] dashArray,
     LineJoin lineJoin,
     bool aliased);
开发者ID:benjaminrupp,项目名称:oxyplot,代码行数:16,代码来源:RenderContextBase.cs

示例2: DrawLine

        public void DrawLine(IList<ScreenPoint> points, OxyColor stroke, double thickness, double[] dashArray,
                             LineJoin lineJoin, bool aliased)
        {
            var e = new Polyline();
            if (stroke != null && thickness > 0)
            {
                e.Stroke = GetCachedBrush(stroke);

                switch (lineJoin)
                {
                    case LineJoin.Round:
                        e.StrokeLineJoin = PenLineJoin.Round;
                        break;
                    case LineJoin.Bevel:
                        e.StrokeLineJoin = PenLineJoin.Bevel;
                        break;
                    //  The default StrokeLineJoin is Miter
                }

                if (thickness != 1) // default values is 1
                    e.StrokeThickness = thickness;
                if (dashArray != null)
                    e.StrokeDashArray = new DoubleCollection(dashArray);
            }
            // pl.Fill = null;
            if (aliased)
                e.SetValue(RenderOptions.EdgeModeProperty, EdgeMode.Aliased);

            var pc = new PointCollection(points.Count);
            foreach (var p in points)
                pc.Add(ToPoint(p));
            e.Points = pc;

            Add(e);
        }
开发者ID:benjaminrupp,项目名称:oxyplot,代码行数:35,代码来源:GeometryRenderContext.cs

示例3: DrawLine

 /// <summary>
 /// Draws a polyline.
 /// </summary>
 /// <param name="points">The points.</param>
 /// <param name="stroke">The stroke color.</param>
 /// <param name="thickness">The stroke thickness (in device independent units, 1/96 inch).</param>
 /// <param name="dashArray">The dash array (in device independent units, 1/96 inch). Use <c>null</c> to get a solid line.</param>
 /// <param name="lineJoin">The line join type.</param>
 /// <param name="aliased">if set to <c>true</c> the shape will be aliased.</param>
 public void DrawLine(
     IList<ScreenPoint> points,
     OxyColor stroke,
     double thickness = 1,
     double[] dashArray = null,
     LineJoin lineJoin = LineJoin.Miter,
     bool aliased = false)
 {
 }
开发者ID:benjaminrupp,项目名称:oxyplot,代码行数:18,代码来源:EmptyRenderContext.cs

示例4: f_AddPix

 /// <summary>
 /// 在原有波形上添加一条线
 /// 不可动态循环
 /// </summary>
 /// <param name="listX">X轴</param>
 /// <param name="listY">Y轴</param>
 /// <param name="listColor">线条颜色</param>
 /// <param name="listWidth">线条宽度</param>
 /// <param name="listLineJoin">线条连接点</param>
 /// <param name="listLineCap">线条起始线帽</param>
 /// <param name="listDrawStyle">线条样式</param>
 public void f_AddPix(ref List<float> listX, ref List<float> listY, Color listColor, int listWidth, LineJoin listLineJoin, LineCap listLineCap, DrawStyle listDrawStyle)
 {
     //装载
     _listX.Add(listX);
     _listY.Add(listY);
     _listColor.Add(listColor);
     _listWidth.Add(listWidth);
     _listLineJoin.Add(listLineJoin);
     _listLineCap.Add(listLineCap);
     _listDrawStyle.Add(listDrawStyle);
 }
开发者ID:mxinshangshang,项目名称:CSharp_ZGraph,代码行数:22,代码来源:ZGraph_FuncPublic.cs

示例5: SetDataSource

    void SetDataSource(LineJoin selected)
    {
      this.BeginUpdate();

      Items.Clear();
      foreach (LineJoin o in Enum.GetValues(typeof(LineJoin)))
        Items.Add(o);

      SelectedItem = selected;

      this.EndUpdate();
    }
开发者ID:Altaxo,项目名称:Altaxo,代码行数:12,代码来源:LineJoinComboBox.cs

示例6: 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,
     LineJoin lineJoin = LineJoin.Miter)
 {
     this.Color = color;
     this.Thickness = thickness;
     this.DashArray = lineStyle.GetDashArray();
     this.LineStyle = lineStyle;
     this.LineJoin = lineJoin;
 }
开发者ID:benjaminrupp,项目名称:oxyplot,代码行数:19,代码来源:OxyPen.cs

示例7: StrokeMath

 public StrokeMath()
 {
     m_width = 0.5;
     m_width_abs = 0.5;
     m_width_eps = 0.5 / 1024.0;
     m_width_sign = 1;
     m_miter_limit = 4.0;
     m_inner_miter_limit = 1.01;
     m_approx_scale = 1.0;
     m_line_cap = LineCap.Butt;
     m_line_join = LineJoin.Miter;
     m_inner_join = InnerJoin.Miter;
 }
开发者ID:prepare,项目名称:HTML-Renderer,代码行数:13,代码来源:StrokeMath.cs

示例8: Pen

		public Pen (Brush brush, float width)
		{
			_brush = (Brush)brush.Clone();;
			_width = width;
			_dashStyle = DashStyle.Solid;
			_startCap = LineCap.Flat;
			_dashCap = DashCap.Flat;
			_endCap = LineCap.Flat;
			_alignment = PenAlignment.Center;
			_lineJoin = LineJoin.Miter;
			_miterLimit = 10f;
			_transform = new Matrix();
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:13,代码来源:Pen.jvm.cs

示例9: Stroke

 // Methods
 public Stroke()
 {
     this.pen = Pens.Black;
     this.brush = new SolidColor(Color.Empty);
     this.strokeColor = Color.Empty;
     this.Width = 1f;
     this.Linecap = LineCap.Square;
     this.Linejoin = LineJoin.Miter;
     this.MiterLimit = 4;
     this.DashArray = null;
     this.DashOffset = 0f;
     this.Opacity = 1f;
 }
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:14,代码来源:Stroke.cs

示例10: f_LoadOnePix

 /// <summary>
 /// 清空原有数据并加载一条波形数据
 /// </summary>
 /// <param name="listX">X轴</param>
 /// <param name="listY">Y轴</param>
 /// <param name="listColor">线条颜色</param>
 /// <param name="listWidth">线条宽度</param>
 /// <param name="listLineJoin">线条连接点</param>
 /// <param name="listLineCap">线条起始线帽</param>
 /// <param name="listDrawStyle">线条样式</param>
 public void f_LoadOnePix(ref List<float> listX, ref List<float> listY, Color listColor, int listWidth, LineJoin listLineJoin, LineCap listLineCap,DrawStyle listDrawStyle)
 {
     //重新初始化
     f_ClearAllPix();
     //装载
     _listX.Add(listX);
     _listY.Add(listY);
     _listColor.Add(listColor);
     _listWidth.Add(listWidth);
     _listLineJoin.Add(listLineJoin);
     _listLineCap.Add(listLineCap);
     _listDrawStyle.Add(listDrawStyle);
 }
开发者ID:mxinshangshang,项目名称:CSharp_ZGraph,代码行数:23,代码来源:ZGraph_FuncPublic.cs

示例11: MapJoinStyle

	// Map the join style from "System.Drawing" to "Xsharp".
	private static JoinStyle MapJoinStyle(LineJoin style)
			{
				switch(style)
				{
					case LineJoin.Miter:
					case LineJoin.MiterClipped:
					default:
						return JoinStyle.JoinMiter;
					case LineJoin.Bevel:
						return JoinStyle.JoinBevel;
					case LineJoin.Round:
						return JoinStyle.JoinRound;
				}
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:15,代码来源:DrawingPen.cs

示例12: DrawLines

 public void DrawLines(IEnumerable<ScreenPoint> points, OxyColor stroke, double thickness, double[] dashArray,
                      LineJoin lineJoin, bool aliased)
 {
     var startPoint = new ScreenPoint();
     bool first = true;
     foreach (var p in points)
     {
         if (!first)
         {
             Add(new Line { X1 = startPoint.X, Y1 = startPoint.Y, X2 = p.X, Y2 = p.Y });
         }
         else
         {
             startPoint = p;
         }
         first = !first;
     }
 }
开发者ID:benjaminrupp,项目名称:oxyplot,代码行数:18,代码来源:GeometryRenderContext.cs

示例13: Line2D

        /// <summary>
        /// Creates a new line2D.
        /// </summary>
        /// <param name="x"></param>
        /// <param name="y"></param>
        /// <param name="color"></param>
        /// <param name="width"></param>
        /// <param name="lineJoin"></param>
        /// <param name="dashes"></param>
        public Line2D(double[] x, double[] y, int color, float width, LineJoin lineJoin, int[] dashes)
        {
            this.X = x;
            this.Y = y;
            this.Color = color;
            this.Width = width;
            this.LineJoin = lineJoin;
            this.Dashes = dashes;

            MinX = int.MaxValue;
            MaxX = int.MinValue;
            for (int idx = 0; idx < x.Length; idx++)
            {
                if (x[idx] > MaxX)
                {
                    MaxX = x[idx];
                }
                if (x[idx] < MinX)
                {
                    MinX = x[idx];
                }
            }
            MinY = int.MaxValue;
            MaxY = int.MinValue;
            for (int idx = 0; idx < y.Length; idx++)
            {
                if (y[idx] > MaxY)
                {
                    MaxY = y[idx];
                }
                if (y[idx] < MinY)
                {
                    MinY = y[idx];
                }
            }

            this.MinZoom = float.MinValue;
            this.MaxZoom = float.MaxValue;
        }
开发者ID:robert-hickey,项目名称:OsmSharp,代码行数:48,代码来源:Line2D.cs

示例14: DrawLine

        public void DrawLine(IList<ScreenPoint> points, OxyColor stroke, double thickness, double[] dashArray,
                             LineJoin lineJoin, bool aliased)
        {
            var pen = CreatePen(stroke, thickness, dashArray, lineJoin);

            // todo: alias line
            //            if (aliased)
            //              .SetValue(RenderOptions.EdgeModeProperty, EdgeMode.Aliased);

            var lp = new Point();
            int i = 0;
            foreach (var point in points)
            {
                var p = point.ToPoint();
                if (i > 0)
                {
                    dc.DrawLine(pen, lp, p);
                }
                i++;
                lp = p;
            }
        }
开发者ID:Celderon,项目名称:oxyplot,代码行数:22,代码来源:DrawingRenderContext.cs

示例15: CreatePen

 private static Pen CreatePen(OxyColor stroke, double thickness, double[] dashArray,
                              LineJoin lineJoin = LineJoin.Miter)
 {
     if (stroke == null)
         return null;
     var pen = new Pen(stroke.ToBrush(), thickness);
     if (dashArray != null)
     {
         pen.DashStyle = new DashStyle(dashArray, 0);
     }
     switch (lineJoin)
     {
         case LineJoin.Round:
             pen.LineJoin = PenLineJoin.Round;
             break;
         case LineJoin.Bevel:
             pen.LineJoin = PenLineJoin.Bevel;
             break;
             //  The default LineJoin is Miter
     }
     return pen;
 }
开发者ID:Celderon,项目名称:oxyplot,代码行数:22,代码来源:DrawingRenderContext.cs


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