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


C# LineCap类代码示例

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


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

示例1: Configure

 private void Configure()
 {
     _joinType = LineJoinType.Round;
     _startCap = LineCap.Round;
     _endCap = LineCap.Round;
     _decorations = new CopyList<ILineDecoration>();
 }
开发者ID:joelmuzz,项目名称:DotSpatial,代码行数:7,代码来源:CartographicStroke.cs

示例2: SetLineCap

        // Set/get line caps: start, end, and dash

        // Line cap and join APIs by using LineCap and LineJoin enums.

        public GpStatus SetLineCap(LineCap startCap,
                          LineCap endCap,
                          DashCap dashCap)
        {
            return SetStatus(NativeMethods.GdipSetPenLineCap197819(nativePen,
                                       startCap, endCap, dashCap));
        }
开发者ID:intille,项目名称:mitessoftware,代码行数:11,代码来源:PenPlus.cs

示例3: PenDialog

        public PenDialog(int p, LineCap lineCap)
        {
            InitializeComponent();
            
            penSizeNumericUpDown.Value = p;

            //switch (lineCap)
            //{
            //    case LineCap.AnchorMask:
            //        {
            //            penStyleNumericUpDown.Value = 1;
            //        }
            //        break;
            //    case LineCap.ArrowAnchor:
            //        {
            //            penStyleNumericUpDown.Value = 2;
            //        }
            //        break;
            //    case LineCap.Custom:
            //        {
            //            penStyleNumericUpDown.Value = 3;
            //        }
            //        break;
            //    case LineCap.DiamondAnchor:
            //        {
            //            penStyleNumericUpDown.Value = 4;
            //        }
            //        break;
            //    case LineCap.Flat:
            //        {
            //            penStyleNumericUpDown.Value = 5;
            //        }
            //        break;
            //    case LineCap.NoAnchor:
            //        {
            //            penStyleNumericUpDown.Value = 6;
            //        }
            //        break;
            //    case LineCap.Round:
            //        {
            //            penStyleNumericUpDown.Value = 7;
            //        }
            //        break;
            //    case LineCap.Square:
            //        {
            //            penStyleNumericUpDown.Value = 8;
            //        }
            //        break;
            //    case LineCap.SquareAnchor:
            //        {
            //            penStyleNumericUpDown.Value = 9;
            //        }
            //        break;
            //    case LineCap.Triangle:
            //        {
            //            penStyleNumericUpDown.Value = 10;
            //        }
            //        break;
            //}
        }
开发者ID:xs2ranjeet,项目名称:13ns9-1spr,代码行数:60,代码来源:PenDialog.cs

示例4: LineFunction

		public LineFunction ()
		{
			Width = 1;
			Color = "#FFFFFF";
			Opacity = 1.0m;
			LineCap = LineCap.Butt;
		}
开发者ID:gdoubleultd,项目名称:Blitline.Net,代码行数:7,代码来源:LineFunction.cs

示例5: _SetBaseCap

 private void _SetBaseCap(LineCap baseCap)
 {
     int status = SafeNativeMethods.Gdip.GdipSetCustomLineCapBaseCap(new HandleRef(this, (IntPtr) this.nativeCap), baseCap);
     if (status != 0)
     {
         throw SafeNativeMethods.Gdip.StatusException(status);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:8,代码来源:CustomLineCap.cs

示例6: CustomLineCap

	public CustomLineCap(GraphicsPath fillPath,
						 GraphicsPath strokePath,
						 LineCap baseCap, float baseInset)
			{
				this.fillPath = fillPath;
				this.strokePath = strokePath;
				this.baseCap = baseCap;
				this.baseInset = baseInset;
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:9,代码来源:CustomLineCap.cs

示例7: CustomLineCap

 public CustomLineCap(GraphicsPath fillPath, GraphicsPath strokePath, LineCap baseCap, float baseInset)
 {
     IntPtr zero = IntPtr.Zero;
     int status = SafeNativeMethods.Gdip.GdipCreateCustomLineCap(new HandleRef(fillPath, (fillPath == null) ? IntPtr.Zero : fillPath.nativePath), new HandleRef(strokePath, (strokePath == null) ? IntPtr.Zero : strokePath.nativePath), baseCap, baseInset, out zero);
     if (status != 0)
     {
         throw SafeNativeMethods.Gdip.StatusException(status);
     }
     this.SetNativeLineCap(zero);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:10,代码来源:CustomLineCap.cs

示例8: 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

示例9: CustomLineCap

		public CustomLineCap(GraphicsPath fillPath, GraphicsPath strokePath, LineCap baseCap, float baseInset)
		{
			IntPtr fill = IntPtr.Zero;
			IntPtr stroke = IntPtr.Zero;

			if (fillPath != null)
				fill = fillPath.nativePath;
			if (strokePath != null)
				stroke = strokePath.nativePath;

			Status status = GDIPlus.GdipCreateCustomLineCap (fill, stroke, baseCap, baseInset, out nativeObject);
			GDIPlus.CheckStatus (status);
		}
开发者ID:nlhepler,项目名称:mono,代码行数:13,代码来源:CustomLineCap.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: BaseLine

		public BaseLine(Color color, DashStyle dashStyle,float thickness, LineCap startLineCap, LineCap endLineCap, DashCap dashLineCap)
		{
			if (color == Color.White) {
				this.color = Color.Black;
			}
			
			this.color = color;
			this.dashStyle = dashStyle;
			this.thickness = thickness;
			this.startLineCap = startLineCap;
			this.endLineCap = endLineCap;
			this.dashLineCap = dashLineCap;
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:13,代码来源:BaseLine.cs

示例12: 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

示例13: MapCapStyle

	// Map the cap style from "System.Drawing" to "Xsharp".
	private static CapStyle MapCapStyle(LineCap style)
			{
				switch(style)
				{
					case LineCap.Square:
						return CapStyle.CapProjecting;
					case LineCap.Flat:
						return CapStyle.CapButt;
					case LineCap.Round:
					default:
						return CapStyle.CapRound;
				}
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:14,代码来源:DrawingPen.cs

示例14: 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

示例15: 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


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