本文整理匯總了C#中Color.ToSD方法的典型用法代碼示例。如果您正苦於以下問題:C# Color.ToSD方法的具體用法?C# Color.ToSD怎麽用?C# Color.ToSD使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Color
的用法示例。
在下文中一共展示了Color.ToSD方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Create
public object Create (RectangleF rectangle, Color startColor, Color endColor, float angle)
{
var brush = new sd2.LinearGradientBrush (rectangle.ToSD (), startColor.ToSD (), endColor.ToSD (), angle, true);
return new BrushObject {
Brush = brush,
InitialMatrix = brush.Transform
};
}
示例2: Create
public object Create (Color color, float thickness)
{
var pen = new sd.Pen (color.ToSD (), thickness);
pen.StartCap = pen.EndCap = PenLineCap.Square.ToSD ();
pen.DashCap = sd2.DashCap.Flat;
pen.MiterLimit = 10f;
return pen;
}
示例3: SetColor
public void SetColor(SolidBrush widget, Color color)
{
((sd.SolidBrush)widget.ControlObject).Color = color.ToSD();
}
示例4: Create
public object Create(Color color)
{
return new sd.SolidBrush(color.ToSD());
}
示例5: SetColor
public void SetColor (Pen widget, Color color)
{
widget.ToSD ().Color = color.ToSD ();
}
示例6: Create
public object Create(Color startColor, Color endColor, PointF startPoint, PointF endPoint)
{
return new BrushObject
{
StartPoint = startPoint,
EndPoint = endPoint,
StartColor = startColor.ToSD(),
EndColor = endColor.ToSD()
};
}