当前位置: 首页>>代码示例>>C#>>正文


C# Graphics2D.Rectangle方法代码示例

本文整理汇总了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);
 }
开发者ID:rubenkar,项目名称:MatterControl,代码行数:7,代码来源:ThemeColorSelectorWidget.cs

示例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);
        }
开发者ID:jeske,项目名称:agg-sharp,代码行数:9,代码来源:WindowWidget.cs

示例3: OnDraw

		public override void OnDraw(Graphics2D graphics2D)
		{
			base.OnDraw(graphics2D);

			if (Focused)
			{
				graphics2D.Rectangle(LocalBounds, RGBA_Bytes.Orange);
			}
		}
开发者ID:tellingmachine,项目名称:MatterControl,代码行数:9,代码来源:PrinterChooser.cs

示例4: OnDraw

		public override void OnDraw(Graphics2D graphics2D)
		{
			SetNoContentFieldDescriptionVisibility();
			base.OnDraw(graphics2D);

			if (ContainsFocus)
			{
				graphics2D.Rectangle(LocalBounds, RGBA_Bytes.Orange);
			}
		}
开发者ID:broettge,项目名称:MatterControl,代码行数:10,代码来源:MHTextEditWidget.cs

示例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);
		}
开发者ID:broettge,项目名称:MatterControl,代码行数:33,代码来源:TextImageButtonFactory.cs

示例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);
		}
开发者ID:broettge,项目名称:MatterControl,代码行数:19,代码来源:ClickWidget.cs

示例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);
 }
开发者ID:rubenkar,项目名称:MatterControl,代码行数:7,代码来源:ProgressControl.cs

示例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();
        }
开发者ID:glocklueng,项目名称:agg-sharp,代码行数:11,代码来源:CameraCalibrationWidget.cs

示例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();
        }
开发者ID:glocklueng,项目名称:agg-sharp,代码行数:12,代码来源:MatterCadWidget.cs


注:本文中的MatterHackers.Agg.Graphics2D.Rectangle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。