本文整理汇总了C#中SVGColor类的典型用法代码示例。如果您正苦于以下问题:C# SVGColor类的具体用法?C# SVGColor怎么用?C# SVGColor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SVGColor类属于命名空间,在下文中一共展示了SVGColor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Circle
//-----
public void Circle(Vector2 p, float r, SVGColor? strokeColor)
{
if(strokeColor != null) {
SetColor(strokeColor.Value.color);
}
Circle(p, r);
}
示例2: GetColor
protected Color GetColor(SVGColor svgColor)
{
if(svgColor.color.a != 1)
{
_alphaBlended = true;
}
return svgColor.color;
}
示例3: SVGStopElement
public SVGStopElement(Dictionary<string, string> attrList)
{
_stopColor = new SVGColor(attrList.GetValue("stop-color"));
string temp = attrList.GetValue("offset").Trim();
if(temp != "") {
if(temp.EndsWith("%"))
_offset = float.Parse(temp.TrimEnd(new[] { '%' }), System.Globalization.CultureInfo.InvariantCulture);
else
_offset = float.Parse(temp, System.Globalization.CultureInfo.InvariantCulture) * 100;
}
}
示例4: SVGStopElement
/***************************************************************************/
public SVGStopElement(AttributeList attrList)
{
_stopColor = new SVGColor(attrList.GetValue("stop-color"));
string temp = attrList.GetValue("offset").Trim();
if(temp != "") {
if(temp.EndsWith("%")) {
_offset = SVGNumber.ParseToFloat(temp.TrimEnd(new char[1]{'%'}));
} else {
_offset = SVGNumber.ParseToFloat(temp)* 100;
}
}
}
示例5: SVGStopElement
/***************************************************************************/
public SVGStopElement(AttributeList attrList)
{
_stopColor = new SVGColor(attrList.GetValue("stop-color"));
string temp = attrList.GetValue("offset").Trim();
if(temp != "") {
if(temp.EndsWith("%")) {
_offset = float.Parse(temp.TrimEnd(new char[1] { '%' }), System.Globalization.CultureInfo.InvariantCulture);
} else {
_offset = float.Parse(temp, System.Globalization.CultureInfo.InvariantCulture)* 100;
}
}
}
示例6: FillPolygon
//-----
public void FillPolygon(Vector2[] points, SVGColor fillColor, SVGColor? strokeColor)
{
this._graphicsFill.Polygon(points, fillColor, strokeColor);
}
示例7: FillPath
//-----
//Fill khong co Stroke, va ve stroke sau
public void FillPath(SVGColor fillColor, SVGColor? strokePathColor,
float width,
SVGGraphicsPath graphicsPath)
{
this._graphicsFill.FillPath(fillColor, strokePathColor, graphicsPath);
if((int)width == 1)this._graphicsFill.FillPath(fillColor, strokePathColor, graphicsPath);
else this._graphicsFill.FillPath(fillColor, graphicsPath);
if(strokePathColor == null)return;
SetColor(strokePathColor.Value.color);
}
示例8: Circle
public void Circle(Vector2 p, float r, SVGColor fillColor, SVGColor? strokeColor)
{
SetColor(fillColor.color);
PreCircle(p, r);
EndSubBuffer();
}
示例9: Polygon
//-----
public void Polygon(Vector2[] points, SVGColor? strokeColor, float width)
{
if(strokeColor != null) {
SetColor(strokeColor.Value.color);
}
Polygon(points, width);
}
示例10: FillRoundedRect
//-----
public void FillRoundedRect(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4,
Vector2 p5, Vector2 p6, Vector2 p7, Vector2 p8,
float r1, float r2, float angle,
SVGColor fillColor, SVGColor? strokeColor, float width)
{
if((int)width == 1) {
FillRoundedRect(p1, p2, p3, p4, p5, p6, p7, p8, r1, r2, angle, strokeColor);
return;
}
SetColor(fillColor.color);
this._graphicsFill.RoundedRect(p1, p2, p3, p4, p5, p6, p7, p8, r1, r2, angle);
if(strokeColor == null)return;
SetColor(strokeColor.Value.color);
RoundedRect(p1, p2, p3, p4, p5, p6, p7, p8, r1, r2, angle, strokeColor);
}
示例11: FillRect
//-----
public void FillRect(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4,
SVGColor fillColor, SVGColor? strokeColor, float width)
{
if((int)width == 1) {
FillRect(p1, p2, p3, p4, fillColor, strokeColor);
return;
}
SetColor(fillColor.color);
FillRect(p1, p2, p3, p4);
if(strokeColor == null)return;
SetColor(strokeColor.Value.color);
Rect(p1, p2, p3, p4, strokeColor, width);
}
示例12: FillEllipse
//-----
public void FillEllipse(Vector2 p, float rx, float ry, float angle,
SVGColor fillColor, SVGColor? strokeColor)
{
this._graphicsFill.Ellipse(p, rx, ry, angle, fillColor, strokeColor);
}
示例13: FillCircle
//-----
public void FillCircle(Vector2 p, float r,
SVGColor fillColor, SVGColor? strokeColor, float width)
{
if((int)width == 1) {
FillCircle(p, r, strokeColor);
return;
}
SetColor(fillColor.color);
FillCircle(p, r);
if(strokeColor == null)return;
SetColor(strokeColor.Value.color);
Circle(p, r, strokeColor, width);
}
示例14: Ellipse
//-----
public void Ellipse(Vector2 p, float rx, float ry, float angle,
SVGColor? strokeColor, float width)
{
if(strokeColor != null) {
SetColor(strokeColor.Value.color);
}
Ellipse(p, rx, ry, angle, width);
}
示例15: DrawPath
//-----
//Fill khong co Stroke, va ve stroke sau
public void DrawPath(SVGGraphicsPath graphicsPath, float width, SVGColor? strokePathColor)
{
if(strokePathColor == null)return;
SetColor(strokePathColor.Value.color);
this._graphicsStroke.DrawPath(graphicsPath, width);
}