Re: [Tuxpaint-devel] libsvg error , Errors in compiling Tux Paint for windows
An award-winning drawing program for children of all ages
Brought to you by:
wkendrick
|
From: Martin F. <mf...@gm...> - 2007-06-06 02:05:41
|
On 5-Jun-07, at 12:26 PM, Bill Kendrick wrote:
> On Sat, May 26, 2007 at 03:02:26PM -0600, Martin Fuhrer wrote:
>> Yes, I managed to get SVG working on the Mac OS X build today. It's
>> a universal build, too, so should theoretically work on Intel Macs
>> (so far I have only been running it on my PowerPC-based PowerBook).
>> At least a few of the SVG stamps work; in other cases, if there is
>> both a foo.svg and foo.png file in one of the stamps subdirectories,
>> the .png version is favored and I still get a pixelated version of
>> the stamp at max magnification. Am I supposed to package the .png
>> and .svg stamp files together, or just the .svg files? I'll have a
>> chance to look into modifying the Mac print dialog next week...
>
> If it helps to only package the SVGs, and not their PNG counterparts,
> feel free to do so. (We should figure out the best way to deal
> with this,
> down the road. Some platforms may never have suitable SVG support.
> Mac OS classic, for example, if Tux Paint ever supports it. Or
> Maemo.)
For now, I can probably easily omit the .png files when I tar
together the stamps for the installer.
>
> As for TP loading PNG _instead_ of SVG, that's bizarre, since there's
> code in there that specifically checks for SVG variations, when
> loading PNGs.
> If the SVG exists, it will ignore the PNG and go about its business
> (eventually loading the SVG).
Changing the code in set_active_stamp() from:
if (sd->mirrored && !sd->no_premirror)
{
memcpy(buf + len, "_mirror.png", 12);
active_stamp = do_loadimage(buf, 0);
#ifndef NOSVG
if (active_stamp == NULL)
{
memcpy(buf + len, "_mirror.svg", 12);
active_stamp = do_loadimage(buf, 0);
}
#endif
}
if (!active_stamp)
{
memcpy(buf + len, ".png", 5);
active_stamp = do_loadimage(buf, 0);
#ifndef NOSVG
if (active_stamp == NULL)
{
memcpy(buf + len, ".svg", 5);
active_stamp = do_loadimage(buf, 0);
}
#endif
...
}
to:
if (sd->mirrored && !sd->no_premirror)
{
#ifndef NOSVG
memcpy(buf + len, "_mirror.svg", 12);
active_stamp = do_loadimage(buf, 0);
#endif
if (active_stamp == NULL)
{
memcpy(buf + len, "_mirror.png", 12);
active_stamp = do_loadimage(buf, 0);
}
}
if (!active_stamp)
{
#ifndef NOSVG
memcpy(buf + len, ".svg", 5);
active_stamp = do_loadimage(buf, 0);
#endif
if (active_stamp == NULL)
{
memcpy(buf + len, ".png", 5);
active_stamp = do_loadimage(buf, 0);
}
...
}
fixes the problem for me - but this means the problem was affecting
all platforms. Can anyone verify this?
Martin
|