本文整理汇总了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;
}
示例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);
}
示例3: SurfaceBackgroundChangeMemento
public SurfaceBackgroundChangeMemento(Surface surface, Matrix matrix) {
_surface = surface;
_image = surface.Image;
_matrix = matrix.Clone();
// Make sure the reverse is applied
_matrix.Invert();
}
示例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);
}
示例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);
}
示例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();
}
示例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);
}
示例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;
}
示例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);
}
示例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();
}
示例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;
}
示例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);
}
示例13: CropContainer
public CropContainer(Surface parent) : base(parent) {
}
示例14: CursorContainer
public CursorContainer(Surface parent, string filename)
: base(parent)
{
Load(filename);
}
示例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;
}
}