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
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

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
98
S
36
G
19
Posts: 1,584
Reputation: 17,717

Post » Sat Oct 31, 2009 10:05 pm

curTexture is allowed to be NULL, so make sure you check that first.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518


Return to Construct engineering

Who is online

Users browsing this forum: No registered users and 0 guests