From b37ed3562d39e1f632aaf32dc9841cc21be5e2ac Mon Sep 17 00:00:00 2001 From: RKrom Date: Wed, 28 May 2014 09:35:08 +0200 Subject: [PATCH] Added icons for the new tools, also changed some of the logic so it is possible to show the number of the next "label" in the tool button. --- Greenshot/Drawing/SpeechbubbleContainer.cs | 6 +- Greenshot/Drawing/StepLabelContainer.cs | 24 +++-- Greenshot/Drawing/Surface.cs | 29 +++++- Greenshot/Drawing/TextContainer.cs | 1 - Greenshot/Forms/ImageEditorForm.Designer.cs | 8 +- Greenshot/Forms/ImageEditorForm.cs | 6 ++ Greenshot/Forms/ImageEditorForm.resx | 75 +++++++++++++++ Greenshot/icons/balloon.png | Bin 0 -> 625 bytes Greenshot/icons/notification-counter-01.png | Bin 0 -> 407 bytes Greenshot/icons/notification-counter-02.png | Bin 0 -> 424 bytes Greenshot/icons/notification-counter-03.png | Bin 0 -> 429 bytes Greenshot/icons/notification-counter-04.png | Bin 0 -> 421 bytes Greenshot/icons/notification-counter-05.png | Bin 0 -> 423 bytes Greenshot/icons/notification-counter-06.png | Bin 0 -> 428 bytes Greenshot/icons/notification-counter-07.png | Bin 0 -> 416 bytes Greenshot/icons/notification-counter-08.png | Bin 0 -> 434 bytes Greenshot/icons/notification-counter-09.png | Bin 0 -> 423 bytes Greenshot/icons/notification-counter-10.png | Bin 0 -> 449 bytes Greenshot/icons/notification-counter-11.png | Bin 0 -> 447 bytes Greenshot/icons/notification-counter-12.png | Bin 0 -> 466 bytes Greenshot/icons/notification-counter-13.png | Bin 0 -> 469 bytes Greenshot/icons/notification-counter-14.png | Bin 0 -> 466 bytes Greenshot/icons/notification-counter-15.png | Bin 0 -> 453 bytes Greenshot/icons/notification-counter-16.png | Bin 0 -> 465 bytes Greenshot/icons/notification-counter-17.png | Bin 0 -> 462 bytes Greenshot/icons/notification-counter-18.png | Bin 0 -> 472 bytes Greenshot/icons/notification-counter-19.png | Bin 0 -> 463 bytes .../icons/notification-counter-20-plus.png | Bin 0 -> 545 bytes Greenshot/icons/notification-counter-20.png | Bin 0 -> 480 bytes GreenshotPlugin/Core/Effects.cs | 7 +- GreenshotPlugin/Core/ImageHelper.cs | 90 +++++++++++------- GreenshotPlugin/Interfaces/Generic.cs | 6 +- 32 files changed, 187 insertions(+), 65 deletions(-) create mode 100644 Greenshot/icons/balloon.png create mode 100644 Greenshot/icons/notification-counter-01.png create mode 100644 Greenshot/icons/notification-counter-02.png create mode 100644 Greenshot/icons/notification-counter-03.png create mode 100644 Greenshot/icons/notification-counter-04.png create mode 100644 Greenshot/icons/notification-counter-05.png create mode 100644 Greenshot/icons/notification-counter-06.png create mode 100644 Greenshot/icons/notification-counter-07.png create mode 100644 Greenshot/icons/notification-counter-08.png create mode 100644 Greenshot/icons/notification-counter-09.png create mode 100644 Greenshot/icons/notification-counter-10.png create mode 100644 Greenshot/icons/notification-counter-11.png create mode 100644 Greenshot/icons/notification-counter-12.png create mode 100644 Greenshot/icons/notification-counter-13.png create mode 100644 Greenshot/icons/notification-counter-14.png create mode 100644 Greenshot/icons/notification-counter-15.png create mode 100644 Greenshot/icons/notification-counter-16.png create mode 100644 Greenshot/icons/notification-counter-17.png create mode 100644 Greenshot/icons/notification-counter-18.png create mode 100644 Greenshot/icons/notification-counter-19.png create mode 100644 Greenshot/icons/notification-counter-20-plus.png create mode 100644 Greenshot/icons/notification-counter-20.png diff --git a/Greenshot/Drawing/SpeechbubbleContainer.cs b/Greenshot/Drawing/SpeechbubbleContainer.cs index a2e705fba..1286a44bc 100644 --- a/Greenshot/Drawing/SpeechbubbleContainer.cs +++ b/Greenshot/Drawing/SpeechbubbleContainer.cs @@ -84,6 +84,7 @@ namespace Greenshot.Drawing { graphics.InterpolationMode = InterpolationMode.HighQualityBicubic; graphics.CompositingQuality = CompositingQuality.HighQuality; graphics.PixelOffsetMode = PixelOffsetMode.None; + graphics.TextRenderingHint = TextRenderingHint.AntiAliasGridFit; Color lineColor = GetFieldValueAsColor(FieldType.LINE_COLOR); Color fillColor = GetFieldValueAsColor(FieldType.FILL_COLOR); @@ -174,11 +175,6 @@ namespace Greenshot.Drawing { // Draw the text UpdateFormat(); - graphics.SmoothingMode = SmoothingMode.HighQuality; - graphics.InterpolationMode = InterpolationMode.HighQualityBicubic; - graphics.CompositingQuality = CompositingQuality.HighQuality; - graphics.PixelOffsetMode = PixelOffsetMode.None; - graphics.TextRenderingHint = TextRenderingHint.AntiAliasGridFit; DrawText(graphics, rect, lineThickness, ControlPaint.Dark(lineColor, 0.25f ), false, StringFormat, Text, Font); } diff --git a/Greenshot/Drawing/StepLabelContainer.cs b/Greenshot/Drawing/StepLabelContainer.cs index 074b3c276..704e4c68e 100644 --- a/Greenshot/Drawing/StepLabelContainer.cs +++ b/Greenshot/Drawing/StepLabelContainer.cs @@ -21,11 +21,13 @@ using Greenshot.Drawing.Fields; using Greenshot.Helpers; +using Greenshot.Plugin; using Greenshot.Plugin.Drawing; using System; using System.Collections.Generic; using System.Drawing; using System.Drawing.Drawing2D; +using System.Drawing.Text; namespace Greenshot.Drawing { /// @@ -42,7 +44,7 @@ namespace Greenshot.Drawing { private bool drawAsRectangle = false; public StepLabelContainer(Surface parent) : base(parent) { - parent.StepContainers.AddLast(this); + parent.AddStepLabel(this); InitContent(); } @@ -72,27 +74,22 @@ namespace Greenshot.Drawing { /// Make sure this element is no longer referenced from the surface /// public override void Dispose() { - Parent.StepContainers.Remove(this); + Parent.RemoveStepLabel(this); base.Dispose(); } - /// /// Override the parent, calculate the label number, than draw /// /// /// public override void Draw(Graphics graphics, RenderMode rm) { - int number = 1; - foreach (StepLabelContainer possibleThis in Parent.StepContainers) { - if (possibleThis == this) { - break; - } - if (Parent.IsOnSurface(possibleThis)) { - number++; - } - } - string text = number.ToString(); + graphics.SmoothingMode = SmoothingMode.HighQuality; + graphics.InterpolationMode = InterpolationMode.HighQualityBicubic; + graphics.CompositingQuality = CompositingQuality.HighQuality; + graphics.PixelOffsetMode = PixelOffsetMode.None; + graphics.TextRenderingHint = TextRenderingHint.AntiAliasGridFit; + string text = Parent.CountStepLabels(this).ToString(); Rectangle rect = GuiRectangle.GetGuiRectangle(Left, Top, Width, Height); Color fillColor = GetFieldValueAsColor(FieldType.FILL_COLOR); Color lineColor = GetFieldValueAsColor(FieldType.LINE_COLOR); @@ -101,6 +98,7 @@ namespace Greenshot.Drawing { } else { EllipseContainer.DrawEllipse(rect, graphics, rm, 0, Color.Transparent, fillColor, false); } + TextContainer.DrawText(graphics, rect, 0, lineColor, false, _stringFormat, text, _font); } diff --git a/Greenshot/Drawing/Surface.cs b/Greenshot/Drawing/Surface.cs index ee5040193..10fe8f084 100644 --- a/Greenshot/Drawing/Surface.cs +++ b/Greenshot/Drawing/Surface.cs @@ -210,14 +210,33 @@ namespace Greenshot.Drawing { private Bitmap buffer = null; /// - /// all stepcontainers for the surface, needed with serialization + /// all stepLabels for the surface, needed with serialization /// - private readonly LinkedList _stepContainers = new LinkedList(); + private readonly LinkedList _stepLabels = new LinkedList(); - public LinkedList StepContainers { - get { - return _stepContainers; + public void AddStepLabel(IDrawableContainer stepLabel) { + _stepLabels.AddLast(stepLabel); + } + public void RemoveStepLabel(IDrawableContainer stepLabel) { + _stepLabels.Remove(stepLabel); + } + + /// + /// Count all the steplabels in the surface, up to the supplied one + /// + /// can be null, if not the counting stops here + /// number of steplabels before the supplied container + public int CountStepLabels(IDrawableContainer stopAtContainer) { + int number = 1; + foreach (StepLabelContainer possibleThis in _stepLabels) { + if (possibleThis == stopAtContainer) { + break; + } + if (IsOnSurface(possibleThis)) { + number++; + } } + return number; } /// diff --git a/Greenshot/Drawing/TextContainer.cs b/Greenshot/Drawing/TextContainer.cs index 1363381a7..26bbb5a39 100644 --- a/Greenshot/Drawing/TextContainer.cs +++ b/Greenshot/Drawing/TextContainer.cs @@ -360,7 +360,6 @@ namespace Greenshot.Drawing { if (lineThickness > 0) { drawingRectange.Inflate(-textOffset, -textOffset); } - graphics.SmoothingMode = SmoothingMode.HighQuality; using (Brush fontBrush = new SolidBrush(fontColor)) { if (stringFormat != null) { graphics.DrawString(text, font, fontBrush, drawingRectange, stringFormat); diff --git a/Greenshot/Forms/ImageEditorForm.Designer.cs b/Greenshot/Forms/ImageEditorForm.Designer.cs index 2e3c745c3..313d3e127 100644 --- a/Greenshot/Forms/ImageEditorForm.Designer.cs +++ b/Greenshot/Forms/ImageEditorForm.Designer.cs @@ -24,7 +24,8 @@ namespace Greenshot { /// Designer variable used to keep track of non-visual components. /// private System.ComponentModel.IContainer components = null; - + private System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ImageEditorForm)); + /// /// Disposes resources used by the form. /// @@ -46,7 +47,6 @@ namespace Greenshot { /// private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ImageEditorForm)); this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer(); this.statusStrip1 = new System.Windows.Forms.StatusStrip(); this.dimensionsLabel = new System.Windows.Forms.ToolStripStatusLabel(); @@ -406,7 +406,7 @@ namespace Greenshot { // this.btnSpeechBubble.CheckOnClick = true; this.btnSpeechBubble.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.btnSpeechBubble.Image = ((System.Drawing.Image)(resources.GetObject("btnText.Image"))); + this.btnSpeechBubble.Image = ((System.Drawing.Image)(resources.GetObject("btnSpeechBubble.Image"))); this.btnSpeechBubble.ImageTransparentColor = System.Drawing.Color.Magenta; this.btnSpeechBubble.LanguageKey = "editor_drawtextbox"; this.btnSpeechBubble.Name = "btnSpeechBubble"; @@ -417,7 +417,7 @@ namespace Greenshot { // this.btnStepLabel.CheckOnClick = true; this.btnStepLabel.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.btnStepLabel.Image = ((System.Drawing.Image)(resources.GetObject("btnText.Image"))); + this.btnStepLabel.Image = ((System.Drawing.Image)(resources.GetObject("btnStepLabel01.Image"))); this.btnStepLabel.ImageTransparentColor = System.Drawing.Color.Magenta; this.btnStepLabel.LanguageKey = "editor_drawtextbox"; this.btnStepLabel.Name = "btnStepLabel"; diff --git a/Greenshot/Forms/ImageEditorForm.cs b/Greenshot/Forms/ImageEditorForm.cs index bbe86a537..f44be74b7 100644 --- a/Greenshot/Forms/ImageEditorForm.cs +++ b/Greenshot/Forms/ImageEditorForm.cs @@ -996,6 +996,12 @@ namespace Greenshot { /// refreshes all editor controls depending on selected elements and their fields /// private void refreshEditorControls() { + int stepLabels = surface.CountStepLabels(null); + if (stepLabels <= 20) { + this.btnStepLabel.Image = ((System.Drawing.Image)(resources.GetObject(string.Format("btnStepLabel{0:00}.Image", stepLabels)))); + } else { + this.btnStepLabel.Image = ((System.Drawing.Image)(resources.GetObject("btnStepLabel20+.Image"))); + } FieldAggregator props = surface.FieldAggregator; // if a confirmable element is selected, we must disable most of the controls // since we demand confirmation or cancel for confirmable element diff --git a/Greenshot/Forms/ImageEditorForm.resx b/Greenshot/Forms/ImageEditorForm.resx index b12d1ea91..2a5211541 100644 --- a/Greenshot/Forms/ImageEditorForm.resx +++ b/Greenshot/Forms/ImageEditorForm.resx @@ -201,6 +201,18 @@ NSAMYpNkgHn+egWnmh3Vh6+92XAUiEFskBhRhiilrw1UTl+T07TiYvvuiy9W7r78YiWIDRIDyWEYIpe4 wkUheUUriAZJKqQuz7/x9PPxCw8+7Dt2/c0WED5378NekBhIDsMAydiFff///z8DoiVjFpWRgsGGiUTM 8QbiaSCaKD+iKQIAuEYmAAjjsCcAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsIAAA7CARUoSoAAAAFZSURBVDhPY2CgBjAu2+NqVLYrihQM0gO326xqd9Lrj98u + vvz4/RQxGKQWpAdugG31zuwX776f3Hn++Rq3hl31MAwSA2FkMZAakBhID9wAx9pdJa8/fj/nVL+zDCYI + Yj99//04CKOLg9SC9MANcG/YFetav7PGpX6XBUwQZMPT11+OgjCybSA1ILUgPXjD37xqZ8KdF1/2XXv4 + aRuITXJkmZbujj504+XSQ9deLgGxSTbApHRX7OHrb5aBMIhNsgHmlbtSD117vRKEQWySDbCt2lFw+Mbr + NSAMYpNkgHn+egWnmh3Vh6+92XAUiEFskBhRhiilrw1UTl+T07TiYvvuiy9W7r78YiWIDRIDyWEYIpe4 + wkUheUUriAZJKqQuz7/x9PPxCw8+7Dt2/c0WED5378NekBhIDsMAydiFff///z8DoiVjFpWRgsGGiUTM + 8QbiaSCaKD+iKQIAuEYmAAjjsCcAAAAASUVORK5CYII= @@ -927,6 +939,69 @@ igHkZijqZSZyXQAA4IG1TpHFZ2gAAAAASUVORK5CYII= + + ..\icons\notification-counter-01.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\icons\notification-counter-02.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\icons\notification-counter-03.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\icons\notification-counter-04.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\icons\notification-counter-05.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\icons\notification-counter-06.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\icons\notification-counter-07.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\icons\notification-counter-08.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\icons\notification-counter-09.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\icons\notification-counter-10.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\icons\notification-counter-11.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\icons\notification-counter-12.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\icons\notification-counter-13.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\icons\notification-counter-14.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\icons\notification-counter-15.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\icons\notification-counter-16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\icons\notification-counter-17.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\icons\notification-counter-18.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\icons\notification-counter-19.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\icons\notification-counter-20-plus.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\icons\notification-counter-20.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + 551, 17 diff --git a/Greenshot/icons/balloon.png b/Greenshot/icons/balloon.png new file mode 100644 index 0000000000000000000000000000000000000000..6a2640a2c865702bc4f684c078ddf0ffce3f5f57 GIT binary patch literal 625 zcmV-%0*?KOP)x{s4<2c##GLPaZ^1Rlz?%5HHfRAn2iZ5d;OrDzqZBhay6?QVLe_SBVnQ zkd&^vb`!Ii%&gz0b{jRGdhmm{v&?+&&71kYVV>t`QM8g=6hZ(G0+YC##jRy|9pb zKKkOrqic`d?}hu6|2l9$ikm{MoyT^cxpmTvwkIGev}Y+$CTB*I8R^*4f1+bU@4?j5 z;p0t3>*FvjeXiYs@Ngh?bZEc~Hz&XyK$3vue}LwA31+k{kve=~z~=-GghW@{=Ds8< z#b8$<9h7+vE-#=emLO$$`PP*X^jIwEa{_^?gz8Do=&(dAq3F&NF;7PmtL0LRUw;yu zTg>OwJNT4;H=T+1bf-$?H;^8OrmkyPHb!MCWL{-_PS6KJV0`-a#mTRQ`Mj<-!%!pt z#E-?L{M^{RNuLuqkRG!3V($9H)$<~`_t4JH?R$F6mh~;Fs_L~eE>{9`6L+WHPK`fv z9s7pDkVRdi_(`*l{VhB5;O0I;FHOY>`pWv?<*~t;hj(6*(2%CW`mGb|!lF(ap>brj z8ceAO?7DP19VQ=PmBAu`nxjSnjY859pExcw8qfW8ssH^o{uE#U;-213GLA~j00000 LNkvXXu0mjf#t+2P4?_APJ=klZ;DZR_sn5|uT8f}jZJJH8>ugjAmFAL@14DKuGr##@m$cSs zBNkdpYk*xho{6qIz?}fj93U4&x%sjd9GGymhft}>PJl_i?DekvFbp!wf))b4@5Avt z$oYKnG8!oko9rCHR6dBJAkA~Q{XUL|L#)#j*lZx8=$u0?8h2pYCC7nqT`UKK%BP6F zf0iXw)nvmC93n-WENmP5obW5!oVlw4@EQS(-?JD{N(uP`Ncrq51)J~78VDLk$QVex zIMen?99O%0IFZ* zC!!mkGiD8Qwq;G(PS}5ctM%hf!2f&;tpQ&G3;=encF^^l%D?~s002ovPDHLkV1lip Bv9SOE literal 0 HcmV?d00001 diff --git a/Greenshot/icons/notification-counter-02.png b/Greenshot/icons/notification-counter-02.png new file mode 100644 index 0000000000000000000000000000000000000000..d942c80ee488c74ddbd930ae7278ada5da83cd33 GIT binary patch literal 424 zcmV;Z0ayNsP)3c5VFly4qS#i zbMAM~3^Ss&MxJ3H=g18x>?hA6w@1K(1)P~cY>C9_%t$C)vfId0>g6CHEv_~iH?HTE zL&IQI0k-47aa|-q5WEcrin7CiwDYm=mp4%ayWPe~t%je;1mS1|$M?@ExyU?1YFA7X zCcCfueM||u9uBcqY`on+yIe(s7IgC}skPcMJj|ic2h> z_IhwXqc0000zc)YcIE37>x#UoA?Yvl-g~~B@6F%kb9F!03oC>3}m7R`AP-X)hZ_4E_4DEVG(ee_!o#bH3DK6 zi(U^OwHj>CL&%mSV+q)a4mQ*x%afpkT)mFVQVFYmf3Fn*0lycM01Kt2lhJ6FFBC3T zoet*fHFWlVMps|M;cTqb&tC`P@G8Fw@xVSC3@4=C9t8E6>(7r$y&MJn&$o~o@GHOo Xb~Jz8s$Y}!00000NkvXXu0mjfvIDip literal 0 HcmV?d00001 diff --git a/Greenshot/icons/notification-counter-04.png b/Greenshot/icons/notification-counter-04.png new file mode 100644 index 0000000000000000000000000000000000000000..4966b37db0fa54c2ec7ff021a060a41d8a38569a GIT binary patch literal 421 zcmV;W0b2fvP)>*)Oxd z`DVy6r4-7n3zS@?0ebfE%Giwt+?#-F0HMiPnCui0C3;ltsUhWCE+Dzw>i4f5A$Y85 zIO+7+G~w7bq3jwR$#%?}O^%FUg6cJz*0tjDCdaialsrA-mlIpcy z4{;FS0PsRUKr_+Efwov+KOEwHFi3TOHlyZ3Y|du(XNW&a?f2`o&zsG<6)bgK>D P00000NkvXXu0mjfkbSmt literal 0 HcmV?d00001 diff --git a/Greenshot/icons/notification-counter-05.png b/Greenshot/icons/notification-counter-05.png new file mode 100644 index 0000000000000000000000000000000000000000..e566b3f5be4e022fed028a9aaa1863814c9eac5c GIT binary patch literal 423 zcmV;Y0a*TtP)jYu z|1Zpt5CTPpgo2|mpp+JmL>Dq}tpX75rlG3qh?Yz5bvTT8SvDYcHf-Bm`94l3lizuNFhIq&>-=ivwh+f9B@Vnx^mC_! zW5d89r@(%XC<&SK6BVL}%4Mjkn&`9f7`0vx0Ru%Cg0Wg|0>)P)2Izb?ynY{XE6!+y z)piR_mhlCcxqxrh#O@M19(B8@w_5OLGe{g?1OYt$?&JYJg?L{t7MohLdEif{_+V#+ zH&;2;%Y43Zg?Rg$fYL|#f#{O^yy0qutbvW0kKr)kvT3G;bn>xfRlj^6qTNPqFo4qOAoe_{mUYG@=eZWrbxBbW zM-fhK8*jZH>V|<@xeUZHlHHOym#7dW#KkEjjmyypM!yd~3?Wz%pydJ>Uy&FftLiR) z?RKFxoA9?=Btd{5pqdNt*%EQH#@f#3xEhb)&1R5zeZc_t!1A9v_!eUQxm<2e8V$pn zOt9j~3O66|R_}|&#t~w52%!C6`I+d3ecrRokn>QCSDuh(&e1LQ+q9I_yaUObiJIg_B*2VZwOH*Of#Q^Nq; zHZ0dg;QLVP_3CplP;%@%Kr3HFQGJu9XbgwH`*F96%P6{%Wmwt+oi2%LO;nT72=Dzq z)NTi*Z>lJuev&K$5GktF;Cmi;JVw}VBb`n)7@TFu0k;$&c+U`k0nT%<09GeG`vXXrzrW`57}9kw2$1x82&5d-vhXpR z#Y^VRDS(cj@(ah4N{@ng@*qNKpP+>jL};~W(iZv`aDXRdo` z+P1aSG-lxdDak_6BCFnkvP3F5;jgbt>-KCv=fku%k}z&>-%10 z7*rKtI}RMzMG}VLTc@Mgwi}R6-VXxrYq^BeZsV|4!*Vo2)a$_sf>XAfW$qxgE2as> za4CLnG*GNo5hV$*UPEn6X6(QeQDWOD@;;q>-tTYfieeqdAf}k1l%*C=G6nM=hjw=<+heH%n2LyzCUd{q6wEp~6DTknKdCTx)=Buq>K4tyxTI>6rfdBa~wlca1RT@ibI&Vbi)SX6%Z0gjLP5qbo)jIgTQW9c2cSC>6))z zbyo{x43Z3qgd;IP?IzDc+>&;m0`fKxSb%Q};YXepFfio)8$){qtzV7++m8IC%zrZBg=he67-A<#Nk+Vy`zF z1YDj}poBUz5qF)9qd?!w?n^FuDn^)4_}iEPngo{@9rLK0xeRIqHKDs8dNH*eZg5 r;AvyVJl+}ebOiXnZy_<@TYv!oNiu-{j#!t~00000NkvXXu0mjf|82Wg literal 0 HcmV?d00001 diff --git a/Greenshot/icons/notification-counter-11.png b/Greenshot/icons/notification-counter-11.png new file mode 100644 index 0000000000000000000000000000000000000000..e565ed25c0b95c28da237812835bcf082d3d36b3 GIT binary patch literal 447 zcmV;w0YLtVP)g_`m+Dt)gRGr0gz^6jx+e-h<#NjnaL zAOQD$Y$-OJBk(-v*=+tj9Hy!#7e}C-AN(*ZdF?iCM&W(P*I9>mgb$;Z~~^ z1JthGK`OgIJ59UYgEkI9yDs|uY$~OMC7?M`{pSc27(tS64sCUWfFOv^_a&MDh5!oi zuPWe-dB$}io&8cmu8cvPB-uRPY@o;^pmY^LWXBR9q&rCMuG!2!zHha%dD!Vd(Y<_~ zwf^@Ak+nbT`F!P%$Hho%2*%*0T^J0ojAL+GTTy;$?cx-`j!!v#2O4OSlA78pf;=0^ pr&QB_vG(Hv@PGe>+<=_`0|34JjGui|cq0G+002ovPDHLkV1lB!z$gF! literal 0 HcmV?d00001 diff --git a/Greenshot/icons/notification-counter-12.png b/Greenshot/icons/notification-counter-12.png new file mode 100644 index 0000000000000000000000000000000000000000..d361e3cfddd4b673d7ef86316bd85f67a4cd3b51 GIT binary patch literal 466 zcmV;@0WJQCP)B!5oL-rZ)-XfSGbRThSw zy_x;ZH@CY?YmG32BjgATFgDITW0yp`jsPhWa0Q@D##Atqxs>Qp{Fzd3)4u<(2cTf( zyim9hiA3Dv9MNbLhLl*6ugEOZ1fNbPukCiAdLKZQPh~P0H)=J=Y!)x25^UNi%4OKO z92UbN{C+>>1L=eRAdnp~42+x2HQIn-S#UZXJQ73_L@gHZw~GEzK#ng+vb{c5E~s-- z!1H-zibcE)1`wVH7m$Ymj9EVQsg}#t`itySDa2^=Q>z7QG{T8(!vW$4TOcym1W4BF ztMzfU3Pk`;ZDbk^oOQb^_;ly!e-$`d&psxTciHP5IV4puh8R_xRVq;PIU@8eh>x{? z-3GADRSxcf2UJN(+Wk=kwKJ2ADd*-&>$^R`|9uOg0p9`)02@k#k})7Kt^fc407*qo IM6N<$g1^GSXaE2J literal 0 HcmV?d00001 diff --git a/Greenshot/icons/notification-counter-13.png b/Greenshot/icons/notification-counter-13.png new file mode 100644 index 0000000000000000000000000000000000000000..a5096597e6a82aaa16b17d8cc7975aae9a349de2 GIT binary patch literal 469 zcmV;`0V@89P)JP4bUXnSA2vz_PrwV!W46G=&$#qSGG8zphrs=ER2hh%EMm!$jwHl063gcoCVfs*%%Lu2_ zSoZty+Uta} z?|HOZ#mcg9QmNpg)xu}52i0{k+PV7Q7UojEe+-8+quD&3Q=woC8ntB68O#<72wIy` zejw#!8^AVC*?$KvP$eZv=SLCjosoP%HFwuiKI{Sh@4pZj@FlF3YS&rC{*b3(zHaW+8PEnXSBCEC3TWOTscfY2Ee{!GK6M3?s8DfKz)dBY-*1)%|Y8u9r=!c}Wpi_CFfZ1piXwG^KZ_o7~0I8mDIYQRAf`&~x zjZi)htKSc#4FMd$I1OMdPb6^NY6V)NRKf~Ko&*qCkpxIl4g4@` zH8_I-KB`r`mCJ!P@AWV_c>3S_tfZVREo)(PyRnt)f>Y(Akq8(SGD@!Il?v?XbTO9l zb05HVt?c)K3p|pOth03laWK;uQ_jQUI~TSZqdeNr?%?CzLuWDfPGqpy2I!rE)3q zc|Wl%c%BEA%i)XW%C^CU0H4jKuY-Y6y$_(uXKtb3^HvLPxr}+W3Y!{y((7&HMx9Pk z0i}aIFtTmV5p=u1Xbw%4jXe=;(rCbrW2mj7e*mSu1}jyNGWkzucse> zj>q6hg4xd1ZxlpYzkN)np*tKNN0cZSgF{DJk^GP<3)*|9c%b$3Hh`_4vUvvy&?F@# v`J)K&&PX0m&fT@v_j`c<`!8e$d?iM9xWr00000NkvXXu0mjfz@y32 literal 0 HcmV?d00001 diff --git a/Greenshot/icons/notification-counter-16.png b/Greenshot/icons/notification-counter-16.png new file mode 100644 index 0000000000000000000000000000000000000000..f1f1234a13334a1a3ca2866cce1220c4ddf1dea4 GIT binary patch literal 465 zcmV;?0WSWDP)cjR_42J_14l(f9#m?{3#QJ`4igRcwc%Mhs)#`!!1CF1G| zCz%YKejn&`;tELYJp*61$vFnq>I%)_kdk9cekm02R;xiv3AIu54}eycMUsz5`odw+ z&W)uzS+65pEJDubZ~?I&z}SJJeLAZoNw)5g=Ufhl=``eQhA9x)3m~$g2@tDP7XPQE z5)7p<>-BKnZsWV#1@}CRwyyqnKU1yWzlOt4(Q1XK6ll=_`Zpn)O^m6sMQb1AA80+< z1h920`+eX6B~p@bmx|zQ&13_Lxx3c-VF&Pk-$G!(j{pMzvf_a$HYm@M00000NkvXX Hu0mjf{FKB1 literal 0 HcmV?d00001 diff --git a/Greenshot/icons/notification-counter-17.png b/Greenshot/icons/notification-counter-17.png new file mode 100644 index 0000000000000000000000000000000000000000..eeab4ba69c5fbe9de12da1489756700ae00e4ef8 GIT binary patch literal 462 zcmV;<0WtoGP)iIyR%GdjVR4P#16O}0H+If8;z~p zakZLKK>Fw%gtAS}F{syn(Hs^j_-?oHT&qFN=TM6U)Xt%Q0JN%v;~+uOR}PXKBY^I7 z;N^0dcDoQk03UFU0~oWFWkDM2r6pNdBTFff$YwDmCEWKh1KgtkA{&|jUZt{{pOs3G zv{}<8gOs7ygF*Ar-qUaMnQ8s`H5^WyR_kO&QUznMDTOehaj}TgSPZZI{$!x_`!0ZO zN;#~904R}?w7*sax!02oDCX{3>xTot|NRS*0Y3r^0H^hYadvg#V*mgE07*qoM6N<$ Ef@J^5DF6Tf literal 0 HcmV?d00001 diff --git a/Greenshot/icons/notification-counter-18.png b/Greenshot/icons/notification-counter-18.png new file mode 100644 index 0000000000000000000000000000000000000000..263f736c9dfd436686d3c14ec2febef151470de9 GIT binary patch literal 472 zcmV;}0Vn>6P)~hymCFkOpJYo5^fSbSVBzskc$reb@p} z@cJZ~JQtym#ScDmiVU)`uz!-Qw z4=a(tyw`) O0000aR?*|glG~fH~|+(MY9EnibEi!Op^-Ez(WdB1PGRW*ctPP2+(bnkw%`i z$KU+3wwY22QOrO@iwxk0;GMB&qP@g`v2xx49Ig5sK$Y*URLbV{I;?CKU*$65jDc4wu=9Di zg8^i(mzF^0;y=)`W1M5uZ0^wYsjObe-uz41xdc%AFCn6R<=7F z;<4S{&dJRN0bpHJz!{56+MxT@=IOSmg?X!mL9w_?@;s~n`yznIh9W?!(b#_9)oSp3 zAGg&ia@{WG{XT@0n4TQ{Zwo7>zL%59!s>KxR$&N1)lF*2a~v#P7lP*IUd&C8*ov>%3Wq=aqT%&-icR0=6VB$H4v^MycAsXSFnC5O4!T0$#?z7BV43ZFrMXOcLJi)fIj!#N40A)sb52)J`|m_9wl`}sK>$1y^CC`CuR z(?Ra=5Pq$O@lpwXtA!9ShY~bF`XtB}3b^0f!^g!1g z-PxV__M4w&oO2u_5{{Ik0etJt6Ju9|b}IwtD&Q)BqcY}*mDDB21>Jv=Yc=9|FM9xV zc^6HkE|qXNG-C|9-w#dKDbfc=lAx(7B-88-%4NZN0{~G(q0e+U&Sbb%uX7<*v&qd| zj@zx)(w?;2+%^pU!Pvt(M(Cyng0`e67#0e6O{Z~^NMK6m{&*a3*(~%}4AaR3-WKaW zDbU8_1fVCAh+bb~T&qDNTZk^L-tlHLxMUs%U`(6KGC~ymUM%9Y(}DaOXwl2dbmw!} zKRQClacf_kzSd9i$&x5(s`V9k{^P$u4k4AHow large (height) is each tooth /// How wide is a horizontal tooth /// How wide is a vertical tooth + /// bool[] with information on if the edge needs torn or not. Order is clockwise: 0=top,1=right,2=bottom,3=left /// Changed bitmap - public static Image CreateTornEdge(Image sourceImage, int toothHeight, int horizontalToothRange, int verticalToothRange) { + public static Image CreateTornEdge(Image sourceImage, int toothHeight, int horizontalToothRange, int verticalToothRange, bool[] edges) { Image returnImage = CreateEmpty(sourceImage.Width, sourceImage.Height, PixelFormat.Format32bppArgb, Color.Empty, sourceImage.HorizontalResolution, sourceImage.VerticalResolution); using (GraphicsPath path = new GraphicsPath()) { Random random = new Random(); @@ -456,43 +457,66 @@ namespace GreenshotPlugin.Core { int VerticalRegions = (int)(sourceImage.Height / verticalToothRange); // Start - Point previousEndingPoint = new Point(horizontalToothRange, random.Next(1, toothHeight)); + Point previousEndingPoint = new Point(0,0); Point newEndingPoint; - // Top - for (int i = 0; i < HorizontalRegions; i++) { - int x = (int)previousEndingPoint.X + horizontalToothRange; - int y = random.Next(1, toothHeight); - newEndingPoint = new Point(x, y); + if (edges[0]) { + previousEndingPoint = new Point(horizontalToothRange, random.Next(1, toothHeight)); + // Top + for (int i = 0; i < HorizontalRegions; i++) { + int x = (int)previousEndingPoint.X + horizontalToothRange; + int y = random.Next(1, toothHeight); + newEndingPoint = new Point(x, y); + path.AddLine(previousEndingPoint, newEndingPoint); + previousEndingPoint = newEndingPoint; + } + } else { + newEndingPoint = new Point(sourceImage.Width, 0); + path.AddLine(previousEndingPoint, newEndingPoint); + previousEndingPoint = newEndingPoint; + } + if (edges[1]) { + // Right + for (int i = 0; i < VerticalRegions; i++) { + int x = sourceImage.Width - random.Next(1, toothHeight); + int y = (int)previousEndingPoint.Y + verticalToothRange; + newEndingPoint = new Point(x, y); + path.AddLine(previousEndingPoint, newEndingPoint); + previousEndingPoint = newEndingPoint; + } + } else { + newEndingPoint = new Point(sourceImage.Width, sourceImage.Height); + path.AddLine(previousEndingPoint, newEndingPoint); + previousEndingPoint = newEndingPoint; + } + if (edges[2]) { + // Bottom + for (int i = 0; i < HorizontalRegions; i++) { + int x = (int)previousEndingPoint.X - horizontalToothRange; + int y = sourceImage.Height - random.Next(1, toothHeight); + newEndingPoint = new Point(x, y); + path.AddLine(previousEndingPoint, newEndingPoint); + previousEndingPoint = newEndingPoint; + } + } else { + newEndingPoint = new Point(0, sourceImage.Height); + path.AddLine(previousEndingPoint, newEndingPoint); + previousEndingPoint = newEndingPoint; + } + if (edges[3]) { + // Left + for (int i = 0; i < VerticalRegions; i++) { + int x = random.Next(1, toothHeight); + int y = (int)previousEndingPoint.Y - verticalToothRange; + newEndingPoint = new Point(x, y); + path.AddLine(previousEndingPoint, newEndingPoint); + previousEndingPoint = newEndingPoint; + } + } else { + newEndingPoint = new Point(0, 0); path.AddLine(previousEndingPoint, newEndingPoint); previousEndingPoint = newEndingPoint; } - // Right - for (int i = 0; i < VerticalRegions; i++) { - int x = sourceImage.Width - random.Next(1, toothHeight); - int y = (int)previousEndingPoint.Y + verticalToothRange; - newEndingPoint = new Point(x, y); - path.AddLine(previousEndingPoint, newEndingPoint); - previousEndingPoint = newEndingPoint; - } - - // Bottom - for (int i = 0; i < HorizontalRegions; i++) { - int x = (int)previousEndingPoint.X - horizontalToothRange; - int y = sourceImage.Height - random.Next(1, toothHeight); - newEndingPoint = new Point(x, y); - path.AddLine(previousEndingPoint, newEndingPoint); - previousEndingPoint = newEndingPoint; - } - - // Left - for (int i = 0; i < VerticalRegions; i++) { - int x = random.Next(1, toothHeight); - int y = (int)previousEndingPoint.Y - verticalToothRange; - newEndingPoint = new Point(x, y); - path.AddLine(previousEndingPoint, newEndingPoint); - previousEndingPoint = newEndingPoint; - } path.CloseFigure(); // Draw the created figure with the original image by using a TextureBrush so we have anti-aliasing diff --git a/GreenshotPlugin/Interfaces/Generic.cs b/GreenshotPlugin/Interfaces/Generic.cs index 5b52aa6d7..fa5110b1b 100644 --- a/GreenshotPlugin/Interfaces/Generic.cs +++ b/GreenshotPlugin/Interfaces/Generic.cs @@ -199,8 +199,8 @@ namespace Greenshot.Plugin { set; } - LinkedList StepContainers { - get; - } + void AddStepLabel(IDrawableContainer stepLabel); + void RemoveStepLabel(IDrawableContainer stepLabel); + int CountStepLabels(IDrawableContainer stopCountingOnStepLabel); } } \ No newline at end of file