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


C# RectangleD.Inflate方法代码示例

本文整理汇总了C#中RectangleD.Inflate方法的典型用法代码示例。如果您正苦于以下问题:C# RectangleD.Inflate方法的具体用法?C# RectangleD.Inflate怎么用?C# RectangleD.Inflate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RectangleD的用法示例。


在下文中一共展示了RectangleD.Inflate方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RectangleInsideGdkRegion

		public static bool RectangleInsideGdkRegion (RectangleD r, Gdk.Region region) {
			r.Inflate (1.0, 1.0);
			Gdk.Rectangle gdkRect = GdkRectangle (r);
			Gdk.OverlapType type = region.RectIn (gdkRect);

			return (type == Gdk.OverlapType.In || type == Gdk.OverlapType.Part);
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:7,代码来源:GdkCairoHelper.cs

示例2: InvalidateRect

        public virtual RectangleD InvalidateRect(PointD b)
        {
            var r = new RectangleD (b.X, b.Y, 0.0, 0.0);
            r.Inflate (15.0, 15.0);

            return r;
        }
开发者ID:erbriones,项目名称:monodevelop-classdesigner,代码行数:7,代码来源:LineTerminal.cs

示例3: LineContainsPoint

		public static bool LineContainsPoint (double x1, double y1, double x2, double y2, double px, double py) {
			RectangleD r = new RectangleD (new PointD (x1, y1));
			r.Add (x2, y2);
			r.Inflate (2.0, 2.0);
			if (!r.Contains (px, py)) {
				return false;
			}

			double a, b, x, y;

			if (x1 == x2) {
				return (Math.Abs (px - x1) < 3.0);
			}

			if (y1 == y2) {
				return (Math.Abs (py - y1) < 3.0);
			}
			a = (y1 - y2) / (x1 - x2);
			b = y1 - a * x1;
			x = (py - b) / a;
			y = a * px + b;

			return (Math.Min (Math.Abs (x - px), Math.Abs (y - py)) < 4.0);
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:24,代码来源:Geometry.cs

示例4: RecalculateDisplayBox

        protected void RecalculateDisplayBox()
        {
            int w = 0;
            int h = 0;

            if (PangoLayout != null)
                PangoLayout.GetPixelSize (out w, out h);

            var r = new RectangleD (DisplayBox.X + Padding, DisplayBox.Y + Padding,
                                    (double) w, (double) h);

            r.Inflate (Padding, Padding);
            displaybox = r;
        }
开发者ID:erbriones,项目名称:monodevelop-classdesigner,代码行数:14,代码来源:TextFigure.cs

示例5: RecalculateDisplayBox

		protected void RecalculateDisplayBox() 
        {
			int w = 0;
			int h = 0;
			
			if (PangoLayout != null)
				PangoLayout.GetPixelSize(out w, out h);
			
			RectangleD r = new RectangleD(DisplayBox.X + PaddingLeft, 
                                           DisplayBox.Y + PaddingTop, 
									        (double) w, (double) h);

			r.Inflate(PaddingLeft, PaddingTop, PaddingRight, PaddingBottom);
			_displayBox = r; 
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:15,代码来源:SimpleTextFigure.cs

示例6: InvalidateRect

		public override RectangleD InvalidateRect (PointD b) {
			double distance = Math.Max (_lineDistance*2, _pointDistance);
			RectangleD r = new RectangleD (b.X, b.Y, 0.0, 0.0);
			r.Inflate (distance, distance);
			return r;
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:6,代码来源:TriangleArrowLineTerminal.cs

示例7: ContainsPoint

		public bool ContainsPoint (double x, double y) {
			RectangleD displayBox = new RectangleD(Locate());
			displayBox.Inflate(Width/2, Height/2);
			return displayBox.Contains(x, y);
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:5,代码来源:AbstractHandle.cs

示例8: ViewDisplayBox

		protected virtual RectangleD ViewDisplayBox(IDrawingView view) {
			if (view == null)
				throw new ArgumentNullException("view");
			
			PointD center = Locate();
			center = view.DrawingToView(center.X, center.Y);
			RectangleD displayBox = new RectangleD(center);
			displayBox.Inflate(Width/2, Height/2);
			displayBox.OffsetDot5();
			
			return displayBox;
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:12,代码来源:AbstractHandle.cs

示例9: InvalidateRect

        public override RectangleD InvalidateRect(PointD b)
        {
            var distance = Math.Max (_lineDistance * 2, _pointDistance);
            var rect = new RectangleD (b.X, b.Y, 0.0, 0.0);
            rect.Inflate (distance, distance);

            return rect;
        }
开发者ID:erbriones,项目名称:monodevelop-classdesigner,代码行数:8,代码来源:TriangleArrowLineTerminal.cs


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