Opened 21 years ago

Closed 21 years ago

Last modified 21 years ago

#364 closed defect (fixed)

multiple styles and shadow effect.

Reported by: assefa Owned by: sdlime
Priority: high Milestone:
Component: MapServer C Library Version: 4.0
Severity: normal Keywords:
Cc: jmckenna@…, dbarron@…

Description

Original e-mail from : Dan Barron (dbarron@ddive.com )

In trying to use the STYLES with v4.0b2 PHP/Mapscript and SHP files to achieve a
drop shadow effect, only the final STYLE COLOR actually fills within the
polygon.  So using the following:

    class
      name 'myclass'
      style
        outlinecolor 0 0 255
        color 0 255 0
        offset 20 20
      end
      style
        outlinecolor 255 0 0
        color 204 204 204
        offset 10 10
      end
      style
        outlinecolor 0 0 0
        color 255 255 204
      end
    end

Gives two outlines of the polygon - one blue, one red - and one filled polygon
outlined in black.  Setting the backgroundcolor color object for a style object
does not seem to work at all.  I have also tried to explicitly change color,
backgroundcolor for a style object in php/mapscript as well with the same results.

I did not see these in bugzilla, so I wanted to verify if I am seeing a real bug
- have you or DM Solutions developers been successful at using multiple style
objects for a polygon layer and seeing that color, backgroundcolor and
outlinecolor all behave normally?

Attachments (3)

drop-shadow.gif (8.6 KB ) - added by jmckenna@… 21 years ago.
Notice there is only one style 'COLOR" (green)
phpmstestcase.png (8.8 KB ) - added by dbarron@… 21 years ago.
test case showing fill occurs but not offset
drop-shadow-fixed.gif (8.3 KB ) - added by jmckenna@… 21 years ago.
corrected fill of offseted polygons

Download all attachments as: .zip

Change History (12)

by jmckenna@…, 21 years ago

Attachment: drop-shadow.gif added

Notice there is only one style 'COLOR" (green)

comment:1 by jmckenna@…, 21 years ago

The above attachment verifies this problem.  Here is my test class:

   CLASS
      NAME "Provinces"
      STYLE
        COLOR 240 240 240
        OUTLINECOLOR 199 199 199
        OFFSET 20 20
      END
      STYLE 
        COLOR 255 0 0
        OUTLINECOLOR 0 0 255
        OFFSET 10 10
      END
      STYLE
        COLOR 0 255 0
        OUTLINECOLOR 0 0 0
      END
    END

The other style fill colors do not appear.


by dbarron@…, 21 years ago

Attachment: phpmstestcase.png added

test case showing fill occurs but not offset

comment:2 by sdlime, 21 years ago

Status: newassigned
As mentioned earlier, offsets are not working yet for polygons. It's a "todo" 
for this week. Otherwise the output looks as expected. It's good to have it in 
Bugzilla though...

Steve

comment:3 by sdlime, 21 years ago

I added offsets to the polygon fill code tonite (this morning). Works fine in
test cases, but I'd like folks to give it shot with their own data. Let me know
if I can close this one out.

comment:4 by assefa, 21 years ago

I have tried it with the latest version and It seems to work properly.
Dan, Jeff can you guys give it a try so this bug can be closed ?

comment:5 by assefa, 21 years ago

Cc: dbarron@… added

comment:6 by assefa, 21 years ago

Cc: mckenna@… added

comment:7 by jmckenna@…, 21 years ago

I tested with the latest version and works perfectly.  Attaching a screengrab of it.

by jmckenna@…, 21 years ago

Attachment: drop-shadow-fixed.gif added

corrected fill of offseted polygons

comment:8 by sdlime, 21 years ago

Resolution: fixed
Status: assignedclosed

comment:9 by dbarron@…, 21 years ago

I take your word on it being fixed.  

I do not have the ability to compile a Windows version of the Mapscript dll - I 
have tried in the past to configure my environment to do so - but it has been 
more trouble then it is worth for me.  So I won't be able to test until a new 
version of the 4.0 php/mapscript is put out on the dmsolutions download 
directory.
Note: See TracTickets for help on using tickets.