• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IDrawingView类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IDrawingView的典型用法代码示例。如果您正苦于以下问题:C# IDrawingView类的具体用法?C# IDrawingView怎么用?C# IDrawingView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IDrawingView类属于命名空间,在下文中一共展示了IDrawingView类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ResizeHandleUndoActivity

			public ResizeHandleUndoActivity(IDrawingView view, IFigure owner): base (view) {
				Undoable = true;
				Redoable = true;
				Owner = owner;
				OldDisplayBox = Owner.DisplayBox;
				NewDisplayBox = Owner.DisplayBox;
			}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:7,代码来源:ResizeHandle.cs


示例2: DrawInRegionVisitor

 public DrawInRegionVisitor(Gdk.Region region, Cairo.Context context, IDrawingView view)
 {
     this.context = context;
     this.region = region;
     this.view = view;
     this.figures = new List<Figure> ();
 }
开发者ID:erbriones,项目名称:monodevelop-classdesigner,代码行数:7,代码来源:DrawInRegionVisitor.cs


示例3: InvokeStep

		public override void InvokeStep (double x, double y, IDrawingView view)	{
			RectangleD r = Owner.DisplayBox;

			PointD new_location = new PointD (r.X, Math.Min (r.Y + r.Height, y));
			PointD new_corner   = new PointD (Math.Max (r.X, x), r.Y + r.Height);

			Owner.DisplayBox = new RectangleD (new_location, new_corner);
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:8,代码来源:NorthEastHandle.cs


示例4: ChangeAttributeUndoActivity

			public ChangeAttributeUndoActivity (IDrawingView drawingView, 
				FigureAttribute attribute, object value) : base (drawingView) {
				_originalValues = new Dictionary<IFigure, object> ();
				Undoable        = true;
				Redoable        = true;
				Attribute       = attribute;
				Value           = value;
			}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:8,代码来源:ChangeAttributeCommand.cs


示例5: InvokeStep

        public override void InvokeStep(double x, double y, IDrawingView view)
        {
            RectangleD r = Owner.DisplayBox;

            var new_location = new PointD (Math.Min (r.X + r.Width, x), r.Y);
            var new_corner   = new PointD (r.X + r.Width, Math.Max (r.Y, y));

            Owner.DisplayBox = new RectangleD (new_location, new_corner);
        }
开发者ID:erbriones,项目名称:monodevelop-classdesigner,代码行数:9,代码来源:SouthWestHandle.cs


示例6: InvokeStep

        public override void InvokeStep(double x, double y, IDrawingView view)
        {
            LabelFigure label = (LabelFigure) Owner;
            PointD delta = label.HandleDeltaPosition();
            Owner.MoveTo(x - delta.X, y - delta.Y);

            double offsetX = Owner.DisplayBox.Width/2 - delta.X;
            double offsetY = Owner.DisplayBox.Height/2 - delta.Y;
            label.SetPosition(new PointD(x + offsetX, y + offsetY));
        }
开发者ID:mono,项目名称:monohotdraw,代码行数:10,代码来源:LabelHandle.cs


示例7: InvokeEnd

		public void InvokeEnd (double x, double y, IDrawingView view) {
			WrappedHandle.InvokeEnd(x, y, view);
			
			IUndoActivity activity = WrappedHandle.UndoActivity;
			
			if (activity != null && activity.Undoable && view.Editor.UndoManager != null) {
				view.Editor.UndoManager.PushUndo(activity);
				view.Editor.UndoManager.ClearRedos();
			}
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:10,代码来源:UndoableHandle.cs


示例8: Draw

		public virtual void Draw (Context context, IDrawingView view) {
			RectangleD rect = ViewDisplayBox(view);
			context.Save();
			context.LineWidth = LineWidth;
			context.Rectangle (GdkCairoHelper.CairoRectangle (rect));
			context.Color = FillColor;
			context.FillPreserve ();
			context.Color = LineColor;
			context.Stroke ();
			context.Restore();
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:11,代码来源:AbstractHandle.cs


示例9: InvokeEnd

		public override void InvokeEnd (double x, double y, IDrawingView view) {
			PolyLineFigure figure = ((PolyLineFigure) Owner);
			// eliminates handles in the middle of a straight line
			if (figure.PointCount > 2 && Index != 0 && Index != (figure.PointCount - 1)) {
				PointD p1 = figure.PointAt (Index - 1);
				PointD p2 = figure.PointAt (Index + 1);
				if (Geometry.LineContainsPoint (p1.X, p1.Y, p2.X, p2.Y, x, y)) {
					figure.RemovePointAt (Index);
				}
			}
			base.InvokeEnd(x, y, view);
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:12,代码来源:LineConnectionHandle.cs


示例10: InvokeStart

 public override void InvokeStart(double x, double y, IDrawingView view) 
 {
     m_connection = CreateConnection();
     m_connection.EndPoint = new PointD (x, y);
     m_connection.StartPoint = new PointD (x, y);
     m_connection.ConnectStart (Owner.ConnectorAt(x, y));
     m_connection.UpdateConnection();
     view.Drawing.Add(m_connection);
     view.ClearSelection();
     view.AddToSelection(m_connection);
     m_handle = view.FindHandle(x, y);
 }
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:12,代码来源:NewConnectionHandle.cs


示例11: InvokeEnd

 public override void InvokeEnd (double x, double y, IDrawingView view)
 {
     base.InvokeEnd (x, y, view);
     
     if (clicked) 
     {
         Experiment ownerExperiment = m_ownerConnection.Owner;
         ownerExperiment.RemoveConnection(m_ownerConnection.ExperimentNodeConnection);
     }
     
     clicked = false;
 }
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:12,代码来源:RemoveConnectionHandle.cs


示例12: InvokeEnd

 public override void InvokeEnd(double x, double y, IDrawingView view) 
 {
     if (m_handle != null) {
         m_handle.InvokeEnd(x, y, view);
     }
     
     if (m_connection.EndConnector == null) {
         m_connection.DisconnectStart ();
         m_connection.DisconnectEnd ();
         view.Drawing.Remove(m_connection);
         view.ClearSelection();
     }
 }
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:13,代码来源:NewConnectionHandle.cs


示例13: SelectFiguresOnRect

		public void SelectFiguresOnRect (IDrawingView view, bool shift_pressed) 	{
			foreach (IFigure figure in view.Drawing.FiguresEnumeratorReverse) {
				RectangleD rect = figure.DisplayBox;
				if (_selectionRect.Contains (rect.X, rect.Y)
					&& _selectionRect.Contains (rect.X2, rect.Y2)) {
						if (shift_pressed) {
							view.ToggleSelection (figure);
						}
						else {
							view.AddToSelection (figure);
						}
				}
			}
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:14,代码来源:SelectAreaTool.cs


示例14: Draw

		public override void Draw (Cairo.Context context, IDrawingView view)
		{
			context.Save();
			base.Draw(context, view);
			
			context.LineWidth = 1.0;
			
			if (Active) {
				DrawOn(context, view);
			}
			else {
				DrawOff(context, view);
			}
			context.Restore();
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:15,代码来源:ToggleButtonHandle.cs


示例15: InvokeEnd

 public override void InvokeEnd (double x, double y, IDrawingView view)
 {
     base.InvokeEnd (x, y, view);
     
     if (clicked) 
     {
         IEditableExperiment experiment = m_ownerComponent.ExperimentNode.Owner as IEditableExperiment;
         if(experiment != null) 
         {
             experiment.RemoveVertex(m_ownerComponent.ExperimentNode);
         }
     }
     
     clicked = false;
 }
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:15,代码来源:RemoveNodeHandle.cs


示例16: Draw

		public override void Draw (Context context, IDrawingView view) {
			RectangleD rect = ViewDisplayBox(view);
			
			double middle = rect.Width / 2.0;

			context.LineWidth = LineWidth;
			context.Save ();
			context.Translate (rect.X + middle, rect.Y + middle);
			context.Arc (0.0, 0.0, middle, 0.0, 2.0 * Math.PI);
			context.Restore ();
			context.Color = new Cairo.Color (0.2, 0.2, 1.0, 0.5);
			context.FillPreserve ();
			context.Color = new Cairo.Color (0.0, 0.0, 0.0, 1.0);
			context.Stroke ();
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:15,代码来源:PolyLineHandle.cs


示例17: Draw

		public override void Draw (Context context, IDrawingView view) {
			RectangleD rect = ViewDisplayBox(view);
			
			context.LineWidth = LineWidth;

			context.MoveTo (rect.Center.X, rect.Top);
			context.LineTo (rect.Right, rect.Center.Y);
			context.LineTo (rect.Center.X, rect.Bottom);
			context.LineTo (rect.Left, rect.Center.Y);
			context.LineTo (rect.Center.X, rect.Top);

			context.Color = new Cairo.Color (1.0, 0.0, 0.0, 0.8);
			context.FillPreserve ();
			context.Color = new Cairo.Color (0.0, 0.0, 0.0, 1.0);
			context.Stroke ();
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:16,代码来源:ChangeConnectionHandle.cs


示例18: NullUndoActivity

		public NullUndoActivity (IDrawingView view) : base (view) {
			Undoable = false;
			Redoable = false;
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:4,代码来源:NullUndoActivity.cs


示例19: KeyEvent

		public KeyEvent(IDrawingView view, Gdk.Event gdkEvent) : base(view, gdkEvent) {
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:2,代码来源:KeyEvent.cs


示例20: TextToolUndoActivity

			public TextToolUndoActivity(IDrawingView view): base(view) {
				Undoable = true;
				Redoable = true;
			}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:4,代码来源:TextTool.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IDriver类代码示例发布时间:2022-05-24
下一篇:
C# IDrawableContainer类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap