[mapserver-dev] drop shadow for labels

Tamas Szekeres szekerest at gmail.com
Tue May 30 07:29:13 PDT 2017


I've re-added support for SHADOWCOLOR/SHADOWSIZE according to
https://github.com/mapserver/mapserver/issues/5438

In order to make the multiple label solution compatible with the original
one, we would need to handle the following issues:

https://github.com/mapserver/mapserver/issues/5440
https://github.com/mapserver/mapserver/issues/5441

Best regards,

Tamas



2017-05-29 14:13 GMT+02:00 Tamas Szekeres <szekerest at gmail.com>:

> I agree this is a regression issue that should be fixed.
>
> But should we also need to deprecate SHADOWCOLOR and SHADOWSIZE or
> removing that support in the code was also a regression? I don't see in the
> documentation that SHADOWCOLOR and SHADOWSIZE are no more supported and the
> migration guide doesn't mention a compatible solution either.
>
> We should also make OFFSET as a bindable attribute, since SHADOWSIZE was
> also bindable.
>
>
> Best regards,
>
> Tamas
>
>
>
>
> 2017-05-22 20:29 GMT+02:00 Lime, Steve D (MNIT) <steve.lime at state.mn.us>:
>
>> Sure looks to be a regression.
>>
>>   Works w/two label blocks: http://maps1.dnr.state.mn.us/c
>> gi-bin/mapserv64?map=/usr/local/mapserver/apps/test/drop_
>> shadow/test.map&mode=map
>>   Doesn't work: w/two label blocks: http://maps1.dnr.state.mn.us/c
>> gi-bin/mapserv70?map=/usr/local/mapserver/apps/test/drop_
>> shadow/test.map&mode=map
>>
>> Mapfile follows... FORCE TRUE gets the label to appear correctly but that
>> shouldn't be necessary. --Steve
>>
>> MAP
>>   NAME 'drop shadows'
>>   SIZE 500 500
>>   EXTENT 0 0 499 499
>>
>>   FONTSET /usr/local/mapserver/fonts/fonts.list
>>
>>   IMAGECOLOR 232 232 232
>>
>>   LAYER
>>     NAME 'label'
>>     TYPE POINT
>>     STATUS DEFAULT
>>     FEATURE
>>       POINTS 250 250 END
>>       TEXT 'Sample Text'
>>     END
>>     TRANSFORM FALSE
>>     CLASS
>>       LABEL
>>         TYPE TRUETYPE
>>         FONT arial
>>         SIZE 16
>>         COLOR 181 181 181
>>         OFFSET 3 3
>>       END
>>       LABEL
>>         TYPE TRUETYPE
>>         FONT arial
>>         SIZE 16
>>         COLOR 0 0 0
>>         OUTLINECOLOR 255 255 255
>>       END
>>     END
>>   END
>> END
>>
>> -----Original Message-----
>> From: mapserver-dev [mailto:mapserver-dev-bounces at lists.osgeo.org] On
>> Behalf Of Stephen Woodbridge
>> Sent: Sunday, May 21, 2017 6:07 PM
>> To: Tamas Szekeres <szekerest at gmail.com>
>> Cc: mapserver-dev at lists.osgeo.org
>> Subject: Re: [mapserver-dev] drop shadow for labels
>>
>> FORCE TRUE is likely going to generate other problems.
>>
>> Did you try this without FORCE TRUE. This:
>> http://mapserver.org/development/rfc/ms-rfc-77.html
>> leads me to believe that multiple label blocks in a class use the same
>> label point and therefore should not need the FORCE TRUE. And I think
>> you can have multiple labels optionally with leader lines on a single
>> point like this.
>>
>> -Steve W
>>
>> On 5/21/2017 5:13 PM, Tamas Szekeres wrote:
>> > We could indeed achieve similar effect by duplicating the label
>> > definition, however we need to set FORCE TRUE for the upper label to get
>> > it displayed at all.
>> >
>> > Best regards,
>> >
>> > Tamas
>> >
>> >
>> > 2017-05-21 22:30 GMT+02:00 Stephen Woodbridge <woodbri at swoodbridge.com
>> > <mailto:woodbri at swoodbridge.com>>:
>> >
>> >     Ahhh, sorry. I believe that you can include the label block twice,
>> >     the first time you draw the shadow, with some offset and using your
>> >     shadow color, the second time you draw it with the foreground color.
>> >
>> >     You should open an issue against the docs they are not correct.
>> >     There might be an FRC that covers this change, but I'm not seeing
>> one.
>> >
>> >     On 5/21/2017 4:13 PM, Tamas Szekeres wrote:
>> >
>> >         I've already learnt, that BACKGROUNDCOLOR,
>> >         BACKGROUNDSHADOWCOLOR, BACKGROUNDSHADOWSIZE can be replaced with
>> >         label styles, but what about SHADOWCOLOR and SHADOWSIZE?
>> >
>> >         Thanks,
>> >
>> >         Tamas
>> >
>> >
>> >         2017-05-21 22:01 GMT+02:00 Stephen Woodbridge
>> >         <woodbri at swoodbridge.com <mailto:woodbri at swoodbridge.com>
>> >         <mailto:woodbri at swoodbridge.com <mailto:woodbri at swoodbridge.com
>> >>>:
>> >
>> >
>> >              On 5/21/2017 1:54 PM, Tamas Szekeres wrote:
>> >
>> >                  Hi,
>> >
>> >                  Could someone explain how to configure drop shadow for
>> >         label in
>> >                  mapserver 7.x ?
>> >                  It looks like the SHADOWCOLOR/SHADOWSIZE implementation
>> >         has been
>> >                  stripped from the code and I'm not sure what replaces
>> >         that option.
>> >                  The documentation is very brief in this regard.
>> >
>> >
>> >              BACKGROUNDCOLOR [r] [g] [b] | [hexadecimal string]
>> >
>> >                   Color to draw a background rectangle (i.e. billboard).
>> >         Off by
>> >              default.
>> >
>> >                   Note
>> >
>> >                   Removed in 6.0. Use a LABEL STYLE object with
>> >         GEOMTRANSFORM
>> >              labelpoly and COLOR.
>> >              BACKGROUNDSHADOWCOLOR [r] [g] [b] | [hexadecimal string]
>> >
>> >                   Color to draw a background rectangle (i.e. billboard)
>> >         shadow.
>> >              Off by default.
>> >
>> >                   Note
>> >
>> >                   Removed in 6.0. Use a LABEL STYLE object with
>> >         GEOMTRANSFORM
>> >              labelpoly, COLOR and OFFSET.
>> >              BACKGROUNDSHADOWSIZE [x][y]
>> >
>> >                   How far should the background rectangle be offset?
>> >         Default is 1.
>> >
>> >                   Note
>> >
>> >                   Removed in 6.0. Use a LABEL STYLE object with
>> >         GEOMTRANSFORM
>> >              labelpoly, COLOR and OFFSET.
>> >
>> >         http://mapserver.org/mapfile/label.html#label-style
>> >         <http://mapserver.org/mapfile/label.html#label-style>
>> >              <http://mapserver.org/mapfile/label.html#label-style
>> >         <http://mapserver.org/mapfile/label.html#label-style>>
>> >
>> >              STYLE
>> >                 GEOMTRANSFORM 'labelpoly'
>> >                 COLOR 153 153 153
>> >                 OFFSET 3 2
>> >              END # STYLE
>> >              STYLE
>> >                 GEOMTRANSFORM 'labelpoly'
>> >                 COLOR 255 0 0
>> >              END # STYLE
>> >
>> >              ---
>> >              This email has been checked for viruses by Avast antivirus
>> >         software.
>> >         https://www.avast.com/antivirus
>> >         <https://www.avast.com/antivirus>
>> >         <https://www.avast.com/antivirus <https://www.avast.com/antivir
>> us>>
>> >
>> >              _______________________________________________
>> >              mapserver-dev mailing list
>> >         mapserver-dev at lists.osgeo.org
>> >         <mailto:mapserver-dev at lists.osgeo.org>
>> >         <mailto:mapserver-dev at lists.osgeo.org
>> >         <mailto:mapserver-dev at lists.osgeo.org>>
>> >         https://lists.osgeo.org/mailman/listinfo/mapserver-dev
>> >         <https://lists.osgeo.org/mailman/listinfo/mapserver-dev>
>> >              <https://lists.osgeo.org/mailman/listinfo/mapserver-dev
>> >         <https://lists.osgeo.org/mailman/listinfo/mapserver-dev>>
>> >
>> >
>> >
>> >
>>
>>
>> ---
>> This email has been checked for viruses by Avast antivirus software.
>> https://www.avast.com/antivirus
>>
>> _______________________________________________
>> mapserver-dev mailing list
>> mapserver-dev at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapserver-dev
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20170530/cc36ae58/attachment.html>


More information about the mapserver-dev mailing list