mirror of
https://github.com/greenshot/greenshot
synced 2025-08-21 22:13:23 -07:00
Cleanup
This commit is contained in:
parent
31532b4c58
commit
9372ac5331
4 changed files with 8 additions and 13 deletions
|
@ -99,7 +99,6 @@ namespace Greenshot.Base.Interfaces
|
|||
IImageContainer AddImageContainer(string filename, int x, int y);
|
||||
ICursorContainer AddCursorContainer(string filename, int x, int y);
|
||||
IIconContainer AddIconContainer(string filename, int x, int y);
|
||||
IEmojiContainer AddEmojiContainer(string emoji, int x, int y, int size);
|
||||
long SaveElementsToStream(Stream stream);
|
||||
void LoadElementsFromStream(Stream stream);
|
||||
|
||||
|
|
|
@ -534,7 +534,7 @@ namespace Greenshot.Editor.Drawing
|
|||
_boundsAfterResize = new NativeRectFloat(_boundsBeforeResize.Left, _boundsBeforeResize.Top, x - _boundsAfterResize.Left, y - _boundsAfterResize.Top);
|
||||
|
||||
var scaleOptions = (this as IHaveScaleOptions)?.GetScaleOptions();
|
||||
_boundsAfterResize = ScaleHelper.Scale(_boundsAfterResize, x, y,GetAngleRoundProcessor(), scaleOptions);
|
||||
_boundsAfterResize = ScaleHelper.Scale(_boundsAfterResize, x, y, GetAngleRoundProcessor(), scaleOptions);
|
||||
|
||||
// apply scaled bounds to this DrawableContainer
|
||||
ApplyBounds(_boundsAfterResize);
|
||||
|
|
|
@ -56,11 +56,7 @@ namespace Greenshot.Editor.Drawing.Emoji
|
|||
}
|
||||
}
|
||||
|
||||
public EmojiContainer(Surface parent) : this(parent, "🙂", size: 64)
|
||||
{
|
||||
}
|
||||
|
||||
public EmojiContainer(Surface parent, string emoji, int size) : base(parent)
|
||||
public EmojiContainer(Surface parent, string emoji, int size = 64) : base(parent)
|
||||
{
|
||||
Emoji = emoji;
|
||||
Width = size;
|
||||
|
|
|
@ -28,7 +28,7 @@ using System.Drawing.Imaging;
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using System.ServiceModel.Security;
|
||||
using System.ServiceModel.Security;
|
||||
using System.Windows.Forms;
|
||||
using Dapplo.Windows.Common.Extensions;
|
||||
using Dapplo.Windows.Common.Structs;
|
||||
|
@ -42,7 +42,7 @@ using Greenshot.Base.Interfaces.Drawing.Adorners;
|
|||
using Greenshot.Editor.Configuration;
|
||||
using Greenshot.Editor.Drawing.Emoji;
|
||||
using Greenshot.Editor.Drawing.Fields;
|
||||
using Greenshot.Editor.Helpers;
|
||||
using Greenshot.Editor.Helpers;
|
||||
using Greenshot.Editor.Memento;
|
||||
using log4net;
|
||||
|
||||
|
@ -735,9 +735,9 @@ namespace Greenshot.Editor.Drawing
|
|||
SelectElements(loadedElements);
|
||||
FieldAggregator.BindElements(loadedElements);
|
||||
}
|
||||
catch (SecurityAccessDeniedException)
|
||||
{
|
||||
throw;
|
||||
catch (SecurityAccessDeniedException)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -800,7 +800,7 @@ namespace Greenshot.Editor.Drawing
|
|||
_undrawnElement = null;
|
||||
break;
|
||||
case DrawingModes.Emoji:
|
||||
_undrawnElement = new EmojiContainer(this);
|
||||
_undrawnElement = new EmojiContainer(this, "🙂");
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue