Canvas snapshot + sprite ->load from url issue

Bugs will be moved here once resolved.

Post » Sun Sep 18, 2016 1:15 pm

Problem Description
when we snapshot a canvas at an higher or lower resolution than the window size, the texture becomes bigger or smaller than the canvas

Attach a Capx
https://1drv.ms/u/s!AjkoCSebIn9Jih0WYhJLIDXFrq-E

Description of Capx
there is an ok button that takes a canvas snapshot, then paste it to a sprite when done, the letterbox scale is used as if we set fullscreen in browser to off, it overlaps perfectly

Steps to Reproduce Bug
  • resize your browser window so it is bigger (or smaller) than the window size
  • click ok like crazy
  • see for yourself
  • repeat with fullscreen in browser off to see how it should render

Observed Result
the snapshot does not overlap correctly

Expected Result
the same result as fullscreen in browser off

Affected Browsers
  • Chrome: (YES/NO) : Yes
  • Opera: (YES/NO) : Yes
  • Edge: (YES/NO) : Yes

Operating System and Service Pack
Windows 10 64-bits

Construct 2 Version ID
release 233, also affects the last beta 235
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Fri Sep 23, 2016 12:55 pm

Closing as not a bug: this is simply because you're mixing the canvas size with the layout size. When you letterbox scale to make the view bigger, the layout co-ordinates stay the same, but the canvas is bigger.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,762

Post » Fri Sep 23, 2016 5:52 pm

makes sense, thanks for awnsering ^^
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest