Skip to content

Commit 7bc2b99

Browse files
committed
2.4.1.3 - Removed extra DrawRectangle call from pictureBoxMouseCanvas_MouseUp in FormRegionSelectWithMouse which means that GetBitmapFromRegionSelect and _formRegionSelectWithMouse_RegionSelectMouseSelectionCompleted no longer need to artificially change the X, Y, Width, and Height values after mouse selection has completed.
1 parent 4e4dd61 commit 7bc2b99

File tree

8 files changed

+25
-20
lines changed

8 files changed

+25
-20
lines changed

AutoScreenCaptureSetup/AutoScreenCaptureSetup.vdproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,15 +233,15 @@
233233
{
234234
"Name" = "8:Microsoft Visual Studio"
235235
"ProductName" = "8:Auto Screen Capture"
236-
"ProductCode" = "8:{A3C76940-36FD-4ACE-A23E-EBA75E2744D4}"
237-
"PackageCode" = "8:{4BC699BE-CAE8-4BE3-9CE3-8F6DCC9CE08E}"
236+
"ProductCode" = "8:{A39FED41-4E02-450A-9148-96090F1677F9}"
237+
"PackageCode" = "8:{6006D0E9-7E33-4012-8174-10FB01284BD4}"
238238
"UpgradeCode" = "8:{6B29B7BC-0101-4495-B28C-26B6D3CDCC02}"
239239
"AspNetVersion" = "8:4.0.30319.0"
240240
"RestartWWWService" = "11:FALSE"
241241
"RemovePreviousVersions" = "11:TRUE"
242242
"DetectNewerInstalledVersion" = "11:TRUE"
243243
"InstallAllUsers" = "11:FALSE"
244-
"ProductVersion" = "8:2.4.12"
244+
"ProductVersion" = "8:2.4.13"
245245
"Manufacturer" = "8:Gavin Kendall"
246246
"ARPHELPTELEPHONE" = "8:"
247247
"ARPHELPLINK" = "8:https://sourceforge.net/p/autoscreen/tickets/"

Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("2.4.1.2")]
36-
[assembly: AssemblyFileVersion("2.4.1.2")]
35+
[assembly: AssemblyVersion("2.4.1.3")]
36+
[assembly: AssemblyFileVersion("2.4.1.3")]
3737
[assembly: NeutralResourcesLanguageAttribute("en-CA")]

app.manifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<assemblyIdentity
44
type="win32"
55
name="GavinKendall.AutoScreenCapture"
6-
version="2.4.1.2"/>
6+
version="2.4.1.3"/>
77
<asmv3:application>
88
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
99
<dpiAware>True/PM</dpiAware>

interface/about/FormAbout.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

interface/main/FormMain-ScreenCapture.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -493,10 +493,10 @@ private void toolStripMenuItemRegionSelectOptions_Click(object sender, EventArgs
493493
/// <returns>The bitmap image from the Region Select canvas.</returns>
494494
private Bitmap GetBitmapFromRegionSelect()
495495
{
496-
int x = _formRegionSelectWithMouse.outputX + 1;
497-
int y = _formRegionSelectWithMouse.outputY + 1;
498-
int width = _formRegionSelectWithMouse.outputWidth - 2;
499-
int height = _formRegionSelectWithMouse.outputHeight - 2;
496+
int x = _formRegionSelectWithMouse.outputX;
497+
int y = _formRegionSelectWithMouse.outputY;
498+
int width = _formRegionSelectWithMouse.outputWidth;
499+
int height = _formRegionSelectWithMouse.outputHeight;
500500

501501
if (_screenCapture.GetScreenImages(source: -1, component: -1, captureMethod: 1, autoAdapt: false, x, y, width, height, resolutionRatio: 100, mouse: false, out Bitmap bitmap))
502502
{

interface/region/FormRegion.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -459,10 +459,10 @@ private void buttonRegionSelect_Click(object sender, EventArgs e)
459459

460460
private void _formRegionSelectWithMouse_RegionSelectMouseSelectionCompleted(object sender, EventArgs e)
461461
{
462-
int x = _formRegionSelectWithMouse.outputX + 1;
463-
int y = _formRegionSelectWithMouse.outputY + 1;
464-
int width = _formRegionSelectWithMouse.outputWidth - 2;
465-
int height = _formRegionSelectWithMouse.outputHeight - 2;
462+
int x = _formRegionSelectWithMouse.outputX;
463+
int y = _formRegionSelectWithMouse.outputY;
464+
int width = _formRegionSelectWithMouse.outputWidth;
465+
int height = _formRegionSelectWithMouse.outputHeight;
466466

467467
numericUpDownX.Value = x;
468468
numericUpDownY.Value = y;

interface/region_select/FormRegionSelectWithMouse.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,10 @@ public void LoadCanvas(bool sendToClipboard)
149149
/// <param name="e"></param>
150150
private void pictureBoxMouseCanvas_MouseMove(object sender, MouseEventArgs e)
151151
{
152-
if (pictureBoxMouseCanvas.Image == null || _selectPen == null) return;
152+
if (pictureBoxMouseCanvas.Image == null || _selectPen == null)
153+
{
154+
return;
155+
}
153156

154157
pictureBoxMouseCanvas.Refresh();
155158

@@ -187,16 +190,17 @@ private void pictureBoxMouseCanvas_MouseDown(object sender, MouseEventArgs e)
187190
/// <param name="e"></param>
188191
private void pictureBoxMouseCanvas_MouseUp(object sender, MouseEventArgs e)
189192
{
190-
if (pictureBoxMouseCanvas.Image == null || _selectPen == null) return;
193+
if (pictureBoxMouseCanvas.Image == null || _selectPen == null)
194+
{
195+
return;
196+
}
191197

192198
if (e.Button == MouseButtons.Left)
193199
{
194200
pictureBoxMouseCanvas.Refresh();
195201

196202
_selectWidth = e.X - _selectX;
197203
_selectHeight = e.Y - _selectY;
198-
199-
pictureBoxMouseCanvas.CreateGraphics().DrawRectangle(_selectPen, _selectX, _selectY, _selectWidth, _selectHeight);
200204
}
201205

202206
Bitmap bitmap = SelectBitmap();

settings/Settings.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,8 @@ public void Load(FileSystem fileSystem)
259259
_versionCollection.Add(new Version(CODENAME_BLADE, "2.4.0.8")); // Region Preview fix.
260260
_versionCollection.Add(new Version(CODENAME_BLADE, "2.4.0.9")); // Allow Active Window to use GDI screen capture method for Screen. Removed logging from FormRegionSelectWithMouse.
261261
_versionCollection.Add(new Version(CODENAME_BLADE, "2.4.1.0")); // Region Select fix.
262-
_versionCollection.Add(new Version(CODENAME_BLADE, "2.4.1.1"));
262+
_versionCollection.Add(new Version(CODENAME_BLADE, "2.4.1.1")); // GetScreenBitmap fix. (but it actually made it worse for a dual-display setup)
263+
_versionCollection.Add(new Version(CODENAME_BLADE, "2.4.1.2")); // Reverted changes to GetScreenBitmap method in ScreenCapture.
263264

264265
Application = new SettingCollection()
265266
{

0 commit comments

Comments
 (0)