This commit is contained in:
Julien Richard 2023-08-12 17:07:37 +02:00
commit 9372ac5331
No known key found for this signature in database
4 changed files with 8 additions and 13 deletions

View file

@ -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);

View file

@ -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);

View file

@ -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;

View file

@ -800,7 +800,7 @@ namespace Greenshot.Editor.Drawing
_undrawnElement = null;
break;
case DrawingModes.Emoji:
_undrawnElement = new EmojiContainer(this);
_undrawnElement = new EmojiContainer(this, "🙂");
break;
}