trifleJS icon indicating copy to clipboard operation
trifleJS copied to clipboard

Support for webPage.clipRect

Open juliensobrier opened this issue 9 years ago • 2 comments

Added support for clipRect by cropping the full screen image.

Somme additional information on specific code changes:

API/Modules/WebPage.cs @@ -812,18 +812,26 @@ private Rectangle ClipRect There was an exception when top/left/width/height was null (set as undefined in Javascript, for example)

API/Modules/WebPage.cs @@ -266,7 +308,16 @@ public Bitmap Render(double ratio) There could be a bottom and/or right scroll bar, check for both to add 50px.

juliensobrier avatar Feb 02 '15 04:02 juliensobrier

BTW, the comment for "public void Render(string filename, double ratio, Rectangle clipRect)" is incorrect: top and left are used too

juliensobrier avatar Feb 02 '15 04:02 juliensobrier

Thanks @juliensobrier,

I knew page.clipRect was broken just hadnt had time to get it working.

Will merge when I get a moment to test.

Ta! Steven

sdesalas avatar Feb 04 '15 03:02 sdesalas