Trying to replace the Gripper (which is a Label/Control) with adorners (custom code). This should prevent the slow cleanup, reduce resources and speedup the editor. Also we should have better "UI" feedback. This is still very experimental.

This commit is contained in:
Robin 2016-05-23 13:32:52 +02:00
parent e9ab99c5ac
commit 31db071394
15 changed files with 643 additions and 349 deletions

View file

@ -24,6 +24,8 @@ using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Windows.Forms;
using System.ComponentModel;
using System.Collections.Generic;
using Greenshot.Plugin.Drawing.Adorners;
namespace Greenshot.Plugin.Drawing {
public enum RenderMode {EDIT, EXPORT};
@ -73,7 +75,11 @@ namespace Greenshot.Plugin.Drawing {
Rectangle DrawingBounds {
get;
}
void ApplyBounds(RectangleF newBounds);
void DoLayout();
bool hasFilters {
get;
}
@ -85,8 +91,6 @@ namespace Greenshot.Plugin.Drawing {
void AlignToParent(HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment);
void Invalidate();
bool ClickableAt(int x, int y);
void HideGrippers();
void ShowGrippers();
void MoveBy(int x, int y);
void Transform(Matrix matrix);
bool HandleMouseDown(int x, int y);
@ -97,6 +101,11 @@ namespace Greenshot.Plugin.Drawing {
EditStatus DefaultEditMode {
get;
}
/// <summary>
/// Available adorners for the DrawableContainer
/// </summary>
IList<IAdorner> Adorners { get; }
}
public interface ITextContainer: IDrawableContainer {