mirror of
https://github.com/greenshot/greenshot
synced 2025-08-20 21:43:24 -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
|
@ -28,7 +28,7 @@ namespace Greenshot.Helpers {
|
|||
public static class GuiRectangle {
|
||||
|
||||
public static Rectangle GetGuiRectangle(int x, int y, int w, int h) {
|
||||
Rectangle rect = new Rectangle(x, y, w, h);
|
||||
var rect = new Rectangle(x, y, w, h);
|
||||
MakeGuiRectangle(ref rect);
|
||||
return rect;
|
||||
}
|
||||
|
@ -43,22 +43,5 @@ namespace Greenshot.Helpers {
|
|||
rect.Height = -rect.Height;
|
||||
}
|
||||
}
|
||||
|
||||
public static RectangleF GetGuiRectangleF(float x, float y, float w, float h) {
|
||||
RectangleF rect = new RectangleF(x, y, w, h);
|
||||
MakeGuiRectangleF(ref rect);
|
||||
return rect;
|
||||
}
|
||||
|
||||
public static void MakeGuiRectangleF(ref RectangleF rect) {
|
||||
if (rect.Width < 0) {
|
||||
rect.X += rect.Width;
|
||||
rect.Width = -rect.Width;
|
||||
}
|
||||
if (rect.Height < 0) {
|
||||
rect.Y += rect.Height;
|
||||
rect.Height = -rect.Height;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue