本文整理汇总了C#中MatterHackers.Agg.Graphics2D.Rectangle方法的典型用法代码示例。如果您正苦于以下问题:C# Graphics2D.Rectangle方法的具体用法?C# Graphics2D.Rectangle怎么用?C# Graphics2D.Rectangle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MatterHackers.Agg.Graphics2D
的用法示例。
在下文中一共展示了Graphics2D.Rectangle方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnDraw
public override void OnDraw(Graphics2D graphics2D)
{
base.OnDraw(graphics2D);
RectangleDouble border = LocalBounds;
border.Deflate(new BorderDouble(1));
graphics2D.Rectangle(border, ActiveTheme.Instance.SecondaryBackgroundColor, 4);
}
示例2: OnDraw
public override void OnDraw(Graphics2D graphics2D)
{
graphics2D.Rectangle(LocalBounds, RGBA_Bytes.Black);
RoundedRect boundsRect = new RoundedRect(dragBar.BoundsRelativeToParent, 0);
graphics2D.Render(boundsRect, DragBarColor);
base.OnDraw(graphics2D);
}
示例3: OnDraw
public override void OnDraw(Graphics2D graphics2D)
{
base.OnDraw(graphics2D);
if (Focused)
{
graphics2D.Rectangle(LocalBounds, RGBA_Bytes.Orange);
}
}
示例4: OnDraw
public override void OnDraw(Graphics2D graphics2D)
{
SetNoContentFieldDescriptionVisibility();
base.OnDraw(graphics2D);
if (ContainsFocus)
{
graphics2D.Rectangle(LocalBounds, RGBA_Bytes.Orange);
}
}
示例5: OnDraw
public override void OnDraw(Graphics2D graphics2D)
{
if (borderColor.Alpha0To255 > 0)
{
RectangleDouble borderRectangle = LocalBounds;
if (borderWidth > 0)
{
if (borderWidth == 1)
{
graphics2D.Rectangle(borderRectangle, borderColor);
}
else
{
//boarderRectangle.Inflate(-borderWidth / 2);
RoundedRect rectBorder = new RoundedRect(borderRectangle, this.borderRadius);
graphics2D.Render(new Stroke(rectBorder, borderWidth), borderColor);
}
}
}
if (this.fillColor.Alpha0To255 > 0)
{
RectangleDouble insideBounds = LocalBounds;
insideBounds.Inflate(-this.borderWidth);
RoundedRect rectInside = new RoundedRect(insideBounds, Math.Max(this.borderRadius - this.borderWidth, 0));
graphics2D.Render(rectInside, this.fillColor);
}
base.OnDraw(graphics2D);
}
示例6: OnDraw
public override void OnDraw(Graphics2D graphics2D)
{
RectangleDouble borderRectangle = LocalBounds;
if (BorderWidth > 0)
{
if (BorderWidth == 1)
{
graphics2D.Rectangle(borderRectangle, BorderColor);
}
else
{
RoundedRect rectBorder = new RoundedRect(borderRectangle, 0);
graphics2D.Render(new Stroke(rectBorder, BorderWidth), BorderColor);
}
}
base.OnDraw(graphics2D);
}
示例7: OnDraw
public override void OnDraw(Graphics2D graphics2D)
{
RectangleDouble barBounds = bar.BoundsRelativeToParent;
graphics2D.FillRectangle(barBounds.Left, barBounds.Bottom, barBounds.Left + barBounds.Width * PercentComplete / 100.0, barBounds.Top, ActiveTheme.Instance.PrimaryAccentColor);
graphics2D.Rectangle(barBounds, RGBA_Bytes.Black);
base.OnDraw(graphics2D);
}
示例8: OnDraw
public override void OnDraw(Graphics2D graphics2D)
{
CameraCalibrationWidget_OnDraw.Start();
graphics2D.Clear(RGBA_Bytes.White);
rect_d rect = new rect_d(Width - 40, 10, Width - 10, 40);
graphics2D.Rectangle(rect, RGBA_Bytes.Black);
Invalidate(rect);
base.OnDraw(graphics2D);
CameraCalibrationWidget_OnDraw.Stop();
}
示例9: OnDraw
public override void OnDraw(Graphics2D graphics2D)
{
MatterCadWidget_OnDraw.Start();
graphics2D.Clear(RGBA_Bytes.White);
rect_d rect = new rect_d(Width - 40, 10, Width - 10, 40);
graphics2D.FillRectangle(rect, previewWindowRayTrace.mouseOverColor);
graphics2D.Rectangle(rect, RGBA_Bytes.Black);
Invalidate(rect);
base.OnDraw(graphics2D);
MatterCadWidget_OnDraw.Stop();
}