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
91
S
21
G
12
Posts: 3,246
Reputation: 16,573

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
104
S
39
G
19
Posts: 1,584
Reputation: 18,167

Post » Sat Oct 31, 2009 10:05 pm

curTexture is allowed to be NULL, so make sure you check that first.
Scirra Founder
B
362
S
216
G
75
Posts: 23,119
Reputation: 180,502


Return to Construct engineering

Who is online

Users browsing this forum: No registered users and 0 guests