本文整理汇总了C#中LineCap类的典型用法代码示例。如果您正苦于以下问题:C# LineCap类的具体用法?C# LineCap怎么用?C# LineCap使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LineCap类属于命名空间,在下文中一共展示了LineCap类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Configure
private void Configure()
{
_joinType = LineJoinType.Round;
_startCap = LineCap.Round;
_endCap = LineCap.Round;
_decorations = new CopyList<ILineDecoration>();
}
开发者ID:joelmuzz,项目名称:DotSpatial,代码行数:7,代码来源:CartographicStroke.cs
示例2: SetLineCap
// Set/get line caps: start, end, and dash
// Line cap and join APIs by using LineCap and LineJoin enums.
public GpStatus SetLineCap(LineCap startCap,
LineCap endCap,
DashCap dashCap)
{
return SetStatus(NativeMethods.GdipSetPenLineCap197819(nativePen,
startCap, endCap, dashCap));
}
开发者ID:intille,项目名称:mitessoftware,代码行数:11,代码来源:PenPlus.cs
示例3: PenDialog
public PenDialog(int p, LineCap lineCap)
{
InitializeComponent();
penSizeNumericUpDown.Value = p;
//switch (lineCap)
//{
// case LineCap.AnchorMask:
// {
// penStyleNumericUpDown.Value = 1;
// }
// break;
// case LineCap.ArrowAnchor:
// {
// penStyleNumericUpDown.Value = 2;
// }
// break;
// case LineCap.Custom:
// {
// penStyleNumericUpDown.Value = 3;
// }
// break;
// case LineCap.DiamondAnchor:
// {
// penStyleNumericUpDown.Value = 4;
// }
// break;
// case LineCap.Flat:
// {
// penStyleNumericUpDown.Value = 5;
// }
// break;
// case LineCap.NoAnchor:
// {
// penStyleNumericUpDown.Value = 6;
// }
// break;
// case LineCap.Round:
// {
// penStyleNumericUpDown.Value = 7;
// }
// break;
// case LineCap.Square:
// {
// penStyleNumericUpDown.Value = 8;
// }
// break;
// case LineCap.SquareAnchor:
// {
// penStyleNumericUpDown.Value = 9;
// }
// break;
// case LineCap.Triangle:
// {
// penStyleNumericUpDown.Value = 10;
// }
// break;
//}
}
开发者ID:xs2ranjeet,项目名称:13ns9-1spr,代码行数:60,代码来源:PenDialog.cs
示例4: LineFunction
public LineFunction ()
{
Width = 1;
Color = "#FFFFFF";
Opacity = 1.0m;
LineCap = LineCap.Butt;
}
开发者ID:gdoubleultd,项目名称:Blitline.Net,代码行数:7,代码来源:LineFunction.cs
示例5: _SetBaseCap
private void _SetBaseCap(LineCap baseCap)
{
int status = SafeNativeMethods.Gdip.GdipSetCustomLineCapBaseCap(new HandleRef(this, (IntPtr) this.nativeCap), baseCap);
if (status != 0)
{
throw SafeNativeMethods.Gdip.StatusException(status);
}
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:8,代码来源:CustomLineCap.cs
示例6: CustomLineCap
public CustomLineCap(GraphicsPath fillPath,
GraphicsPath strokePath,
LineCap baseCap, float baseInset)
{
this.fillPath = fillPath;
this.strokePath = strokePath;
this.baseCap = baseCap;
this.baseInset = baseInset;
}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:9,代码来源:CustomLineCap.cs
示例7: CustomLineCap
public CustomLineCap(GraphicsPath fillPath, GraphicsPath strokePath, LineCap baseCap, float baseInset)
{
IntPtr zero = IntPtr.Zero;
int status = SafeNativeMethods.Gdip.GdipCreateCustomLineCap(new HandleRef(fillPath, (fillPath == null) ? IntPtr.Zero : fillPath.nativePath), new HandleRef(strokePath, (strokePath == null) ? IntPtr.Zero : strokePath.nativePath), baseCap, baseInset, out zero);
if (status != 0)
{
throw SafeNativeMethods.Gdip.StatusException(status);
}
this.SetNativeLineCap(zero);
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:10,代码来源:CustomLineCap.cs
示例8: f_AddPix
/// <summary>
/// 在原有波形上添加一条线
/// 不可动态循环
/// </summary>
/// <param name="listX">X轴</param>
/// <param name="listY">Y轴</param>
/// <param name="listColor">线条颜色</param>
/// <param name="listWidth">线条宽度</param>
/// <param name="listLineJoin">线条连接点</param>
/// <param name="listLineCap">线条起始线帽</param>
/// <param name="listDrawStyle">线条样式</param>
public void f_AddPix(ref List<float> listX, ref List<float> listY, Color listColor, int listWidth, LineJoin listLineJoin, LineCap listLineCap, DrawStyle listDrawStyle)
{
//装载
_listX.Add(listX);
_listY.Add(listY);
_listColor.Add(listColor);
_listWidth.Add(listWidth);
_listLineJoin.Add(listLineJoin);
_listLineCap.Add(listLineCap);
_listDrawStyle.Add(listDrawStyle);
}
开发者ID:mxinshangshang,项目名称:CSharp_ZGraph,代码行数:22,代码来源:ZGraph_FuncPublic.cs
示例9: CustomLineCap
public CustomLineCap(GraphicsPath fillPath, GraphicsPath strokePath, LineCap baseCap, float baseInset)
{
IntPtr fill = IntPtr.Zero;
IntPtr stroke = IntPtr.Zero;
if (fillPath != null)
fill = fillPath.nativePath;
if (strokePath != null)
stroke = strokePath.nativePath;
Status status = GDIPlus.GdipCreateCustomLineCap (fill, stroke, baseCap, baseInset, out nativeObject);
GDIPlus.CheckStatus (status);
}
开发者ID:nlhepler,项目名称:mono,代码行数:13,代码来源:CustomLineCap.cs
示例10: f_LoadOnePix
/// <summary>
/// 清空原有数据并加载一条波形数据
/// </summary>
/// <param name="listX">X轴</param>
/// <param name="listY">Y轴</param>
/// <param name="listColor">线条颜色</param>
/// <param name="listWidth">线条宽度</param>
/// <param name="listLineJoin">线条连接点</param>
/// <param name="listLineCap">线条起始线帽</param>
/// <param name="listDrawStyle">线条样式</param>
public void f_LoadOnePix(ref List<float> listX, ref List<float> listY, Color listColor, int listWidth, LineJoin listLineJoin, LineCap listLineCap,DrawStyle listDrawStyle)
{
//重新初始化
f_ClearAllPix();
//装载
_listX.Add(listX);
_listY.Add(listY);
_listColor.Add(listColor);
_listWidth.Add(listWidth);
_listLineJoin.Add(listLineJoin);
_listLineCap.Add(listLineCap);
_listDrawStyle.Add(listDrawStyle);
}
开发者ID:mxinshangshang,项目名称:CSharp_ZGraph,代码行数:23,代码来源:ZGraph_FuncPublic.cs
示例11: BaseLine
public BaseLine(Color color, DashStyle dashStyle,float thickness, LineCap startLineCap, LineCap endLineCap, DashCap dashLineCap)
{
if (color == Color.White) {
this.color = Color.Black;
}
this.color = color;
this.dashStyle = dashStyle;
this.thickness = thickness;
this.startLineCap = startLineCap;
this.endLineCap = endLineCap;
this.dashLineCap = dashLineCap;
}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:13,代码来源:BaseLine.cs
示例12: Pen
public Pen (Brush brush, float width)
{
_brush = (Brush)brush.Clone();;
_width = width;
_dashStyle = DashStyle.Solid;
_startCap = LineCap.Flat;
_dashCap = DashCap.Flat;
_endCap = LineCap.Flat;
_alignment = PenAlignment.Center;
_lineJoin = LineJoin.Miter;
_miterLimit = 10f;
_transform = new Matrix();
}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:13,代码来源:Pen.jvm.cs
示例13: MapCapStyle
// Map the cap style from "System.Drawing" to "Xsharp".
private static CapStyle MapCapStyle(LineCap style)
{
switch(style)
{
case LineCap.Square:
return CapStyle.CapProjecting;
case LineCap.Flat:
return CapStyle.CapButt;
case LineCap.Round:
default:
return CapStyle.CapRound;
}
}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:14,代码来源:DrawingPen.cs
示例14: StrokeMath
public StrokeMath()
{
m_width = 0.5;
m_width_abs = 0.5;
m_width_eps = 0.5 / 1024.0;
m_width_sign = 1;
m_miter_limit = 4.0;
m_inner_miter_limit = 1.01;
m_approx_scale = 1.0;
m_line_cap = LineCap.Butt;
m_line_join = LineJoin.Miter;
m_inner_join = InnerJoin.Miter;
}
开发者ID:prepare,项目名称:HTML-Renderer,代码行数:13,代码来源:StrokeMath.cs
示例15: Stroke
// Methods
public Stroke()
{
this.pen = Pens.Black;
this.brush = new SolidColor(Color.Empty);
this.strokeColor = Color.Empty;
this.Width = 1f;
this.Linecap = LineCap.Square;
this.Linejoin = LineJoin.Miter;
this.MiterLimit = 4;
this.DashArray = null;
this.DashOffset = 0f;
this.Opacity = 1f;
}
开发者ID:EdgarEDT,项目名称:myitoppsp,代码行数:14,代码来源:Stroke.cs
示例16: CustomLineCap
public CustomLineCap(
GraphicsPath fillPath,
GraphicsPath strokePath,
LineCap baseCap,
float baseInset
)
{
nativeCap = new GpCustomLineCap();
GpPath nativeFillPath = null;
GpPath nativeStrokePath = null;
if (fillPath != null)
nativeFillPath = fillPath.nativePath;
if (strokePath != null)
nativeStrokePath = strokePath.nativePath;
lastResult = NativeMethods.GdipCreateCustomLineCap(
nativeFillPath, nativeStrokePath,
baseCap, baseInset, out nativeCap);
}
开发者ID:intille,项目名称:mitessoftware,代码行数:20,代码来源:CustomLineCap.cs
示例17: Create
/// <summary>
/// Creates a new <see cref="ShapeStyle"/> instance.
/// </summary>
/// <param name="name">The shape style name.</param>
/// <param name="sa">The stroke color alpha channel.</param>
/// <param name="sr">The stroke color red channel.</param>
/// <param name="sg">The stroke color green channel.</param>
/// <param name="sb">The stroke color blue channel.</param>
/// <param name="fa">The fill color alpha channel.</param>
/// <param name="fr">The fill color red channel.</param>
/// <param name="fg">The fill color green channel.</param>
/// <param name="fb">The fill color blue channel.</param>
/// <param name="thickness">The stroke thickness.</param>
/// <param name="textStyle">The text style.</param>
/// <param name="lineStyle">The line style.</param>
/// <param name="startArrowStyle">The start arrow style.</param>
/// <param name="endArrowStyle">The end arrow style.</param>
/// <param name="lineCap">The line cap.</param>
/// <param name="dashes">The line dashes.</param>
/// <param name="dashOffset">The line dash offset.</param>
/// <returns>The new instance of the <see cref="ShapeStyle"/> class.</returns>
public static ShapeStyle Create(string name = "", byte sa = 0xFF, byte sr = 0x00, byte sg = 0x00, byte sb = 0x00, byte fa = 0xFF, byte fr = 0x00, byte fg = 0x00, byte fb = 0x00, double thickness = 2.0, TextStyle textStyle = null, LineStyle lineStyle = null, ArrowStyle startArrowStyle = null, ArrowStyle endArrowStyle = null, LineCap lineCap = LineCap.Round, string dashes = default(string), double dashOffset = 0.0)
{
var style = new ShapeStyle()
{
Name = name,
Stroke = ArgbColor.Create(sa, sr, sg, sb),
Fill = ArgbColor.Create(fa, fr, fg, fb),
Thickness = thickness,
LineCap = lineCap,
Dashes = dashes,
DashOffset = dashOffset,
LineStyle = lineStyle ?? LineStyle.Create("Line"),
TextStyle = textStyle ?? TextStyle.Create("Text")
};
style.StartArrowStyle = startArrowStyle ?? ArrowStyle.Create("Start", style);
style.EndArrowStyle = endArrowStyle ?? ArrowStyle.Create("End", style);
return style;
}
开发者ID:Core2D,项目名称:Core2D,代码行数:41,代码来源:ShapeStyle.cs
示例18: LineSymbolizer
/// <summary>
/// Creates a new set of cartographic lines that together form a line with a border. Since a compound
/// pen is used, it is possible to use this to create a transparent line with just two border parts.
/// </summary>
/// <param name="fillColor">The fill color for the line</param>
/// <param name="borderColor">The border color of the line</param>
/// <param name="width">The width of the entire line</param>
/// <param name="dash">The dash pattern to use</param>
/// <param name="caps">The style of the start and end caps</param>
public LineSymbolizer(Color fillColor, Color borderColor, double width, DashStyle dash, LineCap caps)
{
_strokes = new CopyList<IStroke>();
ICartographicStroke bs = new CartographicStroke(borderColor);
bs.Width = width;
bs.StartCap = caps;
bs.EndCap = caps;
bs.DashStyle = dash;
bs.CompoundArray = new[]{0F, 0.2F, 0.8F, 1F};
_strokes.Add(bs);
ICartographicStroke cs = new CartographicStroke(fillColor);
cs.Width = width;
cs.StartCap = caps;
cs.EndCap = caps;
cs.DashStyle = dash;
cs.Width = width - 2;
cs.CompoundArray = new[]{.2F, .8F};
_strokes.Add(cs);
}
开发者ID:zhongshuiyuan,项目名称:mapwindowsix,代码行数:29,代码来源:LineSymbolizer.cs
示例19: LineSymbolizer
/// <summary>
/// Creates a new set of cartographic lines that together form a line with a border. Since a compound
/// pen is used, it is possible to use this to create a transparent line with just two border parts.
/// </summary>
/// <param name="fillColor">The fill color for the line</param>
/// <param name="borderColor">The border color of the line</param>
/// <param name="width">The width of the entire line</param>
/// <param name="dash">The dash pattern to use</param>
/// <param name="startCap">The style of the start cap</param>
/// <param name="endCap">The style of the end cap</param>
public LineSymbolizer(Color fillColor, Color borderColor, double width, DashStyle dash, LineCap startCap, LineCap endCap)
{
_strokes = new CopyList<IStroke>();
ICartographicStroke bs = new CartographicStroke(borderColor)
{
Width = width,
StartCap = startCap,
EndCap = endCap,
DashStyle = dash,
};
_strokes.Add(bs);
ICartographicStroke cs = new CartographicStroke(fillColor)
{
StartCap = startCap,
EndCap = endCap,
DashStyle = dash,
Width = width - 2,
};
_strokes.Add(cs);
}
开发者ID:joelmuzz,项目名称:DotSpatial,代码行数:31,代码来源:LineSymbolizer.cs
示例20: GdipCreateCustomLineCap
public static extern GpStatus GdipCreateCustomLineCap(GpPath fillPath, GpPath strokePath,
LineCap baseCap, float baseInset, out GpCustomLineCap customCap);
开发者ID:misiek,项目名称:foo,代码行数:2,代码来源:Others.cs
注:本文中的LineCap类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论