mirror of
https://github.com/greenshot/greenshot
synced 2025-07-30 19:50:11 -07:00
As 2.x takes longer as planned, I added the SpeechbubbleContainer and StepLabelContainer (Enumerable label) to the 1.2 branch. This code was stored somewhere on my hard-drive, is still experimental.
This commit is contained in:
parent
01ce82dbeb
commit
ff3f898f54
21 changed files with 648 additions and 166 deletions
|
@ -30,11 +30,14 @@ namespace Greenshot.Drawing {
|
|||
/// </summary>
|
||||
public class CropContainer : DrawableContainer {
|
||||
public CropContainer(Surface parent) : base(parent) {
|
||||
}
|
||||
|
||||
protected override void InitializeFields() {
|
||||
AddField(GetType(), FieldType.FLAGS, FieldType.Flag.CONFIRMABLE);
|
||||
}
|
||||
|
||||
public override void Invalidate() {
|
||||
parent.Invalidate();
|
||||
_parent.Invalidate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -43,7 +46,7 @@ namespace Greenshot.Drawing {
|
|||
/// </summary>
|
||||
public override Rectangle DrawingBounds {
|
||||
get {
|
||||
return new Rectangle(0,0,parent.Width, parent.Height);
|
||||
return new Rectangle(0,0,_parent.Width, _parent.Height);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -55,13 +58,13 @@ namespace Greenshot.Drawing {
|
|||
DrawSelectionBorder(g, selectionRect);
|
||||
|
||||
// top
|
||||
g.FillRectangle(cropBrush, new Rectangle(0, 0, parent.Width, cropRectangle.Top));
|
||||
g.FillRectangle(cropBrush, new Rectangle(0, 0, _parent.Width, cropRectangle.Top));
|
||||
// left
|
||||
g.FillRectangle(cropBrush, new Rectangle(0, cropRectangle.Top, cropRectangle.Left, cropRectangle.Height));
|
||||
// right
|
||||
g.FillRectangle(cropBrush, new Rectangle(cropRectangle.Left + cropRectangle.Width, cropRectangle.Top, parent.Width - (cropRectangle.Left + cropRectangle.Width), cropRectangle.Height));
|
||||
g.FillRectangle(cropBrush, new Rectangle(cropRectangle.Left + cropRectangle.Width, cropRectangle.Top, _parent.Width - (cropRectangle.Left + cropRectangle.Width), cropRectangle.Height));
|
||||
// bottom
|
||||
g.FillRectangle(cropBrush, new Rectangle(0, cropRectangle.Top + cropRectangle.Height, parent.Width, parent.Height - (cropRectangle.Top + cropRectangle.Height)));
|
||||
g.FillRectangle(cropBrush, new Rectangle(0, cropRectangle.Top + cropRectangle.Height, _parent.Width, _parent.Height - (cropRectangle.Top + cropRectangle.Height)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue