本文整理汇总了C#中Pen.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# Pen.GetType方法的具体用法?C# Pen.GetType怎么用?C# Pen.GetType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pen
的用法示例。
在下文中一共展示了Pen.GetType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: equals
internal bool equals(Pen obj)
{
if (obj == null)
return false;
if (obj.GetType() != typeof(Pen))
return false;
Pen pen = obj as Pen;
// Brushes
if (this._brush == null)
{
if (pen._brush != null)
return false;
}
else
{
if (!this._brush.equals(pen._brush))
return false;
}
// Colors
if (this._color.ToArgb() != pen._color.ToArgb())
return false;
// Compound array
if (this._compoundArray != null && pen._compoundArray == null ||
this._compoundArray == null && pen._compoundArray != null)
return false;
if (this._compoundArray != null)
{
if (this._compoundArray.Length != pen._compoundArray.Length)
return false;
for (int i = 0; i < this._compoundArray.Length; i++)
if (this._compoundArray[i] != pen._compoundArray[i])
return false;
}
// Dash offset
if (this._dashOffset != pen._dashOffset)
return false;
// Dash patterns
if (this._dashPattern != null && pen._dashPattern == null ||
this._dashPattern == null && pen._dashPattern != null)
return false;
if (this._dashPattern != null)
{
if (this._dashPattern.Length != pen._dashPattern.Length)
return false;
for (int i = 0; i < this._dashPattern.Length; i++)
if (this._dashPattern[i] != pen._dashPattern[i])
return false;
}
// Dash style
if (this._dashStyle != pen._dashStyle)
return false;
// Line join
if (this._lineJoin != pen._lineJoin)
return false;
// Miter limit
if (this._miterLimit != pen._miterLimit)
return false;
// Pen width
if (this._width != pen._width)
return false;
return true;
}