Omnimaga
Calculator Community => Major Community Projects => The Axe Parser Project => Topic started by: Haobo on April 29, 2015, 04:48:30 pm
-
I know that there already is an image scaling axiom that someone made, but what I need is for an image to only be scaled in 1 direction, or basically just stretching it. Any already made?
-
I believe such a routine has never been made. It may be possible to modify the existing scaled sprite Axiom to do that, though, especially if all you need is horizontal downscaling.
-
I have very little experience with actual z80 coding, so how hard would it be to modify the axiom with this little to no experience?
-
Realistically, that would be nearly impossible. So unless you're planning on learning z80 assembly, you'd probably need to recruit someone to produce the code for you. If you do in fact only need downscaling in one direction, it doesn't sound like it would be a huge undertaking, as one would just need to cut out the downscaling logic for the other direction from the existing scaled sprite Axiom. Or, it could be generalized to support separate horizontal and vertical scaling factors, and you'd just use a factor of 1.0 for one of them.
-
So... anyone want to help me? I only need scaling in the X direction, anyone? ::)
-
To clarify... just downscaling? Because the existing Axiom only supports downscaling, not upscaling.
If that's the case, I could perhaps give modifying the Axiom a try tomorrow.
-
I only need downscaling, wanted to try a page flipping animation, so downscaling x only should be enough.
Thanks if you can do it!
-
Alright, so as far as I can tell, the modification was successful. It uses the same tokens and input format as the original Axiom (https://www.omnimaga.org/the-axe-parser-project/scaled-sprites-axiom/msg389239/#msg389239), but each token now starts with an "H." Some weird OS behavior that I can't explain may make the "ZoomFit" token not be replaced with "HScaledClip-On(" in menus, but it should otherwise work correctly.
The Axiom and its source are attached to this post. Let me know how it goes!
-
Thanks Runer, I managed to use it to make a text reader of xkcd, here's a pic of how it turned out :P
(http://i.imgur.com/lN126rq.gif)
I removed the appvar from my version, but this works just as well. (just with an extra file to download) Going to add page numbers, possibly more scaling animations, and other stuff later.