本文整理汇总了C#中SVGPoint类的典型用法代码示例。如果您正苦于以下问题:C# SVGPoint类的具体用法?C# SVGPoint怎么用?C# SVGPoint使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SVGPoint类属于命名空间,在下文中一共展示了SVGPoint类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ArcTo
//--------------------------------------------------------------------------------
//Methods: ArcTo
//--------------------------------------------------------------------------------
public void ArcTo(float r1, float r2, float angle, bool largeArcFlag, bool sweepFlag, SVGPoint p)
{
if((this.isUseWidth) && ((int)this._width > 1))
ArcTo(r1, r2, angle, largeArcFlag, sweepFlag, p, this._width);
else
this._basicDraw.ArcTo(r1, r2, angle, largeArcFlag, sweepFlag, p);
}
开发者ID:pjezek,项目名称:UnitySVG,代码行数:10,代码来源:SVGGraphicsStroke.cs
示例2: Circle
//-----
public void Circle(SVGPoint p, float r, SVGColor? strokeColor)
{
if(strokeColor != null) {
SetColor(strokeColor.Value.color);
}
Circle(p, r);
}
开发者ID:pjezek,项目名称:UnitySVG,代码行数:8,代码来源:SVGGraphics.cs
示例3: SVGGEllipse
public SVGGEllipse(SVGPoint p, float r1, float r2, float angle)
{
_p = p;
_r1 = r1;
_r2 = r2;
_angle = angle;
}
开发者ID:pjezek,项目名称:UnitySVG,代码行数:7,代码来源:SVGGEllipse.cs
示例4: ArcTo
/*-------------------------------------------------------------------------------
//Method: Arc4Path
/-------------------------------------------------------------------------------*/
public void ArcTo(float r1, float r2, float angle, bool largeArcFlag, bool sweepFlag, SVGPoint p)
{
SVGPoint[] points = new SVGPoint[1];
points[0] = p;
ExpandBounds(points, (r1 > r2) ? 2 * (int)r1 + 2 : 2 * (int)r2 + 2, (r1 > r2) ? 2 * (int)r1 + 2 : 2 * (int)r2 + 2);
//---------------
this._basicDraw.ArcTo(r1, r2, angle, largeArcFlag, sweepFlag, p);
}
开发者ID:pjezek,项目名称:UnitySVG,代码行数:11,代码来源:SVGGraphicsFill.cs
示例5: SVGGArcAbs
//================================================================================
public SVGGArcAbs(float r1, float r2, float angle,
bool largeArcFlag, bool sweepFlag, SVGPoint p)
{
this._r1 = r1;
this._r2 = r2;
this._angle = angle;
this._largeArcFlag = largeArcFlag;
this._sweepFlag = sweepFlag;
this._p = p;
}
开发者ID:pjezek,项目名称:UnitySVG,代码行数:11,代码来源:SVGGArcAbs.cs
示例6: SVGGraphicsPath
public SVGGraphicsPath()
{
beginPoint = new SVGPoint(0f, 0f);
endPoint = new SVGPoint(0f, 0f);
needSetFirstPoint = true;
boundUL = new SVGPoint(+10000f, +10000f);
boundBR = new SVGPoint(-10000f, -10000f);
transformList = new SVGTransformList();
listObject = new ArrayList();
listType = new ArrayList();
}
开发者ID:pjezek,项目名称:UnitySVG,代码行数:11,代码来源:SVGGraphicsPath.cs
示例7: AngleBetween2Vector
//--------------------------------------------------------------------------------
//AngleBetween2Vector
//--------------------------------------------------------------------------------
//Tinh goc giua 2 vector (p1,p2) (p3,p4);
public float AngleBetween2Vector(SVGPoint p1, SVGPoint p2, SVGPoint p3, SVGPoint p4)
{
SVGPoint vt1, vt2;
vt1 = new SVGPoint(p2.x - p1.x, p2.y - p1.y);
vt2 = new SVGPoint(p4.x - p3.x, p4.y - p3.y);
float t1 = vt1.x*vt2.x + vt1.y*vt2.y;
float gtvt1 = (float)Math.Sqrt(vt1.x * vt1.x + vt1.y*vt1.y);
float gtvt2 = (float)Math.Sqrt(vt2.x * vt2.x + vt2.y*vt2.y);
float t2 = gtvt1 * gtvt2;
float cosAngle = t1/t2;
return((float)Math.Acos(cosAngle));
}
开发者ID:pjezek,项目名称:UnitySVG,代码行数:17,代码来源:SVGGraphics.cs
示例8: BeginSubBuffer
public void BeginSubBuffer()
{
this._boundTopLeft = new SVGPoint(+10000f, +10000f);
this._boundBottomRight = new SVGPoint(-10000f, -10000f);
this._subW = this._width;
this._subH = this._height;
this._inZoneL = 0;
this._inZoneT = 0;
this._translateX = 0;
this._translateY = 0;
this._flagStep = 0;
for(int i = 0; i < this._subW; i++)
for(int j = 0; j < this._subH; j++)
this._flag[i, j] = 0;
this._flagStep = 1;
}
开发者ID:pjezek,项目名称:UnitySVG,代码行数:18,代码来源:SVGGraphicsFill.cs
示例9: SetFirstPoint
private void SetFirstPoint(SVGPoint p)
{
if(needSetFirstPoint) {
beginPoint.SetValue(p);
needSetFirstPoint = false;
}
}
开发者ID:pjezek,项目名称:UnitySVG,代码行数:7,代码来源:SVGGraphicsPath.cs
示例10: RenderPolylineElement
private void RenderPolylineElement(SVGPolylineElement polylineElement, ISVGPathDraw pathDraw)
{
int length = polylineElement.listPoints.Count;
SVGPoint[] points = new SVGPoint[length];
for(int i = 0; i < length; i++)
points[i] = polylineElement.listPoints[i].MatrixTransform(matrixTransform);
pathDraw.Polyline(points);
}
开发者ID:pjezek,项目名称:UnitySVG,代码行数:9,代码来源:SVGGraphicsPath.cs
示例11: RenderCircleElement
private void RenderCircleElement(SVGCircleElement elem, ISVGPathDraw pathDraw)
{
SVGPoint p = new SVGPoint(elem.cx.value, elem.cy.value).MatrixTransform(matrixTransform);
pathDraw.Circle(p, elem.r.value);
}
开发者ID:pjezek,项目名称:UnitySVG,代码行数:5,代码来源:SVGGraphicsPath.cs
示例12: ExpandBounds
private void ExpandBounds(SVGPoint point)
{
ExpandBounds(point.x, point.y);
}
开发者ID:pjezek,项目名称:UnitySVG,代码行数:4,代码来源:SVGGraphicsPath.cs
示例13: AddQuadraticCurveTo
public void AddQuadraticCurveTo(SVGPoint p1, SVGPoint p)
{
SetLastPoint(p);
SVGGQuadraticAbs svgGQuadraticAbs = new SVGGQuadraticAbs(p1, p);
listType.Add(SVGPathElementType.QuadraticCurveTo);
listObject.Add(svgGQuadraticAbs);
}
开发者ID:pjezek,项目名称:UnitySVG,代码行数:7,代码来源:SVGGraphicsPath.cs
示例14: Circle
//-----
public void Circle(SVGPoint p, float r, SVGColor? strokeColor)
{
PreCircle(p, r);
EndSubBuffer(strokeColor);
}
开发者ID:pjezek,项目名称:UnitySVG,代码行数:6,代码来源:SVGGraphicsFill.cs
示例15: AddLineTo
public void AddLineTo(SVGPoint p)
{
listType.Add(SVGPathElementType.LineTo);
listObject.Add(p);
}
开发者ID:pjezek,项目名称:UnitySVG,代码行数:5,代码来源:SVGGraphicsPath.cs
示例16: AddMoveTo
public void AddMoveTo(SVGPoint p)
{
SetFirstPoint(p);
SetLastPoint(p);
listType.Add(SVGPathElementType.MoveTo);
listObject.Add(p);
}
开发者ID:pjezek,项目名称:UnitySVG,代码行数:8,代码来源:SVGGraphicsPath.cs
示例17: Reset
public void Reset()
{
beginPoint = new SVGPoint(0f, 0f);
endPoint = new SVGPoint(0f, 0f);
needSetFirstPoint = true;
boundUL = new SVGPoint(+10000f, +10000f);
boundBR = new SVGPoint(-10000f, -10000f);
_fillRule = SVGFillRule.NoneZero;
transformList.Clear();
listObject.Clear();
listType.Clear();
}
开发者ID:pjezek,项目名称:UnitySVG,代码行数:12,代码来源:SVGGraphicsPath.cs
示例18: Add
public void Add(SVGCircleElement circleElement)
{
SVGPoint p = new SVGPoint(circleElement.cx.value, circleElement.cy.value);
SetFirstPoint(p);
SetLastPoint(p);
listType.Add(SVGPathElementType.Circle);
listObject.Add(circleElement);
}
开发者ID:pjezek,项目名称:UnitySVG,代码行数:9,代码来源:SVGGraphicsPath.cs
示例19: RenderEllipseElement
private void RenderEllipseElement(SVGEllipseElement elem, ISVGPathDraw pathDraw)
{
SVGPoint p = new SVGPoint(elem.cx.value, elem.cy.value).MatrixTransform(matrixTransform);
pathDraw.Ellipse(p, elem.rx.value, elem.ry.value, transformAngle);
}
开发者ID:pjezek,项目名称:UnitySVG,代码行数:5,代码来源:SVGGraphicsPath.cs
示例20: AddArcTo
public void AddArcTo(float r1, float r2, float angle, bool largeArcFlag, bool sweepFlag, SVGPoint p)
{
SetLastPoint(p);
SVGGArcAbs svgGArcAbs = new SVGGArcAbs(r1, r2, angle, largeArcFlag, sweepFlag, p);
listType.Add(SVGPathElementType.ArcTo);
listObject.Add(svgGArcAbs);
}
开发者ID:pjezek,项目名称:UnitySVG,代码行数:7,代码来源:SVGGraphicsPath.cs
注:本文中的SVGPoint类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论