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


C# Drawing.Surface类代码示例

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


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

示例1: FreehandContainer

		/// <summary>
		/// Constructor
		/// </summary>
		public FreehandContainer(Surface parent) : base(parent) {
			Init();
			Width = parent.Width;
			Height = parent.Height;
			Top = 0;
			Left = 0;
		}
开发者ID:logtcn,项目名称:greenshot,代码行数:10,代码来源:FreehandContainer.cs

示例2: FilterContainer

 public FilterContainer(Surface parent)
     : base(parent)
 {
     AddField(GetType(), FieldType.LINE_THICKNESS, 0);
     AddField(GetType(), FieldType.LINE_COLOR, Color.Red);
     AddField(GetType(), FieldType.SHADOW, false);
 }
开发者ID:Jusonex,项目名称:ShareX,代码行数:7,代码来源:FilterContainer.cs

示例3: SurfaceBackgroundChangeMemento

		public SurfaceBackgroundChangeMemento(Surface surface, Matrix matrix) {
			_surface = surface;
			_image = surface.Image;
			_matrix = matrix.Clone();
			// Make sure the reverse is applied
			_matrix.Invert();
		}
开发者ID:logtcn,项目名称:greenshot,代码行数:7,代码来源:SurfaceBackgroundChangeMemento.cs

示例4: EllipseContainer

 public EllipseContainer(Surface parent)
     : base(parent)
 {
     AddField(GetType(), FieldType.LINE_THICKNESS, 2);
     AddField(GetType(), FieldType.LINE_COLOR, Color.Red);
     AddField(GetType(), FieldType.FILL_COLOR, Color.Transparent);
     AddField(GetType(), FieldType.SHADOW, true);
 }
开发者ID:modulexcite,项目名称:ShareX_Google_Code,代码行数:8,代码来源:EllipseContainer.cs

示例5: LineContainer

 public LineContainer(Surface parent)
     : base(parent)
 {
     Init();
     AddField(GetType(), FieldType.LINE_THICKNESS, 1);
     AddField(GetType(), FieldType.LINE_COLOR, Color.Red);
     AddField(GetType(), FieldType.SHADOW, false);
 }
开发者ID:eservicepartner,项目名称:espUrl,代码行数:8,代码来源:LineContainer.cs

示例6: HighlightContainer

 public HighlightContainer(Surface parent)
     : base(parent)
 {
     AddField(GetType(), FieldType.LINE_THICKNESS, 0);
     AddField(GetType(), FieldType.LINE_COLOR, Color.Red);
     AddField(GetType(), FieldType.SHADOW, false);
     AddField(GetType(), FieldType.PREPARED_FILTER_HIGHLIGHT, FilterContainer.PreparedFilter.TEXT_HIGHTLIGHT);
     init();
 }
开发者ID:modulexcite,项目名称:ZScreen_Google_Code,代码行数:9,代码来源:HighlightContainer.cs

示例7: ArrowContainer

 public ArrowContainer(Surface parent)
     : base(parent)
 {
     AddField(GetType(), FieldType.ARROWHEADS, 2);
     AddField(GetType(), FieldType.LINE_COLOR, Color.Red);
     AddField(GetType(), FieldType.FILL_COLOR, Color.Transparent);
     AddField(GetType(), FieldType.SHADOW, true);
     AddField(GetType(), FieldType.ARROWHEADS, Greenshot.Drawing.ArrowContainer.ArrowHeadCombination.END_POINT);
 }
开发者ID:modulexcite,项目名称:ZScreen_Google_Code,代码行数:9,代码来源:ArrowContainer.cs

示例8: FreehandContainer

 /// <summary>
 /// Constructor
 /// </summary>
 public FreehandContainer(Surface parent)
     : base(parent)
 {
     Init();
     AddField(GetType(), FieldType.LINE_THICKNESS, 3);
     AddField(GetType(), FieldType.LINE_COLOR, Color.Red);
     Width = parent.Width;
     Height = parent.Height;
     Top = 0;
     Left = 0;
 }
开发者ID:eservicepartner,项目名称:espUrl,代码行数:14,代码来源:FreehandContainer.cs

示例9: TextContainer

 public TextContainer(Surface parent)
     : base(parent)
 {
     Init();
     AddField(GetType(), FieldType.LINE_THICKNESS, 2);
     AddField(GetType(), FieldType.LINE_COLOR, Color.Red);
     AddField(GetType(), FieldType.SHADOW, true);
     AddField(GetType(), FieldType.FONT_ITALIC, false);
     AddField(GetType(), FieldType.FONT_BOLD, false);
     AddField(GetType(), FieldType.FILL_COLOR, Color.Transparent);
     AddField(GetType(), FieldType.FONT_FAMILY, FontFamily.GenericSansSerif.Name);
     AddField(GetType(), FieldType.FONT_SIZE, 11f);
 }
开发者ID:modulexcite,项目名称:ZScreen_Google_Code,代码行数:13,代码来源:TextContainer.cs

