mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
Improved the support for dragging and dropping images from a website, now also parsing HTML img src information, to be able to download that image. For this we need the HtmlAgilityPack.dll (#294)
Removed a lot of dead code, and remove the old OCR code as we don't even know if it still works.
This commit is contained in:
parent
90cab1e8a3
commit
26fe579d31
151 changed files with 1138 additions and 8174 deletions
|
@ -1,5 +1,25 @@
|
|||
/*
|
||||
* Greenshot - a free and open source screenshot tool
|
||||
* Copyright (C) 2007-2021 Thomas Braun, Jens Klingen, Robin Krom
|
||||
*
|
||||
* For more information see: http://getgreenshot.org/
|
||||
* The Greenshot project is hosted on GitHub https://github.com/greenshot/greenshot
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 1 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using GreenshotPlugin.Interfaces;
|
||||
|
@ -14,7 +34,6 @@ namespace GreenshotPlugin.Core
|
|||
/// </summary>
|
||||
public class Capture : ICapture {
|
||||
private static readonly ILog Log = LogManager.GetLogger(typeof(Capture));
|
||||
private List<ICaptureElement> _elements = new List<ICaptureElement>();
|
||||
|
||||
private Rectangle _screenBounds;
|
||||
/// <summary>
|
||||
|
@ -178,15 +197,6 @@ namespace GreenshotPlugin.Core
|
|||
// TODO: Remove invisible lines/words?
|
||||
CaptureDetails.OcrInformation?.Offset(-cropRectangle.Location.X, -cropRectangle.Location.Y);
|
||||
|
||||
// Remove invisible elements
|
||||
var visibleElements = new List<ICaptureElement>();
|
||||
foreach(var captureElement in _elements) {
|
||||
if (captureElement.Bounds.IntersectsWith(cropRectangle)) {
|
||||
visibleElements.Add(captureElement);
|
||||
}
|
||||
}
|
||||
_elements = visibleElements;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue