本文整理汇总了C#中BorderType类的典型用法代码示例。如果您正苦于以下问题:C# BorderType类的具体用法?C# BorderType怎么用?C# BorderType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BorderType类属于命名空间,在下文中一共展示了BorderType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HasBorder
/// <summary>
/// Determines whether a particular border exists.
/// </summary>
public bool HasBorder(BorderType type)
{
if (!Enum.IsDefined(typeof(BorderType), type))
throw new InvalidEnumArgumentException("type");
return this.GetBorder(type) != null;
}
示例2: Border
public Border(BorderType left, BorderType right, BorderType top, BorderType bottom)
{
Left = left;
Right = right;
Top = top;
Bottom = bottom;
}
示例3: GetWidth
internal XUnit GetWidth(BorderType type)
{
if (this.borders == null)
return 0;
return borders.GetEffectiveWidth(type);
}
示例4: HasBorder
/// <summary>
/// Determines whether a particular border exists.
/// </summary>
public bool HasBorder(BorderType type)
{
if (!Enum.IsDefined(typeof(BorderType), type))
throw new InvalidEnumArgumentException("type");
return !(this.IsNull(type.ToString()));
}
示例5: HasBorder
/// <summary>
/// Determines whether a particular border exists.
/// </summary>
public bool HasBorder(BorderType type)
{
if (!Enum.IsDefined(typeof(BorderType), type))
throw new /*InvalidEnum*/ArgumentException(DomSR.InvalidEnumValue(type), "type");
return GetBorderReadOnly(type) != null;
}
示例6: SpeechBubbleShape
public SpeechBubbleShape(
Vector2f dimension,
float radius,
float outlineThickness,
Color backgroundColor,
Color outlineColor,
Boolean tipMode = false,
BorderType tipBorderType = DEFAULT_TIP_BORDER_TYPE,
Boolean shadowMode = false,
float shadowOffset = DEFAULT_SHADOW_OFFSET,
float tipPosition = DEFAULT_TIP_POSITION,
float tipSize = DEFAULT_TIP_SIZE)
{
Background = new Shape();
Background.EnableFill(true);
Background.EnableOutline(true);
Tip = new Shape();
Tip.EnableFill(true);
Effect = new Shape();
Effect.EnableFill(true);
Effect.EnableOutline(true);
EffectTip = new Shape();
ShadowEffect = new Shape();
ShadowEffect.EnableFill(true);
ShadowEffect.EnableOutline(true);
ShadowEffectTip = new Shape();
ShadowEffectTip.EnableFill(true);
ShadowEffectTip.EnableOutline(false);
Dimension = dimension;
ShadowMode = shadowMode;
ShadowOffset = new Vector2f(shadowOffset, shadowOffset);
Radius = radius;
OutlineThickness = outlineThickness;
AdjustSize();
TipMode = tipMode;
TipBorderType = tipBorderType;
BackgroundColor = backgroundColor;
BackgroundColor.A = BACKGROUND_COLOR_ALPHA;
OutlineColor = outlineColor;
OutlineColor.A = BACKGROUND_COLOR_ALPHA;
Background.OutlineThickness = OutlineThickness;
Effect.OutlineThickness = OutlineThickness;
ShadowEffect.OutlineThickness = OutlineThickness;
TipPosition = tipPosition;
TipSize = tipSize;
Build();
}
示例7: GetStyle
private BorderStyle GetStyle(BorderType type)
{
BorderStyle style = BorderStyle.Single;
Border border = GetBorder(type);
if (border != null && !border._style.IsNull)
style = border.Style;
else if (!_borders._style.IsNull)
style = _borders.Style;
return style;
}
示例8: Window
public Window(WindowManager _WM,State _parentState, int _X,int _Y, int _SizeX, int _SizeY,string _Title,BorderType Btype)
: base(_X,_Y,_SizeX,_SizeY,_WM)
{
bordType = Btype;
ParentState = _parentState;
Widgets = new List<Widget>();
GenerateBorder();
Title = new Text(_Title, WM.font);
SetSize(_SizeX, _SizeY);
SetPosition(_X, _Y);
}
示例9: TopBorder
public static BorderCharacter TopBorder(BorderType borderType, Point location)
{
switch (borderType)
{
case BorderType.SingleLine:
return new BorderCharacter(BorderInfo.SingleTop, location);
case BorderType.DoubleLine:
return new BorderCharacter(BorderInfo.DoubleTop, location);
default:
throw new ArgumentOutOfRangeException("borderType");
}
}
示例10: CopyMakeBorder
/// <summary>
/// Forms a border around the image
/// </summary>
/// <param name="src">The source image</param>
/// <param name="dst">The destination image; will have the same type as src and
/// the size Size(src.cols+left+right, src.rows+top+bottom)</param>
/// <param name="top">Specify how much pixels in each direction from the source image rectangle one needs to extrapolate</param>
/// <param name="bottom">Specify how much pixels in each direction from the source image rectangle one needs to extrapolate</param>
/// <param name="left">Specify how much pixels in each direction from the source image rectangle one needs to extrapolate</param>
/// <param name="right">Specify how much pixels in each direction from the source image rectangle one needs to extrapolate</param>
/// <param name="borderType">The border type</param>
/// <param name="value">The border value if borderType == Constant</param>
public static void CopyMakeBorder(InputArray src, OutputArray dst, int top, int bottom, int left, int right, BorderType borderType, Scalar? value = null)
{
if (src == null)
throw new ArgumentNullException("src");
if (dst == null)
throw new ArgumentNullException("dst");
src.ThrowIfDisposed();
dst.ThrowIfNotReady();
Scalar value0 = value.GetValueOrDefault(new Scalar());
NativeMethods.imgproc_copyMakeBorder(src.CvPtr, dst.CvPtr, top, bottom, left, right, (int)borderType, value0);
dst.Fix();
}
示例11: GetStyle
private BorderStyle GetStyle(BorderType type)
{
BorderStyle style = BorderStyle.Single;
Border border = GetBorder(type);
if (border != null && !border.IsNull("Style"))
style = border.Style;
else if (!this.borders.IsNull("Style"))
style = this.borders.Style;
return style;
}
示例12: Cell
public Cell()
{
this.m_anchor = AnchorStyles.Left | AnchorStyles.Top;
this.m_bVisible = true;
this.m_sName = "";
this.Changed = null;
this.m_anchor = AnchorStyles.Left | AnchorStyles.Top;
this.m_BackColor = Resco.Controls.AdvancedList.AdvancedList.TransparentColor;
this.m_ForeColor = Resco.Controls.AdvancedList.AdvancedList.TransparentColor;
this.m_Bounds = new Rectangle(-1, -1, -1, -1);
this.m_cellSource = new Resco.Controls.AdvancedList.CellSource();
this.m_cellSource.Parent = this;
this.m_Border = BorderType.None;
this.m_IsAutoHeight = false;
this.m_CustomizeCell = false;
this.m_scale = new SizeF(1f, 1f);
}
示例13: GetColor
private XColor GetColor(BorderType type)
{
Color clr = Colors.Black;
Border border = GetBorder(type);
if (border != null && !border.Color.IsEmpty)
clr = border.Color;
else if (!_borders.Color.IsEmpty)
clr = _borders.Color;
#if noCMYK
return XColor.FromArgb((int)clr.Argb);
#else
// bool cmyk = false; // BUG CMYK
// if (_borders.Document != null)
// cmyk = _borders.Document.UseCmykColor;
//#if DEBUG
// else
// GetT ype();
//#endif
return ColorHelper.ToXColor(clr, _borders.Document.UseCmykColor);
#endif
}
示例14: GetWidth
internal XUnit GetWidth(BorderType type)
{
if (this.borders == null)
return 0;
Border border = GetBorder(type);
if (border != null)
{
if (!border.IsNull("Visible") && !border.Visible)
return 0;
if (border != null && !border.IsNull("Width"))
return border.Width.Point;
if (!border.IsNull("Color") || !border.IsNull("Style") || border.Visible)
{
if (!this.borders.IsNull("Width"))
return this.borders.Width.Point;
return 0.5;
}
}
else if (!(type == BorderType.DiagonalDown || type == BorderType.DiagonalUp))
{
if (!this.borders.IsNull("Visible") && !this.borders.Visible)
return 0;
if (!this.borders.IsNull("Width"))
return this.borders.Width.Point;
if (!this.borders.IsNull("Color") || !this.borders.IsNull("Style") || this.borders.Visible)
return 0.5;
}
return 0;
}
示例15: GetBorderReadOnly
internal Border GetBorderReadOnly(BorderType type)
{
switch (type)
{
case BorderType.Bottom:
return _bottom;
case BorderType.DiagonalDown:
return _diagonalDown;
case BorderType.DiagonalUp:
return _diagonalUp;
case BorderType.Horizontal:
case BorderType.Vertical:
return (Border)GetValue(type.ToString(), GV.GetNull);
case BorderType.Left:
return _left;
case BorderType.Right:
return _right;
case BorderType.Top:
return _top;
}
if (!Enum.IsDefined(typeof(BorderType), type))
throw new /*InvalidEnum*/ArgumentException(DomSR.InvalidEnumValue(type), "type");
return null;
}