[Mapserver-dev] SWF output -> FORMATOPTION "OUTPUT_MOVIE=SINGLE" broken?
Steve Spicklemire
steve at spvi.com
Wed Jun 16 17:19:01 EDT 2004
Hi Yewondwossen,
Thanks for the detailed reply..
On Jun 16, 2004, at 1:04 PM, Yewondwossen Assefa wrote:
> I have checked the code to see what would be the problem. Here is the
> situation :
> - when rederning in OUPUT_MOVIE = 'SINGLE' mode, all the drawing
> passes through the GD functions : basically every thing is drawn in a
> temporary GD image as if you had specified a GD format (like PNG, GIF
> ...). At the end this GD image is converted and inserted inside the
> movie.
You mean ... as in a bitmap? That seems kinda strange..
>
> - when rendering in mode MULTIPLE, you get vector output and all the
> code is handled through the swf driver.
>
> As for the fonts, the problem you probably have is that your classes
> refer to an FDB font that is handled properly in the vector case
> (MULTIPLE) but can not work in the raster case (SINGLE), since GD
> which is used to draw the text does not understand the FDB font.
>
> Quick solution to your problem: if you use your mapfile in SINGLE
> mode, use true type fonts in your classes. If you want vector output
> using the MULTIPLE mode, use the FDB fonts.
Hmm.. OK.. I'll try that.
>
> The real solution would be for ming (which is the library used to
> generate the swf files), to support True Type fonts.
>
> I am also checking to see if there can be a small hack that can be
> introduced inside the mapserver swf code to correct this problem.
>
> I have enetered a bug in mapserver (Bug 733)
> http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=733 to follow up on
> this.
>
Is there any reason why the SINGLE mode can't draw just like the
multiple mode, but just into a single .swf? I'll dig some more...
thanks for the input!
-steve
> Later,
>
> Steve Spicklemire wrote:
>
>> Hi Folks,
>> I'm trying to track down a apparent bug in rendering labels in SWF
>> output when OUPUT_MOVIE is 'SINGLE'.
>> The code is a bit confusing to me (no doubt primarily due to the fact
>> that I don't understand why it's doing things the way it is!). It
>> appears that this bit of code in mapswf.c/msDrawLabelCacheSWF is not
>> working:
>> /*
>> --------------------------------------------------------------------
>> */
>> /* if the output is single (SWF file based on one raster that
>> */
>> /* will contain all the rendering), draw the lables using the
>> */
>> /* GD driver.
>> */
>> /*
>> --------------------------------------------------------------------
>> */
>> if(strcasecmp(msGetOutputFormatOption(image->format,
>> "OUTPUT_MOVIE",""),
>> "SINGLE") == 0)
>> {
>> imagetmp = (imageObj *)image->img.swf->imagetmp;
>> msImageInitGD( imagetmp, &map->imagecolor);
>> msDrawLabelCacheGD(imagetmp->img.gd, map);
>> oShape = gdImage2Shape(imagetmp->img.gd);
>> //nTmp = image->img.swf->nCurrentMovie;
>> SWFMovie_add(GetCurrentMovie(map, image), oShape);
>> return 0;
>> }
>> I don't know enough about the GD methods to tell for sure what's
>> going on. When in MULTIPLE mode I get nice vector fonts drawn on each
>> layer with labels. WHen in SINGLE I see no text anywhere. ;-(
>> I've had reasonable success sorting out bugs in mapswf.c before.. but
>> this one has me (momentarily) stumped!
>> Any thoughts about how to track this one down would be appreciated.
>> BTW... I'm pretty sure this actually *worked* at some point... wierd.
>> thanks!
>> -steve
>> _______________________________________________
>> Mapserver-dev mailing list
>> Mapserver-dev at lists.gis.umn.edu
>> http://lists.gis.umn.edu/mailman/listinfo/mapserver-dev
>
>
> --
> ----------------------------------------------------------------
> Assefa Yewondwossen
> Software Analyst
>
> Email: assefa at dmsolutions.ca
> http://www.dmsolutions.ca/
>
> Phone: (613) 565-5056 (ext 14)
> Fax: (613) 565-0925
> ----------------------------------------------------------------
>
>
> _______________________________________________
> Mapserver-dev mailing list
> Mapserver-dev at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-dev
>
More information about the mapserver-dev
mailing list