how do you get original height and width?

Forum for plugin, effect and behavior programmers. Please use the Help & Support forum for help using Construct.

Post » Fri Oct 30, 2009 10:30 pm

i can't find it
info.h, and info.w are for the current height width
how about the original sprites height, and width
Spriter Dev
B
94
S
21
G
12
Posts: 3,251
Reputation: 16,726

Post » Fri Oct 30, 2009 11:04 pm

Based on a quick walk through the sprite object source code, it looks like these return what you want:

CRunObject->info.curTexture->image_width
CRunObject->info.curTexture->image_height
Moderator
B
107
S
41
G
20
Posts: 1,584
Reputation: 18,942

Post » Sat Oct 31, 2009 10:05 pm

curTexture is allowed to be NULL, so make sure you check that first.
Scirra Founder
B
367
S
217
G
82
Posts: 23,264
Reputation: 183,858


Return to Construct engineering

Who is online

Users browsing this forum: No registered users and 0 guests