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

C# LineType类代码示例

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

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



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

示例1: ProjectOnto

		public static Point ProjectOnto(this Point p, LineSegment seg, LineType type, out int? end)
		{
			end = 0;
			Vector v = seg.Vector();
			Vector w = p.Sub(seg.A);
			T c1 = w.Dot(v); // c1 == |w|*|v|*cos(angle between them)
			if (c1 <= 0) { // angle between line segment and (p-seg.A) is negative (-180..0)?
				if (v.X == 0 && v.Y == 0) {
					// seg.A == seg.B
					end = null;
					return seg.A;
				} else if (c1 < 0)
					end = -1;
				if (type != LineType.Infinite)
					return seg.A;
			}
			T c2 = v.Quadrance(); // == |v|*|v|
			if (c1 >= c2) { // quadrance from seg.A to projected point >= quadrance of seg
				if (c1 > c2)
					end = 1;
				if (type == LineType.Segment)
					return seg.B;
			}
			if (c2 == 0) {
				// seg.A and seg.B are infitessimally close together; c2 was truncated to zero
				end = null;
				return seg.A;
			}

			T frac = c1 / c2;                    // == |w|/|v|*cos(angle)
			Point projected = seg.A.Add(v.Mul(frac)); // == p0 + v/|v|*|w|*cos(angle)
			return projected;
		}
开发者ID:qwertie,项目名称:ecsharp,代码行数:33,代码来源:LineMathTT.cs


示例2: LineData

 public LineData(string text, int left, int right, LineType type)
 {
   _text = text;
   _left = left;
   _right = right;
   _type = type;
 }
开发者ID:nuxleus,项目名称:flexwiki,代码行数:7,代码来源:LineData.cs


示例3: LineInfo

 public LineInfo(LineType aType, int aLineNumber, int aIncludeFileID, string aLine)
 {
     Type          = aType;
     LineNumber    = aLineNumber;
     Line          = aLine;
     IncludeFileID = aIncludeFileID;
 }
开发者ID:Treer,项目名称:POpp,代码行数:7,代码来源:LineInfo.cs


示例4: BeginLine

 protected override void BeginLine(string label, TextWriter fw, LineType type)
 {
     if (m_textProps.TextLabels)
     {
         if (TextFormatter.IsLabel(label))
         {
             RtfTools.SetFont(fw, Fonts.LabelFont, 3);
             fw.Write(label);
         }
         else
         {
             RtfTools.SetFont(fw, Fonts.TextFont, 1);
             fw.Write(label);
         }
     }
     switch (type)
     {
         case LineType.TEXT:
             RtfTools.SetFont(fw, Fonts.TextFont, 1);
             break;
         case LineType.CHORD:
             RtfTools.SetFont(fw, Fonts.ChordFont, 2);
             break;
     }
 }
开发者ID:BackupTheBerlios,项目名称:zp7-svn,代码行数:25,代码来源:RTFFilters.cs


示例5: ParcourChannel

        public ParcourChannel(Vector Start, Vector End, LineType type, List<Line> lines, Converter c)
        {
            this.Start = Start;
            this.End = End;
            List<Line> pointLine = lines.Where(p => p.Type == (int)LineType.Point).ToList();
            int i = 0;
            if (type == LineType.START_B)
            {
                i = 9;
            }
            else if (type == LineType.START_C)
            {
                i = 18;
            }
            else if (type == LineType.START_D)
            {
                i = 27;
            }
            List<Line> corridorPoints = new List<Line>();
            for (int j = 0; j < 9; j++)
            {
                corridorPoints.Add(pointLine[i + j]);
            }
            foreach (Line l in corridorPoints)
            {
                Vector v = ParcourModel.getVector(c, l.A);

                if (isEdited(l))
                {
                    ImmutablePoints.Add(v);
                }
                LinearCombinations.Add(v);
            }
            LinearCombinations.Add(End);
        }
开发者ID:helios57,项目名称:anrl,代码行数:35,代码来源:ParcourModel.cs


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


示例7: LinePrimitive

 /// <summary>
 /// Construction
 /// </summary>
 public LinePrimitive(LineType type, int penIndex, PointF p1, PointF p2)
 {
     this.m_LineType = type;
     this.m_PenIndex = penIndex;
     this.m_P1 = p1;
     this.m_P2 = p2;
 }
开发者ID:ClassroomPresenter,项目名称:CP3,代码行数:10,代码来源:LinePrimitive.cs


示例8: CreateResult

 protected override RuleResult CreateResult(LineType lineType, string key)
 {
     RuleResult result = base.CreateResult(lineType, key);
     if(lineType != LineType.Unknown && lineType != LineType.Empty)
         result.EventType = EventType.Sql;
     return result;
 }
开发者ID:rexwhitten,项目名称:edocs,代码行数:7,代码来源:Sql.cs


示例9: GetLineStyle

 public static Paint.Style GetLineStyle(LineType lineType)
 {
     if (lineType == LineType.Solid)
         return Paint.Style.Fill;
     if (lineType == LineType.Stroke)
         return Paint.Style.Stroke;
     return Paint.Style.Fill;
 }
开发者ID:knji,项目名称:mvvmcross.plugins,代码行数:8,代码来源:MapquestStyleFactory.cs


示例10: BorderBrush

 public BorderBrush(Color backgroundColor, LineType lineType, Color lineColor, int lineWidth = 1)
 {
     BackgroundColor = backgroundColor;
     this.lineType = lineType;
     this.lineColor = lineColor;
     this.lineWidth = lineWidth;
     RebuildTexture();
 }
开发者ID:punker76,项目名称:monogameui,代码行数:8,代码来源:BorderBrush.cs


示例11: Line

        public Line(PointD tstartpnt, PointD tendpnt, Color tcolor, LineType ttype, float twidth)
        {
            this.Color = tcolor;
            this.LineType = ttype;
            this.LineWidth = twidth;

            this.p1 = tstartpnt.Clone() as PointD;
            this.p2 = tendpnt.Clone() as PointD;
        }
开发者ID:NTUST-PTL,项目名称:PTL-Project,代码行数:9,代码来源:04_1D.cs


示例12: TestItsc

		private void TestItsc(LineSegment<float> p, LineSegment<float> q, Point<float>? expected, float expect_pFrac, LineType pt = LineType.Segment, LineType qt = LineType.Segment)
		{
			float pFrac, qFrac;
			bool intersected = p.ComputeIntersection(pt, out pFrac, q, qt, out qFrac);
			Assert.AreEqual(expected.HasValue, intersected);
			Point<float>? result = p.ComputeIntersection(pt, q, qt);
			Assert.AreEqual(expected, result);
			Assert.AreEqual(expect_pFrac, pFrac);
		}
开发者ID:default0,项目名称:LoycCore,代码行数:9,代码来源:LineMathTests.cs


示例13: UpdateWinnerInfo

        public void UpdateWinnerInfo(LineType lineType, int index, bool first)
        {
            WinnerLine  = lineType;
            WinnerIndex = index;

            if (first)
                Wins++;
            else
                Losses++;
        }
开发者ID:octopusinvitro,项目名称:unbeatable-nac,代码行数:10,代码来源:GameStats.cs


示例14: FilterSource

		public FilterSource ()
		{
			// Initialize the linetype member.
			SrcLineType = LineType.None;
			SrcLangType = LangType.None;
			StrConstIdentifier = " ";

			SnippetMode = true;
			OriginalIsText = true;
			token = new StringBuilder ();
			SetFileType ("source");
		}
开发者ID:ArsenShnurkov,项目名称:beagle-1,代码行数:12,代码来源:FilterSource.cs


示例15: DrawLine

 public static void DrawLine(IInputOutputArray image,
     Point start,
     Point end,
     MCvScalar color,
     int thickness = 1,
     LineType lineType = LineType.EightConnected,
     int shift = 0)
 {
     using (InputOutputArray array = image.GetInputOutputArray())
     {
         cveLine(array, ref start, ref end, ref color, thickness, lineType, shift);
     }
 }
开发者ID:KalinovDmitri,项目名称:OpenCV,代码行数:13,代码来源:CvInvokeDrawing.cs


示例16: AddLinePostfixTags

 private bool AddLinePostfixTags(LineType type, bool flagOpened, StringBuilder sb, int count, int linesLength)
 {
     if ((type & LineType.PreFormatted) != 0)
     {
         sb.Append("</pre>");
     }
     if (((type & LineType.CloseEnd) != 0) || (count == linesLength - 1))
     {
         sb.Append("</p>");
         flagOpened = false;
     }
     return flagOpened;
 }
开发者ID:CrabwiseStudios,项目名称:PDFtoEPUB,代码行数:13,代码来源:HtmlSplitter.cs


示例17: AddLinePrefixTags

 private bool AddLinePrefixTags(LineType type, bool flagOpened, StringBuilder sb)
 {
     if (((type & LineType.CloseBefore) != 0) || (flagOpened == false))
     {
         sb.Append("<p>");
         flagOpened = true;
     }
     if ((type & LineType.PreFormatted) != 0)
     {
         sb.Append("<pre>");
     }
     return flagOpened;
 }
开发者ID:CrabwiseStudios,项目名称:PDFtoEPUB,代码行数:13,代码来源:HtmlSplitter.cs


示例18: DrawCircle

 public static void DrawCircle(IInputOutputArray image,
     Point center,
     int radius,
     MCvScalar color,
     int thickness = 1,
     LineType lineType = LineType.EightConnected,
     int shift = 0)
 {
     using (InputOutputArray array = image.GetInputOutputArray())
     {
         cveCircle(array, ref center, radius, ref color, thickness, lineType, shift);
     }
 }
开发者ID:KalinovDmitri,项目名称:OpenCV,代码行数:13,代码来源:CvInvokeDrawing.cs


示例19: DrawEllipse

        public static void DrawEllipse(IInputOutputArray image,
            RotatedRect box,
            MCvScalar color,
            int thickness = 1,
            LineType lineType = LineType.EightConnected,
            int shift = 0)
        {
            int width = (int)Math.Round(box.Size.Height * 0.5F);
            int height = (int)Math.Round(box.Size.Width * 0.5F);
            Size axesSize = new Size(width, height);
            Point center = Point.Round(box.Center);

            DrawEllipse(image, center, axesSize, box.Angle, 0.0D, 360.0D, color, thickness, lineType, shift);
        }
开发者ID:KalinovDmitri,项目名称:OpenCV,代码行数:14,代码来源:CvInvokeDrawing.cs


示例20: getConnection

        public static Pen getConnection(LineType LineType, ConnectionType ConnectionType, Graphics g)
        {
            Pen pen = ConnectionPen.getConnection(ConnectionType, g);

            switch (LineType)
            {
                case LineType.NORMAL: //normal
                    ConnectionPen.setPen(Color.Black, 1.3F);
                    break;
                case LineType.HIGHLIGHTED:
                    ConnectionPen.setPen(Color.Red, 2F);
                    break;
                default:
                    ConnectionPen.setPen(Color.Blue, 1.5F);
                    break;
            }
            return pen ;
        }
开发者ID:Tom-Hoinacki,项目名称:OO-CASE-Tool,代码行数:18,代码来源:ConnectionPenFactory.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# LineTypes类代码示例发布时间:2022-05-24
下一篇:
C# LineStyle类代码示例发布时间: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