本文整理汇总了C#中IVertexSource.Rewind方法的典型用法代码示例。如果您正苦于以下问题:C# IVertexSource.Rewind方法的具体用法?C# IVertexSource.Rewind怎么用?C# IVertexSource.Rewind使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IVertexSource
的用法示例。
在下文中一共展示了IVertexSource.Rewind方法的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;
}
示例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);
}
}
示例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");
}
示例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);
}
}