本文整理汇总了C#中Greenshot.Drawing.Surface类的典型用法代码示例。如果您正苦于以下问题:C# Surface类的具体用法?C# Surface怎么用?C# Surface使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Surface类属于Greenshot.Drawing命名空间,在下文中一共展示了Surface类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: DrawableContainer
public DrawableContainer(Surface parent) {
InitializeFields();
_parent = parent;
InitControls();
}
开发者ID:logtcn,项目名称:greenshot,代码行数:5,代码来源:DrawableContainer.cs
示例17: SurfaceBackgroundChangeMemento
public SurfaceBackgroundChangeMemento(Surface surface, Point offset)
{
this.surface = surface;
image = surface.Image;
this.offset = new Point(-offset.X, -offset.Y);
}
开发者ID:modulexcite,项目名称:ShareX_Google_Code,代码行数:6,代码来源:SurfaceBackgroundChangeMemento.cs
示例18: FilterContainer
public FilterContainer(Surface parent) : base(parent) {
}
开发者ID:logtcn,项目名称:greenshot,代码行数:2,代码来源:FilterContainer.cs
示例19: CropContainer
public CropContainer(Surface parent)
: base(parent)
{
AddField(GetType(), FieldType.FLAGS, FieldType.Flag.CONFIRMABLE);
}
开发者ID:modulexcite,项目名称:ZScreen_Google_Code,代码行数:5,代码来源:CropContainer.cs
示例20: ImageEditorForm
public ImageEditorForm(Surface surface, bool outputMade)
{
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ImageEditorForm));
Image backgroundForTransparency = (Image)resources.GetObject("checkerboard.Image");
surface.TransparencyBackgroundBrush = new TextureBrush(backgroundForTransparency, WrapMode.Tile);
// Make sure Double-buffer is enabled
SetStyle(ControlStyles.DoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true);
// Intial "saved" flag for asking if the image needs to be save
surface.Modified = !outputMade;
// resizing the panel is futile, since it is docked. however, it seems
// to fix the bug (?) with the vscrollbar not being able to shrink to
// a smaller size than the initial panel size (as set by the forms designer)
panel1.Height = 10;
// init surface
this.surface = surface;
surface.TabStop = false;
surface.MovingElementChanged += delegate { refreshEditorControls(); };
surface.DrawingModeChanged += new SurfaceDrawingModeEventHandler(surface_DrawingModeChanged);
surface.SurfaceSizeChanged += new SurfaceSizeChangeEventHandler(SurfaceSizeChanged);
this.fontFamilyComboBox.PropertyChanged += new PropertyChangedEventHandler(FontPropertyChanged);
surface.FieldAggregator.FieldChanged += new FieldChangedEventHandler(FieldAggregatorFieldChanged);
obfuscateModeButton.DropDownItemClicked += FilterPresetDropDownItemClicked;
highlightModeButton.DropDownItemClicked += FilterPresetDropDownItemClicked;
panel1.Controls.Add(surface);
lang = Language.GetInstance();
// Make sure the editor is placed on the same location as the last editor was on close
WindowDetails thisForm = new WindowDetails(this.Handle);
thisForm.SetWindowPlacement(editorConfiguration.GetEditorPlacement());
SurfaceSizeChanged(this.Surface);
updateUI();
IniConfig.IniChanged += new FileSystemEventHandler(ReloadConfiguration);
bindFieldControls();
refreshEditorControls();
// Workaround: As the cursor is (mostly) selected on the surface a funny artifact is visible, this fixes it.
hideToolstripItems();
toolbarButtons = new ToolStripButton[] { btnCursor, btnRect, btnEllipse, btnText, btnLine, btnArrow, btnFreehand, btnHighlight, btnObfuscate, btnCrop };
//toolbarDropDownButtons = new ToolStripDropDownButton[]{btnBlur, btnPixeliate, btnTextHighlighter, btnAreaHighlighter, btnMagnifier};
PluginHelper.instance.CreateImageEditorOpenEvent(this);
pluginToolStripMenuItem.Visible = pluginToolStripMenuItem.DropDownItems.Count > 0;
emailToolStripMenuItem.Enabled = EmailConfigHelper.HasMAPI() || EmailConfigHelper.HasOutlook();
// Workaround: for the MouseWheel event which doesn't get to the panel
this.MouseWheel += new MouseEventHandler(PanelMouseWheel);
}
开发者ID:eservicepartner,项目名称:espUrl,代码行数:63,代码来源:ImageEditorForm.cs
注:本文中的Greenshot.Drawing.Surface类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论