4xx / svg-edit

Automatically exported from code.google.com/p/svg-edit
MIT License
0 stars 0 forks source link

Is it possible to apply any filters on the background image (e.g. set it b/w)? #1165

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I would like to use the editor as graphical annotator, so I could upload a 
background image and then annotate it. The good idea for the better visibility 
of annotations would be to set the background image to black and white mode. Is 
it hard to implement. Where one should start to put hands on it? Or is it 
already implemented and I didn't noticed it?

Original issue reported on code.google.com by sg.chuj...@gmail.com on 1 Dec 2013 at 4:59

GoogleCodeExporter commented 9 years ago
That was easy to find:

Just did following patch in the svgedit.js (for me it was line 7836, method: 
this.setBackground = function (b, c) {...}):

            // BEFORE: d.appendChild(i)
            // DESCRIPTION:
            // insert after the <rect> (colour filling - white, gray/grey, black) but before possible <grid>, so the order is now:
            // <rect><background_image><grid>
            // AFTER:
            $(m).after(i)

The z-index way, patching the extension and not the core file didn't work for 
me, but I needed at least a "fast and dirty" solution, so one could investigate 
to get the z-index way working and not patching the core file of svg-edit.

Original comment by sg.chuj...@gmail.com on 2 Dec 2013 at 2:54