mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
Some enhancements to the interfaces
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1642 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
dbc77613f2
commit
5242a70121
2 changed files with 31 additions and 4 deletions
|
@ -42,7 +42,6 @@ namespace Greenshot.Drawing {
|
|||
public delegate void SurfaceDrawingModeEventHandler(object source, DrawingModes drawingMode);
|
||||
|
||||
public enum DrawingModes { None, Rect, Ellipse, Text, Line, Arrow, Crop, Highlight, Obfuscate, Bitmap, Path }
|
||||
public enum Effects { Shadow, TornEdge }
|
||||
|
||||
/// <summary>
|
||||
/// Description of Surface.
|
||||
|
@ -77,7 +76,26 @@ namespace Greenshot.Drawing {
|
|||
private DrawableContainer drawingElement = null;
|
||||
private DrawableContainer undrawnElement = null;
|
||||
private DrawableContainer cropContainer = null;
|
||||
private IDrawableContainer cursorContainer = null;
|
||||
private TextureBrush transparencyBackgroundBrush;
|
||||
|
||||
public IDrawableContainer CursorContainer {
|
||||
get {
|
||||
return cursorContainer;
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasCursor {
|
||||
get {
|
||||
return cursorContainer != null;
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveCursor() {
|
||||
RemoveElement(cursorContainer, true);
|
||||
cursorContainer = null;
|
||||
}
|
||||
|
||||
public TextureBrush TransparencyBackgroundBrush {
|
||||
get {
|
||||
return transparencyBackgroundBrush;
|
||||
|
@ -167,7 +185,8 @@ namespace Greenshot.Drawing {
|
|||
((Capture)capture).NullImage();
|
||||
|
||||
if (capture.Cursor != null && capture.CursorVisible) {
|
||||
SelectElement(AddIconContainer(capture.Cursor, capture.CursorLocation.X, capture.CursorLocation.Y));
|
||||
cursorContainer = AddIconContainer(capture.Cursor, capture.CursorLocation.X, capture.CursorLocation.Y);
|
||||
SelectElement(cursorContainer);
|
||||
}
|
||||
captureDetails = capture.CaptureDetails;
|
||||
}
|
||||
|
@ -869,7 +888,8 @@ namespace Greenshot.Drawing {
|
|||
modified = true;
|
||||
}
|
||||
|
||||
public void RemoveElement(DrawableContainer element, bool makeUndoable) {
|
||||
public void RemoveElement(IDrawableContainer elementToRemove, bool makeUndoable) {
|
||||
DrawableContainer element = elementToRemove as DrawableContainer;
|
||||
DeselectElement(element);
|
||||
elements.Remove(element);
|
||||
element.FieldChanged -= element_FieldChanged;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue