diff --git a/Greenshot/Forms/CaptureForm.cs b/Greenshot/Forms/CaptureForm.cs
index 098cb0a9d..1404077a0 100644
--- a/Greenshot/Forms/CaptureForm.cs
+++ b/Greenshot/Forms/CaptureForm.cs
@@ -240,15 +240,16 @@ namespace Greenshot.Forms {
capture.CursorVisible = !capture.CursorVisible;
Invalidate();
break;
- case Keys.V:
- // Video
- if (capture.CaptureDetails.CaptureMode != CaptureMode.Video) {
- capture.CaptureDetails.CaptureMode = CaptureMode.Video;
- } else {
- capture.CaptureDetails.CaptureMode = captureMode;
- }
- Invalidate();
- break;
+ //// TODO: Enable when the screen capture code works reliable
+ //case Keys.V:
+ // // Video
+ // if (capture.CaptureDetails.CaptureMode != CaptureMode.Video) {
+ // capture.CaptureDetails.CaptureMode = CaptureMode.Video;
+ // } else {
+ // capture.CaptureDetails.CaptureMode = captureMode;
+ // }
+ // Invalidate();
+ // break;
case Keys.Z:
if (captureMode == CaptureMode.Region) {
// Toggle zoom
@@ -682,11 +683,12 @@ namespace Greenshot.Forms {
fixedRect = captureRect;
}
- if (capture.CaptureDetails.CaptureMode == CaptureMode.Video) {
- graphics.FillRectangle(RedOverlayBrush, fixedRect);
- } else {
+ // TODO: enable when the screen capture code works reliable
+ //if (capture.CaptureDetails.CaptureMode == CaptureMode.Video) {
+ // graphics.FillRectangle(RedOverlayBrush, fixedRect);
+ //} else {
graphics.FillRectangle(GreenOverlayBrush, fixedRect);
- }
+ //}
graphics.DrawRectangle(OverlayPen, fixedRect);
// rulers
diff --git a/Greenshot/Forms/ImageEditorForm.cs b/Greenshot/Forms/ImageEditorForm.cs
index 2d52723b5..01987b9af 100644
--- a/Greenshot/Forms/ImageEditorForm.cs
+++ b/Greenshot/Forms/ImageEditorForm.cs
@@ -1203,13 +1203,19 @@ namespace Greenshot {
updateUndoRedoSurfaceDependencies();
}
+ ///
+ /// This is used when the dropshadow button is used
+ ///
+ ///
+ ///
void AddDropshadowToolStripMenuItemClick(object sender, EventArgs e) {
DropShadowEffect dropShadowEffect= new DropShadowEffect();
- DialogResult result = new DropShadowSettingsForm(dropShadowEffect).ShowDialog(this);
- if (result == DialogResult.OK) {
+ // TODO: Use the dropshadow settings form to make it possible to change the default values
+ //DialogResult result = new DropShadowSettingsForm(dropShadowEffect).ShowDialog(this);
+ //if (result == DialogResult.OK) {
surface.ApplyBitmapEffect(dropShadowEffect);
updateUndoRedoSurfaceDependencies();
- }
+ //}
}
///
@@ -1219,20 +1225,27 @@ namespace Greenshot {
///
void ResizeToolStripMenuItemClick(object sender, EventArgs e) {
ResizeEffect resizeEffect = new ResizeEffect(surface.Image.Width, surface.Image.Height, true);
- DialogResult result = new ResizeSettingsForm(resizeEffect).ShowDialog(this);
- if (result == DialogResult.OK) {
+ // TODO: Use the Resize SettingsForm to make it possible to change the default values
+ // DialogResult result = new ResizeSettingsForm(resizeEffect).ShowDialog(this);
+ // if (result == DialogResult.OK) {
surface.ApplyBitmapEffect(resizeEffect);
updateUndoRedoSurfaceDependencies();
- }
+ //}
}
+ ///
+ /// Call the torn edge effect
+ ///
+ ///
+ ///
void TornEdgesToolStripMenuItemClick(object sender, EventArgs e) {
TornEdgeEffect tornEdgeEffect = new TornEdgeEffect();
- DialogResult result = new TornEdgeSettingsForm(tornEdgeEffect).ShowDialog(this);
- if (result == DialogResult.OK) {
- surface.ApplyBitmapEffect(tornEdgeEffect);
- updateUndoRedoSurfaceDependencies();
- }
+ // TODO: Use the dropshadow settings form to make it possible to change the default values
+ //DialogResult result = new TornEdgeSettingsForm(tornEdgeEffect).ShowDialog(this);
+ //if (result == DialogResult.OK) {
+ surface.ApplyBitmapEffect(tornEdgeEffect);
+ updateUndoRedoSurfaceDependencies();
+ //}
}
void GrayscaleToolStripMenuItemClick(object sender, EventArgs e) {
diff --git a/Greenshot/Greenshot.csproj b/Greenshot/Greenshot.csproj
index 21c7908c9..daee7b939 100644
--- a/Greenshot/Greenshot.csproj
+++ b/Greenshot/Greenshot.csproj
@@ -134,12 +134,12 @@
CaptureForm.cs
-
+
Form
-
-
+
+
DropShadowSettingsForm.cs
-
+
Form
@@ -149,18 +149,18 @@
Form
-
+
Form
-
-
+
+
ResizeSettingsForm.cs
-
-
+
+
Form
-
-
+
+
TornEdgeSettingsForm.cs
-
+
Form
@@ -201,7 +201,7 @@
MovableShowColorForm.cs
-
+
@@ -224,7 +224,7 @@
-
+
diff --git a/Greenshot/Helpers/CaptureHelper.cs b/Greenshot/Helpers/CaptureHelper.cs
index 202ee5a99..a8af76521 100644
--- a/Greenshot/Helpers/CaptureHelper.cs
+++ b/Greenshot/Helpers/CaptureHelper.cs
@@ -45,7 +45,8 @@ namespace Greenshot.Helpers {
public class CaptureHelper {
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(CaptureHelper));
private static CoreConfiguration conf = IniConfig.GetIniSection();
- private static ScreenCaptureHelper screenCapture = null;
+ // TODO: when we get the screen capture code working correctly, this needs to be enabled
+ //private static ScreenCaptureHelper screenCapture = null;
private List windows = new List();
private WindowDetails selectedCaptureWindow = null;
private Rectangle captureRect = Rectangle.Empty;
@@ -173,11 +174,12 @@ namespace Greenshot.Helpers {
///
private void MakeCapture() {
// Experimental code
- if (screenCapture != null) {
- screenCapture.Stop();
- screenCapture = null;
- return;
- }
+ // TODO: when we get the screen capture code working correctly, this needs to be enabled
+ //if (screenCapture != null) {
+ // screenCapture.Stop();
+ // screenCapture = null;
+ // return;
+ //}
// This fixes a problem when a balloon is still visible and a capture needs to be taken
// forcefully removes the balloon!
if (!conf.HideTrayicon) {
@@ -492,22 +494,23 @@ namespace Greenshot.Helpers {
return getWindowDetailsThread;
}
- private void AddCaptureElementsForWindow(ICaptureElement parentElement, WindowDetails parentWindow, int level) {
- foreach(WindowDetails childWindow in parentWindow.Children) {
- // Make sure the details are retrieved once
- childWindow.FreezeDetails();
- Rectangle childRectangle = childWindow.WindowRectangle;
- Size s1 = childRectangle.Size;
- childRectangle.Intersect(parentElement.Bounds);
- if (childRectangle.Width > 0 && childRectangle.Height > 0) {
- CaptureElement childCaptureElement = new CaptureElement(childRectangle);
- parentElement.Children.Add(childCaptureElement);
- if (level > 0) {
- AddCaptureElementsForWindow(childCaptureElement, childWindow, level -1);
- }
- }
- }
- }
+ // Code used to get the capture elements, which is not active yet
+ //private void AddCaptureElementsForWindow(ICaptureElement parentElement, WindowDetails parentWindow, int level) {
+ // foreach(WindowDetails childWindow in parentWindow.Children) {
+ // // Make sure the details are retrieved once
+ // childWindow.FreezeDetails();
+ // Rectangle childRectangle = childWindow.WindowRectangle;
+ // Size s1 = childRectangle.Size;
+ // childRectangle.Intersect(parentElement.Bounds);
+ // if (childRectangle.Width > 0 && childRectangle.Height > 0) {
+ // CaptureElement childCaptureElement = new CaptureElement(childRectangle);
+ // parentElement.Children.Add(childCaptureElement);
+ // if (level > 0) {
+ // AddCaptureElementsForWindow(childCaptureElement, childWindow, level -1);
+ // }
+ // }
+ // }
+ //}
private void AddConfiguredDestination() {
foreach(string destinationDesignation in conf.OutputDestinations) {
@@ -910,23 +913,24 @@ namespace Greenshot.Helpers {
//}
// Experimental code for Video capture
- if (capture.CaptureDetails.CaptureMode == CaptureMode.Video) {
- if (captureForm.UsedCaptureMode == CaptureMode.Window) {
- screenCapture = new ScreenCaptureHelper(selectedCaptureWindow);
- } else if (captureForm.UsedCaptureMode == CaptureMode.Region) {
- screenCapture = new ScreenCaptureHelper(captureRect);
- }
- if (screenCapture != null) {
- screenCapture.RecordMouse = capture.CursorVisible;
- if (screenCapture.Start(25)) {
- return;
- }
- // User clicked cancel or a problem occured
- screenCapture.Stop();
- screenCapture = null;
- return;
- }
- }
+ // TODO: when we get the screen capture code working correctly, this needs to be enabled
+ //if (capture.CaptureDetails.CaptureMode == CaptureMode.Video) {
+ // if (captureForm.UsedCaptureMode == CaptureMode.Window) {
+ // screenCapture = new ScreenCaptureHelper(selectedCaptureWindow);
+ // } else if (captureForm.UsedCaptureMode == CaptureMode.Region) {
+ // screenCapture = new ScreenCaptureHelper(captureRect);
+ // }
+ // if (screenCapture != null) {
+ // screenCapture.RecordMouse = capture.CursorVisible;
+ // if (screenCapture.Start(25)) {
+ // return;
+ // }
+ // // User clicked cancel or a problem occured
+ // screenCapture.Stop();
+ // screenCapture = null;
+ // return;
+ // }
+ //}
// Take the captureRect, this already is specified as bitmap coordinates
capture.Crop(captureRect);
diff --git a/GreenshotPlugin/Core/Effects.cs b/GreenshotPlugin/Core/Effects.cs
index bbca4a9b5..2220df108 100644
--- a/GreenshotPlugin/Core/Effects.cs
+++ b/GreenshotPlugin/Core/Effects.cs
@@ -185,10 +185,10 @@ namespace Greenshot.Core {
}
///
- /// GrowEffect
+ /// ResizeCanvasEffect
///
- public class GrowEffect : IEffect {
- public GrowEffect(int left, int right, int top, int bottom) {
+ public class ResizeCanvasEffect : IEffect {
+ public ResizeCanvasEffect(int left, int right, int top, int bottom) {
Left = left;
Right = right;
Top = top;
@@ -218,7 +218,7 @@ namespace Greenshot.Core {
public Bitmap Apply(Bitmap sourceBitmap, out Point offsetChange) {
// Make sure the elements move according to the offset the effect made the bitmap move
offsetChange = new Point(Left, Top);
- return ImageHelper.GrowCanvas(sourceBitmap, BackgroundColor, Left, Right, Top, Bottom);
+ return ImageHelper.ResizeCanvas(sourceBitmap, BackgroundColor, Left, Right, Top, Bottom);
}
}
}
\ No newline at end of file
diff --git a/GreenshotPlugin/Core/ImageHelper.cs b/GreenshotPlugin/Core/ImageHelper.cs
index 780049a63..995b87bf2 100644
--- a/GreenshotPlugin/Core/ImageHelper.cs
+++ b/GreenshotPlugin/Core/ImageHelper.cs
@@ -1234,7 +1234,7 @@ namespace GreenshotPlugin.Core {
}
///
- /// Grow canvas with pixel to the left, right, top and bottom
+ /// Resize canvas with pixel to the left, right, top and bottom
///
///
/// The color to fill with, or Color.Empty to take the default depending on the pixel format
@@ -1243,7 +1243,7 @@ namespace GreenshotPlugin.Core {
///
///
/// a new bitmap with the source copied on it
- public static Bitmap GrowCanvas(Bitmap sourceBitmap, Color backgroundColor, int left, int right, int top, int bottom) {
+ public static Bitmap ResizeCanvas(Bitmap sourceBitmap, Color backgroundColor, int left, int right, int top, int bottom) {
Bitmap newBitmap = CreateEmpty(sourceBitmap.Width + left + right, sourceBitmap.Height + top + bottom, sourceBitmap.PixelFormat, backgroundColor, sourceBitmap.HorizontalResolution, sourceBitmap.VerticalResolution);
using (Graphics graphics = Graphics.FromImage(newBitmap)) {
graphics.DrawImageUnscaled(sourceBitmap, left, top);
diff --git a/GreenshotPlugin/Interfaces/Capture.cs b/GreenshotPlugin/Interfaces/Capture.cs
index 53b682df3..b341eeaac 100644
--- a/GreenshotPlugin/Interfaces/Capture.cs
+++ b/GreenshotPlugin/Interfaces/Capture.cs
@@ -26,7 +26,7 @@ namespace Greenshot.Plugin {
///
/// The capture mode for Greenshot
///
- public enum CaptureMode { None, Region, FullScreen, ActiveWindow, Window, LastRegion, Clipboard, File, IE, Import, Video };
+ public enum CaptureMode { None, Region, FullScreen, ActiveWindow, Window, LastRegion, Clipboard, File, IE, Import}; //, Video };
public enum ScreenCaptureMode { Auto, FullScreen, Fixed};
///