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
101
S
22
G
12
Posts: 3,274
Reputation: 17,079

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
113
S
41
G
20
Posts: 1,586
Reputation: 19,126

Post » Sat Oct 31, 2009 10:05 pm

curTexture is allowed to be NULL, so make sure you check that first.
Scirra Founder
B
402
S
238
G
89
Posts: 24,632
Reputation: 196,031


Return to Construct engineering

Who is online

Users browsing this forum: No registered users and 0 guests