TrevorBradley
Active Member
- Joined
- Nov 6, 2007
- Messages
- 732
Learned some things tonight, thought I'd share.
size_x and size_y are the scaled percentage of the original graphic in the x and y direction. I've updated the fenixdocs wiki to reflect this (fenixdocs originally said size_x and size_y were measured in pixels).
I'm trying to do smooth scaling of a graphic, zooming in and out smoothly trying to make it bigger or smaller, and I hit a bit of a quandary. There are the two options I see:
1) Create a really large png (eg 600x600), then scale it down small as needed. This was my first choice, but there's a fundamental flaw with this: size_x is an integer, not a float. The jump between size_x = size_y = 30 and size_x = size_y = 29 is huge, about 3 percent (18 pixels!), and causes a jerky shrinking motion.
2) Create a really small png, then scale it up larger as needed. This gets rid of the chunky problem (I noticed size_x above 300 removed all "jumping" effects, but then the image looks pixelated.
I've gone for a compromise, creating several graphics of various smaller sizes and keeping size_x = size_y in the 300-400 range, swapping in and out maps of various sizes as needed. It's a bit pixelated, but smooth.
Rotation finally also works well with this compromise.
I'll leave it up to the reader to figure out what a spinning, smoothly zooming in and out graphic might be used for...
size_x and size_y are the scaled percentage of the original graphic in the x and y direction. I've updated the fenixdocs wiki to reflect this (fenixdocs originally said size_x and size_y were measured in pixels).
I'm trying to do smooth scaling of a graphic, zooming in and out smoothly trying to make it bigger or smaller, and I hit a bit of a quandary. There are the two options I see:
1) Create a really large png (eg 600x600), then scale it down small as needed. This was my first choice, but there's a fundamental flaw with this: size_x is an integer, not a float. The jump between size_x = size_y = 30 and size_x = size_y = 29 is huge, about 3 percent (18 pixels!), and causes a jerky shrinking motion.
2) Create a really small png, then scale it up larger as needed. This gets rid of the chunky problem (I noticed size_x above 300 removed all "jumping" effects, but then the image looks pixelated.
I've gone for a compromise, creating several graphics of various smaller sizes and keeping size_x = size_y in the 300-400 range, swapping in and out maps of various sizes as needed. It's a bit pixelated, but smooth.
Rotation finally also works well with this compromise.
I'll leave it up to the reader to figure out what a spinning, smoothly zooming in and out graphic might be used for...