Skip to content
This repository has been archived by the owner on May 15, 2023. It is now read-only.

Support for webPage.clipRect #42

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

juliensobrier
Copy link
Contributor

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
Copy link
Contributor Author

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

@@ -247,16 +262,43 @@ public Bitmap Render()
/// </summary>
/// <param name="ratio">zoom ratio</param>
/// <returns></returns>
public Bitmap Render(double ratio)
/// <param name="clipRect">Part of the imaeg captured - Only Height and Width are used right now</param>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same imaeg typo repeated...

@sdesalas
Copy link
Owner

sdesalas commented Feb 4, 2015

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 sdesalas added this to the Core API milestone Feb 4, 2015
@sdesalas sdesalas self-assigned this Feb 4, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants