Jump to content

Canvas Help


Isolate

Recommended Posts

Please show your code so it can be identified easier, more preferrably, a MCVE

bot.getCanvas().getBounds();

only returns the rectnagle of the canvas position within the client, so it returns

0,0,width,height.

So when using robot to take a screenshot it does it from the 0,0 of your screen.

Link to comment
Share on other sites

bot.getCanvas().getBounds();
only returns the rectnagle of the canvas position within the client, so it returns

0,0,width,height.

So when using robot to take a screenshot it does it from the 0,0 of your screen.

 

 

You want getLocationOnScreen(). getBounds() returns the locatiom of the component relative to it's container, not your screen

Edited by fixthissite
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...