Skip to content

Dropshadow on paths are incorrect #11

Description

@klodoma

Hi,

I found a issue with the dropShadow function. See attached screenshot.
Code:

    <script>
        var paper = Raphael( 10, 50, 320, 200 );
        var rect = paper.rect( 0, 0, 320, 200 );
        rect.attr( "fill", "#344EAD" );
        rect.attr( "stroke", "#DDDDDD" );


        var line = paper.path( "M10,10 L100,15" )
                .attr( "stroke", "#D7D7D7" )
                .attr( "stroke-width", "10" )
                .attr( "opacity", 1 );

        var line2 = paper.path( "M10,30 L100,35" )
                .attr( "stroke", "#D7D7D7" )
                .attr( "stroke-width", "10" )
                .attr( "opacity", 1 );

        line.dropShadow(2, 3, 3, 0.5);

    </script>

screenshot_111

Now, the solution I found is changing the filter attributes:

                //If isn't set allready
                if(document.getElementById(fltr.id) == null) {
                    $(fltr, {
                        "x" : "-1",
                        "y" : "-1",
                        "height" : "500%",
                        "width" : "500%"
                    });

vs

                if(document.getElementById(fltr.id) == null) {
                    $(fltr, {
                        "height" : "130%",
                        "width" : "130%"
                    });

but honestly, I don't really understand what am I doing. This leads me to a better result:

screenshot_112

Can you have a look please? Thanks, Andrei.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions