本文整理汇总了C#中Pad.DrawLine方法的典型用法代码示例。如果您正苦于以下问题:C# Pad.DrawLine方法的具体用法?C# Pad.DrawLine怎么用?C# Pad.DrawLine使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pad
的用法示例。
在下文中一共展示了Pad.DrawLine方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Paint
public virtual void Paint(Pad pad, double xMin, double xMax, double yMin, double yMax)
{
var pen = new Pen(LineColor);
var brush = this.fFillBrush ?? new SolidBrush(FillColor);
for (var i = 0; i < this.fNBins; ++i)
{
pad.Graphics.FillRectangle(brush, pad.ClientX(GetBinMin(i)), pad.ClientY(this.fBins[i]), Math.Abs(pad.ClientX(GetBinMax(i)) - pad.ClientX(GetBinMin(i))), Math.Abs(pad.ClientY(this.fBins[i]) - pad.ClientY(0.0)));
pad.DrawLine(pen, GetBinMin(i), 0.0, GetBinMin(i), this.fBins[i]);
pad.DrawLine(pen, GetBinMin(i), this.fBins[i], GetBinMax(i), this.fBins[i]);
pad.DrawLine(pen, GetBinMax(i), this.fBins[i], GetBinMax(i), 0.0);
}
}
示例2: Paint
public virtual void Paint(Pad pad, double xMin, double xMax, double yMin, double yMax)
{
pad.DrawLine(new Pen(Color) { Width = Width, DashStyle = DashStyle }, X1, Y1, X2, Y2);
}
示例3: Paint
public virtual void Paint(Pad pad, double xMin, double xMax, double yMin, double yMax)
{
if (Style == EGraphStyle.Line && LineEnabled)
{
Pen Pen = new Pen(LineColor);
Pen.DashStyle = LineDashStyle;
double X1 = 0.0;
double Y1 = 0.0;
bool flag = true;
foreach (TMarker tmarker in Points)
{
if (!flag)
pad.DrawLine(Pen, X1, Y1, tmarker.X, tmarker.Y);
else
flag = false;
X1 = tmarker.X;
Y1 = tmarker.Y;
}
}
if ((Style == EGraphStyle.Line || Style == EGraphStyle.Scatter) && MarkerEnabled)
{
foreach (TMarker tmarker in Points)
tmarker.Paint(pad, xMin, xMax, yMin, yMax);
}
if (Style != EGraphStyle.Bar)
return;
foreach (TMarker tmarker in Points)
{
if (tmarker.Y > 0.0)
pad.Graphics.FillRectangle(new SolidBrush(Color.Black), pad.ClientX(tmarker.X) - BarWidth / 2, pad.ClientY(tmarker.Y), BarWidth, pad.ClientY(0.0) - pad.ClientY(tmarker.Y));
else
pad.Graphics.FillRectangle(new SolidBrush(Color.Black), pad.ClientX(tmarker.X) - BarWidth / 2, pad.ClientY(0.0), BarWidth, pad.ClientY(tmarker.Y) - pad.ClientY(0.0));
}
}