[mapserver-dev] Transparency attribute on Layer Object

Norman Vine nhv at cape.com
Mon Aug 19 14:17:51 EDT 2002


David Graham writes:
>
>I don't think it exists for raster stuff.  My look into
>mapraster.c did
>not turn up anything that looked like it.

Following against current CVS files

<505> mapserver
$ grep "transparency" *.c
mapdraw.c:    if (layer->transparency > 0) {
mapdraw.c:  if( MS_RENDERER_GD(map->outputformat) && layer->transparency >
0 )
mapdraw.c:    gdImageCopyMerge(img_cache, image->img.gd, 0, 0, 0, 0,
image->img       gd->sx, image->img.gd->sy, layer->transparency);
mapfile.c:  layer->transparency = 0;
mapfile.c:      if(getInteger(&(layer->transparency)) == -1) return(-1);
mapfile.c:  scalebar->transparent = MS_NOOVERRIDE; // no transparency
mapgd.c: * transparency should be set (for RGBA images).   Note this
function o       ly
mapoutput.c:             32bit RGBA (A=alpha/transparency) result image.
Note        hat the
mapoutput.c: TRANSPARENT - A value of "ON" or "OFF" indicating whether
transpar       ncy
mapwms.c:  ** the transparency if needed.
shp2img.c:    fprintf(stdout,"  -t: enable transparency\n" );
shp2img.c:    if(strncmp(argv[i], "-t", 2) == 0) /* transparency */
shp2pdf.c:    /*if(strncmp(argv[i], "-t", 2) == 0)  transparency

<506> mapserver
$ grep "transparency" *.h
map.h:  int transparency; // transparency value 0-100

HTH

Norman




More information about the mapserver-dev mailing list