Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9153717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:19:05+00:00 2026-06-17T12:19:05+00:00

I found some drop shadows plugins based on blur or glow, also stroke opacity,

  • 0

I found some drop shadows plugins based on blur or glow, also stroke opacity, but this is only simulation, and can’t be used in case of inner shadow.

Also there is no simple filter in SVG specification, so you can’t simply take advantage on it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T12:19:06+00:00Added an answer on June 17, 2026 at 12:19 pm

    I wrote my own plugin based on this two links:

    https://github.com/dahoo/raphael.dropshadow.js

    http://svgquickref.com/properties/filter/inner-shadow/index.html

    HTML code (usage):

    <!DOCTYPE html>
    <html lang="en">
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <meta charset="utf-8">
            <title>Raphael Test</title>
    
            <script type="text/javascript" src="js/libs/jquery.js"></script>
            <script type="text/javascript" src="js/libs/raphael.js"></script>
            <script type="text/javascript" src="js/libs/raphael.innershadow.js"></script>
        </head>
        <body>
            <div id="raphael"></div>
            <script type="text/javascript">
                $(document).ready(function() {
                    var raphael, path, pattern;
                    raphael = Raphael(document.getElementById('raphael'), 500, 500);
                    path = raphael.circle(200, 200, 180);
                    path.attr('fill', 'red');
                    path.innerShadow(50, 0, 0, "green", 0.5);
                });
            </script>
        </body>
    </html>
    

    Plugin code:

    (function() {
        if(Raphael.vml) {
            Raphael.el.innerShadow = function (size, offsetX, offsetY, color, opacity, filter_id, input) {
                // not supporting VML yet
                return this; // maintain chainability
            }
        } else {
            var $ = function(el, attr) {
                if(attr) {
                    for(var key in attr)
                    if(attr.hasOwnProperty(key)) {
                        el.setAttribute(key, attr[key]);
                    }
                } else {
                    return document.createElementNS("http://www.w3.org/2000/svg", el);
                }
            };
            Raphael.el.innerShadow = function(size, offsetX, offsetY, color, opacity, filter_id, input) {
    
                opacity = opacity || 1;
                filter_id = filter_id || "innershadow";
                input = input || "SourceGraphic";
    
                if(size != "none") {
                    var fltr = $("filter"),
                        offset = $("feOffset"), // offset
                        blur = $("feGaussianBlur"), // shadow bluer
                        composite1 = $("feComposite"), // invert drop shadow to create inner shadow
                        flood = $("feFlood"), // color & opacity
                        composite2 = $("feComposite"), // clip color inside shadow
                        composite3 = $("feComposite") // put shadow over original object
    
                    fltr.id = filter_id;
    
                    $(fltr, {
                            "height" : "150%",
                            "width" : "150%"
                    });
    
                    $(offset, {
                        dx: offsetX,
                        dy: offsetY
                    });
    
                    $(blur, {
                        stdDeviation: +size,
                        result: "offset-blur"
                    });
    
                    $(composite1, {
                        operator: "out",
                        "in": "SourceGraphic",
                        in2: "offset-blur",
                        result: "inverse"
                    });
    
                    $(flood, {
                        "flood-color": color,
                        "flood-opacity": opacity,
                        result: "color"
                    });
    
                    $(composite2, {
                        operator: "in",
                        "in": "color",
                        in2: "inverse",
                        result: "shadow"
                    });
    
                    $(composite3, {
                        operator: "over",
                        "in": "shadow",
                        in2: input
                    });
    
                    fltr.appendChild(offset);
                    fltr.appendChild(blur);
                    fltr.appendChild(composite1);
                    fltr.appendChild(flood);
                    fltr.appendChild(composite2);
                    fltr.appendChild(composite3);
    
                    this.paper.defs.appendChild(fltr);
                    this._blur = fltr;
    
                    $(this.node, {
                        "filter" : "url(#" + filter_id + ")"
                    });
    
                } else {
                    if(this._blur) {
                        this._blur.parentNode.removeChild(this._blur);
                        delete this._blur;
                    }
                    this.node.removeAttribute("filter");
                }
                return this;  // maintain chainability
            };
        }
    
        Raphael.st.innerShadow = function(size, offsetX, offsetY, color, opacity, filter_id, input) {
            return this.forEach(function(el) {
                el.innerShadow(size, offsetX, offsetY, color, opacity, filter_id, input);
            });
        };
    })();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This might be an easy one for some one but I haven't found a
I found some really good sum row, sum column of drop down examples, but
I found some classes designed for debugging in package com.sun.jdi like VirtualMachine , but
I found some mapkit code on the internet that looks like this: - (void)recenterMap
I found some information about this on Scott Hanselmans Blog Does anybody exactly know
I am using some code that I found for a drop down menu. It
I'm working off some code for a drop-down menu I found here on stack
Searching for implementations of drag and drop in selenium I only found the deprecated
I did some research and found this : DataObject d = new DataObject(); d.SetData(DataFormats.Serializable,
I found something similar to this question but it wasn't related to strings. I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.