[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Enigma-devel] SVG images?

From: Bernhard Reiter
Subject: Re: [Enigma-devel] SVG images?
Date: Mon, 18 Jun 2007 11:46:01 +0200

Am Freitag, den 08.06.2007, 10:15 +0200 schrieb Daniel Heck: 
> Hi.
> a few years ago when I was resizing all the original 32x32 graphics for
> the then newly added video modes, I toyed with the idea of switching to
> SVG.  I discarded the idea though, but not because I deemed the
> implementation impossible but because I realized that I lack the skills
> to emulate the current Enigma graphics in SVG.  I'm still not sure it
> can be done at all -- from my experience it's extremely difficult to
> produce vector graphics that don't look cartoonish.  But of course I'd
> be happy to be proven wrong. ;-)

What about an emiprical approach: 
* Try inkscape's Vectorize bitmap function. Mileage may vary, but in
some cases the outcome is really good. For a tentative example, see
attachment (of course, Our Favorite Black Marble should probably done
using SVG's circular gradient feature...)
* Browse Free SVG compilations on the Web (openclipart.org as soon as
it's fully functional again, the tango project,...) Some of the graphics
there might be good enough to replace enigma's existing ones (e.g.
floppy disks are pretty commonly found as svg images).

As SDL_svg's developer pointed out to me, having SVG graphics might
raise another question: Is it really worthwhile rendering them to SDL
surfaces and manipulating those (losing the principal quality of vector
graphics, loss-less scaling, which could of course make up for some nice
effects, such as "smooth" pause screens or even introduce zooming) or
would that rather suggest doing rendering more directly via an SVG
renderer such as cairo? (Which, as a positive quality, supports probably
about as many platforms as SDL already, and maybe even OpenGL).

For a start, what about making up a list of current graphics files in
one column and possible vector replacements in another (i.e. links to
online resources under open license, see attached example), or,
alternatively, a data/gfxsvg directory for collecting the latter?


> Cheers!
> Daniel
> Bernhard Reiter wrote:
> > First of all, great work!
> > 
> > I've noticed (and personally felt) a recurring demand that seems to be
> > more (higher) resolution modes for Enigma; so I started wondering if
> > there was a possibility of using SVG format (vector) images (which might
> > also provide smoother graphics) instead of always providing larger
> > pictures. This might not actually mean using an altogether different
> > graphics appproach, but maybe just loading from SVG files on startup and
> > rendering them to SDL surfaces according to the current resolution (this
> > still wouldn't allow for smooth zooming during the game, but zooming's
> > probably not that interesting for enigma anyway).
> > Quick research yielded SDL_svg
> > http://www.linuxmotors.com/SDL_svg/index.html , but I can't seem to get
> > it to work with the image loading routines as in d_models.cc (segfaults)
> > -- I probably just lack experience with enigma's (and SDL_svg's) code
> > base. If anybody wants to give it a try, I've found that I need the
> > attached patches in order to get the software to work (with C++ code).
> > 
> > Bernhard Reiter
> > 

Attachment: fg-blackball.svg
Description: image/svg

Attachment: index.txt
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]