[r120.2] 9-Patch: Power of 2 Bug

Bugs will be moved here once resolved.

Post » Sat Feb 23, 2013 12:17 pm

Link to .capx file (required!):
https://dl.dropbox.com/u/6200498/Construct%202/capx/bugged/9patch_powerof2-bug.capx

Steps to reproduce:
1. Place a 9-Patch object width dimensions != power of 2.
2. Preview with web gl on AND off.

Observed result:
Exception with web gl OFF:
Javascript error!Uncaught Error: InvalidStateError: DOM Exception 11http://localhost/NinePatch_plugin.js, line 149 (col undefined)

Exception with web gl ON:
Javascript error!Uncaught Error: InvalidStateError: DOM Exception 11http://localhost/glwrap.js, line 1292 (col undefined)

I guess this is the stretching routine for non power of 2 textures.

Expected result:
No exception thrown / 9-patch working stretching routine. ;)

Browsers affected:
Chrome: yes
Firefox: yes
Internet Explorer: very possible

Operating system & service pack:
Windows 7 Prof.

Construct 2 version:
r120.2 64bit
    oppenheimer2013-02-23 13:57:49
B
59
S
7
G
2
Posts: 93
Reputation: 4,228

Post » Sat Feb 23, 2013 2:31 pm

The problem isn't to do with power-of-two sized textures, it's just the margins you've set mean the edge has a zero size. (The image is 32px high, and the top and bottom margins are 16px, meaning the left/right edges have a zero size.) If you reduce the margins it works fine. Still, it shouldn't have an error like this, so I'll get this fixed for the next build.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478


Return to Closed bugs

Who is online

Users browsing this forum: Johncw87 and 1 guest