mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
Refactoring the interop code to a separate project. Still need to add the interop DLL to the final exe... or maybe I want to use references inside the projects...
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1690 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
0aa8e43478
commit
5f9deb2f06
67 changed files with 564 additions and 502 deletions
|
@ -32,6 +32,7 @@ using Greenshot.Plugin;
|
|||
using GreenshotPlugin.Core;
|
||||
using Greenshot.Plugin.Drawing;
|
||||
using Greenshot.Memento;
|
||||
using System.Drawing.Drawing2D;
|
||||
|
||||
namespace Greenshot.Drawing {
|
||||
/// <summary>
|
||||
|
@ -597,6 +598,17 @@ namespace Greenshot.Drawing {
|
|||
if (RotateFlipType.Rotate90FlipNone == rotateFlipType) {
|
||||
angle = 270;
|
||||
}
|
||||
|
||||
Rectangle beforeBounds = new Rectangle(Left, Top, Width, Height);
|
||||
LOG.DebugFormat("Bounds before: {0}", beforeBounds);
|
||||
GraphicsPath translatePath = new GraphicsPath();
|
||||
translatePath.AddRectangle(beforeBounds);
|
||||
Matrix rotateMatrix = new Matrix();
|
||||
rotateMatrix.RotateAt(angle, new PointF(parent.Width >> 1, parent.Height >> 1));
|
||||
translatePath.Transform(rotateMatrix);
|
||||
RectangleF newBounds = translatePath.GetBounds();
|
||||
LOG.DebugFormat("New bounds by using graphics path: {0}", newBounds);
|
||||
|
||||
int ox = 0;
|
||||
int oy = 0;
|
||||
int centerX = parent.Width >> 1;
|
||||
|
@ -632,6 +644,7 @@ namespace Greenshot.Drawing {
|
|||
(float)newHeight
|
||||
);
|
||||
ApplyBounds(newRectangle);
|
||||
LOG.DebugFormat("New bounds by using old method: {0}", newRectangle);
|
||||
}
|
||||
|
||||
protected virtual ScaleHelper.IDoubleProcessor GetAngleRoundProcessor() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue