Zoom capability

I would like to block any other zoom levels than predefined, though I can’t see such option. Is it possible?

Thus spake “morvael”:

Why do you want to do that?


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Zoom levels > 100% kill Vassal as the map gets too huge (this may be remedied by new caching & splitting method for Vassal 3.2 if I’m not wrong on that matter).
Zoom levels < 50% won’t let me draw required information on counters (I use bitmaps that can’t be scaled as they will be unreadable), and since this is a pixel-precise drawing I need to precalculate positions of those overlays relative to counter size at given zoom level, so I did this for 1.0 and 0.5 zoom level.
At some zoom levels game will look too bad (either you will see damage from JPEG artifacts or the counters become unreadable) so I think it would be good to let the module developer decide whether he allows any zoom level or only one of the pre-set levels.

Thus spake “morvael”:

Yes, this will be fixed for 3.2.

Right now there’s no way to prevent the user from using the zoom dialog
to scale to any size he wants.

3.3 will probably have continuous zoom, so at that point there won’t be
much sense in having present zoom levels at all.

I would suggest using SVG for what you’re doing instead, to ensure precise
alignment at all sizes.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Would SVG cause much performance hit as opposed to drawing 3-4 small bitmaps per counter? I think yes, but I don’t know the ins and outs of SVG.

Thus spake “morvael”:

When we render SVG, we cache the rendered bitmaps, so after it’s loaded and
rendered, SVG has exactly the same performance as bitmaps. The module for
The Longest Day uses SVG for all of its several thousand pieces, and I’ve
never noticed any rendering lag there, even on the first pass.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thanks, I will have to explore that option. Could you point me to package/class names dealing with SVG drawing in Vassal?

Thus spake “morvael”:

The class which does the actual rendering is VASSAL.tools.image.svg.SVGRenderer.

J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)