JavaScript Is it possible to invert the clipping of SVG?

I have a rectangle on an SVG element. I then want to draw another rectangle over the whole SVG area except the rect I've already drawn.

I thought masks might be a solution but they seem to act just like clipping - doing the inverse of what I want. I've tried this:

<svg id="mySVG" width="600" height="250">
    <defs>
        <mask id="myMask" x="0" y="0" width="600" height="250" >
            <circle cx="25" cy="25" r="25" fill="white"/>
        </mask>
    </defs>

    <rect x="0" y="0" width="600" height="250" fill="red" mask="url(#myMask)"></rect>
</svg>

So what I'm after is the inverse of this image.

Answer:1

I'm using jQuery to create a simple addClass on hover. Hovering over a #science-panel-number div triggers a class of .active to be added to an #iphone-screen-number div. Here is my jQuery: $('#...

I'm using jQuery to create a simple addClass on hover. Hovering over a #science-panel-number div triggers a class of .active to be added to an #iphone-screen-number div. Here is my jQuery: $('#...

  1. number with jquery validate
  2. number with commas jquery
  3. format number with jquery
  4. random number with jquery
  5. number counter with jquery
  6. increment number with jquery
  7. number with decimal jquery
  8. add number with jquery
  9. increase number with jquery
  10. replace number with jquery
  11. number jquery
  12. number jquery plugin
  13. number jquery animation
  14. number jquery form validation
  15. number jquery selector
  16. number jquery check
  17. number counter animation with jquery
  18. validate phone number with jquery
  19. class with number jquery

Suppose I ensure that properties are deleted and objects are set to null after use in JavaScript prpgram. 1) Will this help me in better memory management? How do I verify this? 2) As far as I know,...

Suppose I ensure that properties are deleted and objects are set to null after use in JavaScript prpgram. 1) Will this help me in better memory management? How do I verify this? 2) As far as I know,...

  1. memory manager javascript

I was wondering if I can call cffunction on my cfm page? I have onClick button that should make a call to the cffunction that is on the same page. Also I have tried to put cfcomponent around my ...

I was wondering if I can call cffunction on my cfm page? I have onClick button that should make a call to the cffunction that is on the same page. Also I have tried to put cfcomponent around my ...

I am looking for a way to turn a middleware on and off. I introduced a tutorial functionality - I listen to what the user is doing with the UI by checking each action with a "guidance" middleware. if ...

I am looking for a way to turn a middleware on and off. I introduced a tutorial functionality - I listen to what the user is doing with the UI by checking each action with a "guidance" middleware. if ...