本文整理汇总了C#中BorderType类的典型用法代码示例。如果您正苦于以下问题:C# BorderType类的具体用法?C# BorderType怎么用?C# BorderType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BorderType类属于命名空间,在下文中一共展示了BorderType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:GorelH,项目名称:PdfSharp,代码行数:10,代码来源:Borders.cs
示例2: Border
public Border(BorderType left, BorderType right, BorderType top, BorderType bottom)
{
Left = left;
Right = right;
Top = top;
Bottom = bottom;
}
开发者ID:bfriesen,项目名称:BadSnowstorm,代码行数:7,代码来源:Border.cs
示例3: GetWidth
internal XUnit GetWidth(BorderType type)
{
if (this.borders == null)
return 0;
return borders.GetEffectiveWidth(type);
}
开发者ID:GorelH,项目名称:PdfSharp,代码行数:7,代码来源:BordersRenderer.cs
示例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()));
}
开发者ID:vronikp,项目名称:EventRegistration,代码行数:10,代码来源:Borders.cs
示例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;
}
开发者ID:Sl0vi,项目名称:MigraDoc,代码行数:10,代码来源:Borders.cs
示例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();
}
开发者ID:jpx,项目名称:blazera,代码行数:58,代码来源:SpeechBubbleShape.cs
示例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;
}
开发者ID:Sl0vi,项目名称:MigraDoc,代码行数:11,代码来源:BordersRenderer.cs
示例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);
}
开发者ID:Tricon2-Elf,项目名称:SpaceHybridTest,代码行数:11,代码来源:Window.cs
示例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");
}
}
开发者ID:bfriesen,项目名称:BadSnowstorm,代码行数:12,代码来源:BorderCharacter.cs
示例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();
}
开发者ID:josephgodwinkimani,项目名称:opencvsharp,代码行数:24,代码来源:Cv2_imgproc.cs
示例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;
}
开发者ID:vronikp,项目名称:EventRegistration,代码行数:12,代码来源:BordersRenderer.cs
示例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);
}
开发者ID:north0808,项目名称:haina,代码行数:17,代码来源:Cell.cs
示例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
}
开发者ID:Sl0vi,项目名称:MigraDoc,代码行数:23,代码来源:BordersRenderer.cs
示例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;
}
开发者ID:dankennedy,项目名称:MigraDoc,代码行数:36,代码来源:BordersRenderer.cs
示例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;
}
开发者ID:Sl0vi,项目名称:MigraDoc,代码行数:24,代码来源:Borders.cs
示例16: CreateBorderRenderer
BorderRenderer CreateBorderRenderer(Border border, BorderType borderType)
{
BorderRenderer brdrRndrr = new BorderRenderer(border, this.docRenderer);
brdrRndrr.ParentCell = this.parentCell;
brdrRndrr.ParentFormat = this.parentFormat;
brdrRndrr.BorderType = borderType;
return brdrRndrr;
}
开发者ID:GorelH,项目名称:PdfSharp,代码行数:8,代码来源:BordersRenderer.cs
示例17: PyrUp
/// <summary>
/// Upsamples an image and then blurs it.
/// </summary>
/// <param name="dstSize">size of the output image; by default, it is computed as Size(src.cols*2, (src.rows*2)</param>
/// <param name="borderType"></param>
/// <returns></returns>
public Mat PyrUp(Size? dstSize = null, BorderType borderType = BorderType.Default)
{
var dst = new Mat();
Cv2.PyrUp(this, dst, dstSize, borderType);
return dst;
}
开发者ID:MJunak,项目名称:opencvsharp,代码行数:12,代码来源:Mat_CvMethods.cs
示例18: Remap
/// <summary>
/// Applies a generic geometrical transformation to an image.
/// </summary>
/// <param name="map1">The first map of either (x,y) points or just x values having the type CV_16SC2, CV_32FC1, or CV_32FC2.</param>
/// <param name="map2">The second map of y values having the type CV_16UC1, CV_32FC1, or none (empty map if map1 is (x,y) points), respectively.</param>
/// <param name="interpolation">Interpolation method. The method INTER_AREA is not supported by this function.</param>
/// <param name="borderMode">Pixel extrapolation method. When borderMode=BORDER_TRANSPARENT,
/// it means that the pixels in the destination image that corresponds to the "outliers" in
/// the source image are not modified by the function.</param>
/// <param name="borderValue">Value used in case of a constant border. By default, it is 0.</param>
/// <returns>Destination image. It has the same size as map1 and the same type as src</returns>
public Mat Remap(InputArray map1, InputArray map2, Interpolation interpolation = Interpolation.Linear,
BorderType borderMode = BorderType.Constant, CvScalar? borderValue = null)
{
var dst = new Mat();
Cv2.Remap(this, dst, map1, map2, interpolation, borderMode, borderValue);
return dst;
}
开发者ID:MJunak,项目名称:opencvsharp,代码行数:18,代码来源:Mat_CvMethods.cs
示例19: WarpPerspective
/// <summary>
/// Applies a perspective transformation to an image.
/// </summary>
/// <param name="m">3x3 transformation matrix.</param>
/// <param name="dsize">size of the output image.</param>
/// <param name="flags">combination of interpolation methods (INTER_LINEAR or INTER_NEAREST)
/// and the optional flag WARP_INVERSE_MAP, that sets M as the inverse transformation (dst -> src).</param>
/// <param name="borderMode">pixel extrapolation method (BORDER_CONSTANT or BORDER_REPLICATE).</param>
/// <param name="borderValue">value used in case of a constant border; by default, it equals 0.</param>
/// <returns>output image that has the size dsize and the same type as src.</returns>
public Mat WarpPerspective(Mat m, Size dsize, Interpolation flags = Interpolation.Linear,
BorderType borderMode = BorderType.Constant, Scalar? borderValue = null)
{
var dst = new Mat();
Cv2.WarpPerspective(this, dst, m, dsize, flags, borderMode, borderValue);
return dst;
}
开发者ID:MJunak,项目名称:opencvsharp,代码行数:17,代码来源:Mat_CvMethods.cs
示例20: MorphologyEx
/// <summary>
/// 高度なモルフォロジー変換を行います.
/// </summary>
/// <param name="op">モルフォロジー演算の種類</param>
/// <param name="element">構造要素</param>
/// <param name="anchor">構造要素内のアンカー位置.デフォルト値の (-1, -1) は,アンカーが構造要素の中心にあることを意味します.</param>
/// <param name="iterations">収縮と膨張が適用される回数. [既定値は1]</param>
/// <param name="borderType">ピクセル外挿手法. [既定値はBorderType.Constant]</param>
/// <param name="borderValue">定数境界モードで利用されるピクセル値.デフォルト値は特別な意味を持ちます. [既定値は CvCpp.MorphologyDefaultBorderValue()]</param>
/// <returns>src と同じサイズ,同じ型の出力画像</returns>
#else
/// <summary>
/// Performs advanced morphological transformations
/// </summary>
/// <param name="op">Type of morphological operation</param>
/// <param name="element">Structuring element</param>
/// <param name="anchor">Position of the anchor within the element. The default value (-1, -1) means that the anchor is at the element center</param>
/// <param name="iterations">Number of times erosion and dilation are applied. [By default this is 1]</param>
/// <param name="borderType">The pixel extrapolation method. [By default this is BorderType.Constant]</param>
/// <param name="borderValue">The border value in case of a constant border. The default value has a special meaning. [By default this is CvCpp.MorphologyDefaultBorderValue()]</param>
/// <returns>Destination image. It will have the same size and the same type as src</returns>
#endif
public Mat MorphologyEx(MorphologyOperation op, InputArray element,
CvPoint? anchor = null, int iterations = 1, BorderType borderType = BorderType.Constant,
CvScalar? borderValue = null)
{
var dst = new Mat();
Cv2.MorphologyEx(this, dst, op, element, anchor, iterations, borderType, borderValue);
return dst;
}
开发者ID:MJunak,项目名称:opencvsharp,代码行数:30,代码来源:Mat_CvMethods.cs
注:本文中的BorderType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论