chenbo007 / svg-edit

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

Edit background attributes #39

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Add ability to change background attributes:
* color
* opacity

Original issue reported on code.google.com by rusn...@gmail.com on 22 Jun 2009 at 1:33

GoogleCodeExporter commented 9 years ago

Original comment by rusn...@gmail.com on 6 Jul 2009 at 9:51

GoogleCodeExporter commented 9 years ago
Need better definition on what this bug means.  Currently SVG-edit doesn't 
include a
background (but you can do this by placing in a full-editor rect of the 
color/opacity
you want).  Are you talking about some UI to do this for the user 
transparently?  If
so, this probably depends on implementing the Layers feature first (Issue 73).

However, if you are talking about using SVGT 1.2 properties viewport-fill and
viewport-fill-opacity:

http://www.w3.org/TR/SVGTiny12/painting.html#viewport-fill-property
http://www.w3.org/TR/SVGTiny12/painting.html#viewport-fill-opacity-property

then that is a different story.  We would need to wait until the majority of 
browsers
support this and then consider adding some UI for it.  To my knowledge the 
mainstream
browsers do not plan to support these feature (but please let me know if I'm 
mistaken).

Original comment by codedr...@gmail.com on 9 Sep 2009 at 9:48

GoogleCodeExporter commented 9 years ago
I was talking about a convenience which exists in another open-source SVG 
editor,
where you can choose to have a black or white canvas, and to have it opaque or 
not.

It's only a help during the drawing, the exported SVG still has a transparent
background, but it can help in some situations (when drawing white things...).
It certainly could be done with a "false" layer, of which the user could choose 
color
and opacity. So the user wouldn't have to add a filled rectangle as in the 
current
workaround.
I think it could be useful in some cases, e.g. designing stuff for an already
existing website of such or such color, etc.

It's not very "important", I agree. But it would be nice :-)

Original comment by worms_...@yahoo.com on 9 Sep 2009 at 10:27

GoogleCodeExporter commented 9 years ago
Actually, now that I think a little about this - adaveria's implementation of 
zoom
makes this easy to do (simply add a full 100%/100% rect to the outer SVG that 
never
gets serialized).  Probably we can do this after Issue 38 is complete - but we 
need
to think about the right way to introduce it into the SVG.  

Maybe only when the user clicks New ask them to choose?  Seems like it's 
something
you might want to change mid-drawing, but it's not something that should take up
space on the UI.

Hm, having some thoughts...

Original comment by codedr...@gmail.com on 9 Sep 2009 at 11:20

GoogleCodeExporter commented 9 years ago

Original comment by codedr...@gmail.com on 10 Sep 2009 at 7:05

GoogleCodeExporter commented 9 years ago
Actually I think this is a decent good first bug for someone - add some form 
controls
to the Document Properties window so that user can:

- choose a raster image (URL) - sets background-image of the canvas div
- choose a color - sets background-color of the canvas div

Original comment by codedr...@gmail.com on 17 Sep 2009 at 3:15

GoogleCodeExporter commented 9 years ago
Okay, I think I got Jeff's suggestion in comment #6 implemented in r869.

Note that this only allows the background to be changed in the editor, and will 
not
be saved in the exported image. I believe rusnakp was actually wanting the
"background rect" solution, which may be worth implementing separately.

I chose only a limited amount of colors to suggest to the user that this will 
not
actually affect the SVG. However, perhaps a better solution would be to use the 
color
picker and simply add a little note mentioning that it will not affect the SVG 
image.
Or is the heading "Editor Background" descriptive enough?

Feedback appreciated.

Original comment by adeve...@gmail.com on 22 Oct 2009 at 3:01

GoogleCodeExporter commented 9 years ago
I think with Layers it's pretty easy to create a background layer with a 
full-canvas
sized colored rect or the image you want.  Let me check out your implementation.

Original comment by codedr...@gmail.com on 22 Oct 2009 at 3:25

GoogleCodeExporter commented 9 years ago
Other than the odd Firefox+OSX artifact thing that sometimes shows up when 
dragging
over the checkerboard - I'm perfectly fine with this implementation - great 
work!

Original comment by codedr...@gmail.com on 22 Oct 2009 at 3:31

GoogleCodeExporter commented 9 years ago
Additional fix in r870. Seems good enough to people, so closing the issue.

Original comment by adeve...@gmail.com on 22 Oct 2009 at 5:43

GoogleCodeExporter commented 9 years ago
hi sir, 
this editor can save background image with editing image??

Original comment by mctarifa...@gmail.com on 25 Jun 2013 at 10:45