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
95
S
21
G
12
Posts: 3,251
Reputation: 16,778

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
109
S
41
G
20
Posts: 1,586
Reputation: 18,996

Post » Sat Oct 31, 2009 10:05 pm

curTexture is allowed to be NULL, so make sure you check that first.
Scirra Founder
B
373
S
218
G
83
Posts: 23,434
Reputation: 185,818


Return to Construct engineering

Who is online

Users browsing this forum: No registered users and 0 guests