示例10: ImageEditorForm

        public ImageEditorForm()
        {
            InitializeComponent();

            surface = new Surface();
            surface.SizeMode = PictureBoxSizeMode.AutoSize;
            surface.TabStop = false;
            surface.MovingElementChanged += new SurfaceElementEventHandler(surfaceMovingElementChanged);
            panel1.Controls.Add(surface);

            this.colorDialog.RecentColors = conf.Editor_RecentColors;

            UpdateFormControls();
        }
开发者ID:modulexcite,项目名称:ZScreen_Google_Code,代码行数:14,代码来源:ImageEditorForm.cs

示例11: TextContainer

 public TextContainer(Surface parent)
     : base(parent)
 {
     Init();
     AddField(GetType(), FieldType.LINE_THICKNESS, 2);
     AddField(GetType(), FieldType.LINE_COLOR, Color.Red);
     AddField(GetType(), FieldType.SHADOW, true);
     AddField(GetType(), FieldType.FONT_ITALIC, false);
     AddField(GetType(), FieldType.FONT_BOLD, false);
     AddField(GetType(), FieldType.FILL_COLOR, Color.Transparent);
     AddField(GetType(), FieldType.FONT_FAMILY, FontFamily.GenericSansSerif.Name);
     AddField(GetType(), FieldType.FONT_SIZE, 11f);
     AddField(GetType(), FieldType.TEXT_HORIZONTAL_ALIGNMENT, HorizontalAlignment.Center);
     AddField(GetType(), FieldType.TEXT_VERTICAL_ALIGNMENT, VerticalAlignment.CENTER);
     stringFormat = new StringFormat();
     stringFormat.Trimming = StringTrimming.EllipsisWord;
 }
开发者ID:yoykiee,项目名称:ShareX,代码行数:17,代码来源:TextContainer.cs

示例12: Test

		public void Test()
		{

			FieldType t = FieldType.LINE_THICKNESS;

			Surface s = new Surface();
			FieldAggregator ep = new FieldAggregator();
			//ep.SetFieldValue(t,598);

			RectangleContainer rc = new RectangleContainer(s);
			rc.SetFieldValue(t,597);
			//Assert.AreNotEqual(ep.GetField(t), rc.GetField(t));
			ep.BindElement(rc);
			Assert.AreEqual(597, ep.GetField(t).Value);
			Assert.AreEqual(597, rc.GetField(t).Value);
			
			RectangleContainer rc2 = new RectangleContainer(s);
			Assert.AreEqual(597, ep.GetField(t).Value);
			rc2.SetFieldValue(t,595);
			Assert.AreEqual(595, rc2.GetField(t).Value);
			ep.BindElement(rc2);
			Assert.AreEqual(595, ep.GetField(t).Value);
			Assert.AreEqual(597, rc.GetField(t).Value);
			
			RectangleContainer rc3 = new RectangleContainer(s);
			rc3.SetFieldValue(t,600);
			ep.BindElement(rc3);
			
			//Assert.AreEqual(600, ep.GetField(t).Value);
			Assert.AreEqual(600, rc3.GetField(t).Value);
			Assert.AreEqual(597, rc.GetField(t).Value);
			
			ep.SetFieldValue(t, 599);
			Assert.AreEqual(599, ep.GetField(t).Value);
			Assert.AreEqual(599, rc.GetField(t).Value);
			Assert.AreEqual(599, rc2.GetField(t).Value);
			Assert.AreEqual(599, rc3.GetField(t).Value);
			
			
			
			
			
		}
开发者ID:logtcn,项目名称:greenshot,代码行数:43,代码来源:PropertyAggregatorTest.cs

示例13: CropContainer

		public CropContainer(Surface parent) : base(parent) {
		}
开发者ID:logtcn,项目名称:greenshot,代码行数:2,代码来源:CropContainer.cs

示例14: CursorContainer

 public CursorContainer(Surface parent, string filename)
     : base(parent)
 {
     Load(filename);
 }
开发者ID:modulexcite,项目名称:ZScreen_Google_Code,代码行数:5,代码来源:CursorContainer.cs

示例15: SwitchParent

		protected virtual void SwitchParent(Surface newParent) {
			// Target gripper
			if (_parent != null && _targetGripper != null) {
				_parent.Controls.Remove(_targetGripper);
			}
			// Normal grippers
			if (_parent != null && _grippers != null) {
				for (int i=0; i<_grippers.Length; i++) {
					_parent.Controls.Remove(_grippers[i]);
				}
			} else if (_grippers == null) {
				InitControls();
			}
			_parent = newParent;
			// Target gripper
			if (_parent != null && _targetGripper != null) {
				_parent.Controls.Add(_targetGripper);
			}
			// Normal grippers
			if (_grippers != null) {
				_parent.Controls.AddRange(_grippers);				
			}

			foreach(IFilter filter in Filters) {
				filter.Parent = this;
			}
		}
开发者ID:logtcn,项目名称:greenshot,代码行数:27,代码来源:DrawableContainer.cs


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