Poll
Question:
When an image is too large to fit into the displayed box, should it be...
Option 1: Don't really care...
votes: 0
Option 2: Scaled to fit.
votes: 11
Option 3: Do a bit of both.
votes: 2
Option 4: I have another idea (post idea).
votes: 1
Option 5: Don't really care...
votes: 0
This pertains to displayed graphics in the editor, such as what is found on RMXP's Actor and Enemy panels.
A few exampled of different methods using the same over-sized image in the same-sized box. Keep in mind ARC panels can be resized, and scaling/cropping will be recalculated depending on the window size.
(http://dl.dropbox.com/u/20787370/Pics/Layout%20Samples/cropped.png)
(http://dl.dropbox.com/u/20787370/Pics/Layout%20Samples/scaled.png)
(http://dl.dropbox.com/u/20787370/Pics/Layout%20Samples/bit_o_both.png)
I say scaled to fit, so i have a better idea of what i'm looking at.
Or heck, maybe add options in the editor?
So if someone prefers the RMXP method or what ever.
I voted for Scaled, but I'd like it if RMXP's method is also availabe.
I think I am gonna go with all three and just make a setting in the config to determine which will be used. This seems to be the common answer to everything with ARC :)
EDIT:
Well, good news, I've managed to mix an OpenGL canvas with a wxPanel to display the images. What this means for me is an easier time coding the various ways to display the images, and what this means for you is higher performance and smooth resizing/scaling/cropping when the window size is changed.
QuoteThis seems to be the common answer to everything with ARC
Hahaha, and it's great!
Quoteand what this means for you is higher performance and smooth resizing/scaling/cropping when the window size is changed.
Nice :)
Sweet!
Even back on RMXP, i would have a hard time knowing what i was looking at, it was annoying.
:facepalm:
I just noticed the existence of the wxGLCanvas module...
I wrote my own from scratch interfacing the two, and it was a real bitch, and now I discover this. Now I am going to re-write it again using this. Fortunately, much of the code I already have written can still be used, mainly just the initializer. I can simply use wxGLCanvas as the super class instead of two other classes above it to inherit from. On top of that, it also means I won't need to make a Unix version, since the current implementation I has was windows dependent, and I still needed to make support for Linux, etc.
*slaps F0* if your going to use an opengl panel then make sure you look at the code that creates the pyglet mapeditor panel the initiation it uses has been tested across all platforms. IN FACT I have already written a panel that is generic and can be used for any opengl work. also, use a pyglet sprite for the image if your not already.
I already noticed that and began subclassing it. I came back to the forum to post just that, but you beat me to it.
EDIT:
Also, I have been using pyglet.Image, not Sprite. Is that a problem? I have just been converting a PIL image (since the final result will use the PILCache) into a pyglet.Image and using a blit to display the appropriate part of the graphic, depending on the sizing mode that is selected.
ANOTHER EDIT:
Alrighty, implemented it into the actor panel. Selectable drawing modes include the following:
- Crop & Shrink: Images will be both scaled down and cropped to fit
- Shrink: Scales image down if too large, else the image is simply centered
- Stretch Aspect: The image will be stretched to fill panel while maintaining aspect ratio
- Cropped: Oversized images too large for the panel will simply be cropped
- Stretch: The entire image is stretched, and aspect ratio is ignored
I also made the character and battler graphic into a splitter panel, so you can modify the size of each to a degree without resizing the main window. Now I am going to implement changing the drawing mode simply by right-clicking the image and changing the mode via a context menu.