mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
Added an edge effect to see how and where we place them.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1638 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
034daa3957
commit
a52e83dc45
2 changed files with 102 additions and 2 deletions
|
@ -521,7 +521,20 @@ namespace Greenshot.Drawing {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public void ApplyBitmapEffect() {
|
||||
Rectangle cropRectangle = new Rectangle(Point.Empty, Image.Size);
|
||||
Bitmap tmpImage = ((Bitmap)Image).Clone(cropRectangle, Image.PixelFormat);
|
||||
tmpImage.SetResolution(Image.HorizontalResolution, Image.VerticalResolution);
|
||||
|
||||
// Currently only one effect exists, others could follow
|
||||
ImageHelper.ApplyTornEdge(tmpImage);
|
||||
|
||||
// Make undoable
|
||||
MakeUndoable(new SurfaceCropMemento(this, cropRectangle), false);
|
||||
SetImage(tmpImage, false);
|
||||
}
|
||||
|
||||
public bool isCropPossible(ref Rectangle cropRectangle) {
|
||||
cropRectangle = Helpers.GuiRectangle.GetGuiRectangle(cropRectangle.Left, cropRectangle.Top, cropRectangle.Width, cropRectangle.Height);
|
||||
if (cropRectangle.Left < 0) cropRectangle = new Rectangle(0, cropRectangle.Top, cropRectangle.Width + cropRectangle.Left, cropRectangle.Height);
|
||||
|
@ -738,7 +751,7 @@ namespace Greenshot.Drawing {
|
|||
selectedElements.OnDoubleClick();
|
||||
selectedElements.Invalidate();
|
||||
}
|
||||
|
||||
|
||||
private Image GetImage(RenderMode renderMode) {
|
||||
// Generate a copy of the original image with a dpi equal to the default...
|
||||
Bitmap clone = ImageHelper.CloneImageToBitmap(Image);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue