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


C# IVertexSource.Vertex方法代码示例

本文整理汇总了C#中IVertexSource.Vertex方法的典型用法代码示例。如果您正苦于以下问题:C# IVertexSource.Vertex方法的具体用法?C# IVertexSource.Vertex怎么用?C# IVertexSource.Vertex使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IVertexSource的用法示例。


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

示例1: BoundingRectSingle

        //-----------------------------------------------------BoundingRectSingle
        //template<class VertexSource, class CoordT>
        public static bool BoundingRectSingle(IVertexSource vs, uint path_id,
								  out double x1, out double y1, out double x2, out double y2)
        {
            double x = 0;
            double y = 0;
            bool first = true;

            x1 = (double)(1);
            y1 = (double)(1);
            x2 = (double)(0);
            y2 = (double)(0);

            vs.Rewind(path_id);
            uint PathAndFlags;
            while (!Path.IsStop(PathAndFlags = vs.Vertex(out x, out y)))
            {
                if (Path.IsVertex(PathAndFlags))
                {
                    if (first)
                    {
                        x1 = (double)(x);
                        y1 = (double)(y);
                        x2 = (double)(x);
                        y2 = (double)(y);
                        first = false;
                    }
                    else
                    {
                        if ((double)(x) < x1) x1 = (double)(x);
                        if ((double)(y) < y1) y1 = (double)(y);
                        if ((double)(x) > x2) x2 = (double)(x);
                        if ((double)(y) > y2) y2 = (double)(y);
                    }
                }
            }
            return x1 <= x2 && y1 <= y2;
        }
开发者ID:GeroL,项目名称:MOSA-Project,代码行数:39,代码来源:BoundingRect.cs

示例2: AddPath

        ///<summary>
        ///</summary>
        ///<param name="vs"></param>
        ///<param name="pathId"></param>
        public void AddPath(IVertexSource vs, uint pathId)
        {
            double x;
            double y;

            uint cmd;
            vs.Rewind(pathId);
            if (_rasterizer.IsSorted) Reset();
            while (!Path.IsStop(cmd = vs.Vertex(out x, out y)))
            {
                AddVertex(x, y, cmd);
            }
        }
开发者ID:hj1980,项目名称:Mosa,代码行数:17,代码来源:AntiAliasedCompundRasterizer.cs

示例3: AddPath

        public void AddPath(IVertexSource vs, uint path_id)
        {
            double x = 0;
            double y = 0;

            uint PathAndFlags;
            vs.Rewind(path_id);
            if (m_outline.IsSorted)
            {
                Reset();
            }

            while (!Path.IsStop(PathAndFlags = vs.Vertex(out x, out y)))
            {
                AddVertex(x, y, PathAndFlags);
            }

            //DebugFile.Print("Test");
        }
开发者ID:davidleon,项目名称:MOSA-Project,代码行数:19,代码来源:AntiAliasedScanlineRasterizer.cs

示例4: concat_path

 public void concat_path(IVertexSource vs, uint path_id)
 {
     double x, y;
     uint PathAndFlags;
     vs.Rewind(path_id);
     while (!Path.IsStop(PathAndFlags = vs.Vertex(out x, out y)))
     {
         m_vertices.add_vertex(x, y, PathAndFlags);
     }
 }
开发者ID:tea,项目名称:MOSA-Project,代码行数:10,代码来源:PathStorage.cs


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