Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Junior Mechanic
Posted
Hi,
i am a new user of sitespinner.
I want to create, edit, or modify SVG files.
Now I am searching for a solution to import existing svg files into sitespinner, "expande" them to native objects, modify or edit them and finaly save them as ims files.
How should I do this? Thanks!
 
Posts: 5 | Registered: August 30, 2004Reply With QuoteEdit or Delete MessageReport This Post
D_L
Honorary Mechanic
Picture of D_L
Posted Hide Post
welcome .. nice to see a new SVG fan ..

try this .. open new page ..

SiteSpinner toolbar | object | import foreign object
choose format > SVG
select path to *.svg file
 
Posts: 415 | Location: U.K. | Registered: July 06, 2003Reply With QuoteEdit or Delete MessageReport This Post
Junior Mechanic
Posted Hide Post
Ok,
I know this, but the import is only the first step.

In a second step I want see and edit the imported svg objects in the sitespinner editor, but how?
I see only a frame as placeholder.

And third, if I publish them in html mode, I can see the imported objects, but I want to publish in svg mode and there is nothing to see about the imported svg objects!
What's wrong?
 
Posts: 5 | Registered: August 30, 2004Reply With QuoteEdit or Delete MessageReport This Post
D_L
Honorary Mechanic
Picture of D_L
Posted Hide Post
Have you browsed through some of the earlier postings in this section of forum .. on SVG?

if you import a foreign object SVG file there is no way of editing that object code in SiteSpinner .. after importing .. you can only display the SVG code (see below)

so you have to edit the SVG .. before importing into SiteSpinner

you can view the SVG script by Toolbar | Publish | Display Code .. and choose SVG in the drop down menu in the code display toolbar

but again .. you cannot edit this ..

...

However, you can create SVG objects as WYSIWYG objects within SiteSpinner and publish as SVG .. so you can use SiteSpinner (or perhaps better Web Engine) as your SVG object development tool.

Are you embedding SVG in HTML .. as explained here .. embedding SVG .. ?

and you do have the Adobe SVG plugin installed?

also place your *.SVG file (imported) into your publish folder (as you would any imported file such as *.SWF etc.).

if you wish to add interactivity (SVG animation) you should try out Web Engine (in beta) which complements SiteSpinner

Nice 3rd party SVG editor here ..www.inkscape.org

This message has been edited. Last edited by: D_L,
 
Posts: 415 | Location: U.K. | Registered: July 06, 2003Reply With QuoteEdit or Delete MessageReport This Post
Junior Mechanic
Posted Hide Post
Hi,
I hoped I can use Sitespinner as explained above, because I have some existing svg-files, which I created with other SVG-editors and I have to expand them. The reason, why I am searching for a new editor are lots of transform terms, which grows up with every change (move object) of the file. I need a solution, which keeps the files "flat".
regards friedhelm.
 
Posts: 5 | Registered: August 30, 2004Reply With QuoteEdit or Delete MessageReport This Post
D_L
Honorary Mechanic
Picture of D_L
Posted Hide Post
I'm still not too clear of your requirements ..

what do you mean by "expand" the objects .. and what do you expect of the SVG parser / editor?

what SVG object attributes are changing / growing ..

might point you in the right direction if you can explain more.
___________________________________

p.s.

research .. Apache Batik

quote:
With Batik, you can manipulate SVG documents anywhere Java is available. You can also use the various Batik modules to generate, manipulate, transcode and search SVG images in your applications or applets.


some other useful references .. although you probably know them if you have generated SVG content .. included here for other readers ..

http://www.w3.org/Graphics/SVG/

http://www.xml.com/graphics/

http://www.xml.com/pub/rg/SVG_Software

This message has been edited. Last edited by: D_L,
 
Posts: 415 | Location: U.K. | Registered: July 06, 2003Reply With QuoteEdit or Delete MessageReport This Post
VM Staff
Picture of Harpo
Posted Hide Post
Hello FriedhelmE,

You can import SVG so that the code is included in your SiteSpinner file but you cannot bring it into the WYSIWYG environment.

You would need to create the geometries in SiteSpinner if you need to edit them graphically afterwards.
 
Posts: 3215 | Registered: January 08, 2003Reply With QuoteEdit or Delete MessageReport This Post
Junior Mechanic
Posted Hide Post
Sorry,
but english is not the language of my mother...

The main problem I have is the following:
1. I create a svg object (rect) at place "one" and size "one"
2. I move the rectangle from place "one" to place "two" and change the size from "one" to "two".
3.I move the rectangle back from place "two" to place "one" and change the size back from "two" to "one".

Now the result of the svg-source-code isn't the original from point 1, but an expanded svg-source with some tokens like transform="translate(133 81) translate(-63 -60) scale(1.2 1.36585) scale(0.904762 0.803571)".

So I am searching for a resolution which cleans or better avoids this source overhead.

regards friedhelm
 
Posts: 5 | Registered: August 30, 2004Reply With QuoteEdit or Delete MessageReport This Post
VM Staff
Picture of Harpo
Posted Hide Post
In SiteSpinner a tranformation matrix is applied to all objects. This matrix is used intead of scale(), translate() rotate() etc.

The matrix is recalculated so that only one matrix is applied to the geometry regargless of how often it has been moved or re-sized. However, that does mean that an identity matrix is applied to an object even if it has no transformations.

To answer your specific questions from a previous post:

"...I want see and edit the imported svg objects in the sitespinner editor, but how? I see only a frame as placeholder."

As I mentioned above, you cannot graphically edit imported SVG code. You can only 'include' the code and position it by positioning the code object frame.

"...if I publish them in html mode, I can see the imported objects, but I want to publish in svg mode and there is nothing to see about the imported svg objects!"

If you see nothing when you preview or publish the page it means that either a) the code is incorrect (you may have included header code for example) or b) the SVG code is positioning the objects beyond the bounds of the page.

try pasting this example into a code object to see how it works:

<text x="50" y="150" font-family="Verdana" font-size="25" fill="blue" > Hello, out there </text> <!-- Show outline of canvas using 'rect' element --> <rect x="1" y="1" width="300" height="300" fill="none" stroke="blue" stroke-width="2" />
 
Posts: 3215 | Registered: January 08, 2003Reply With QuoteEdit or Delete MessageReport This Post
D_L
Honorary Mechanic
Picture of D_L
Posted Hide Post
I'm intrigued ..

if I create this test SVG file in inkscape

and try to import .. as foreign SVG object .. it does not publish in SVG

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
   id="svg1"
   sodipodi:version="0.32"
   inkscape:version="0.38cvs-040410.1009"
   width="210mm"
   height="297mm"
   sodipodi:docname="inkscape.svg"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
   xmlns:xlink="http://www.w3.org/1999/xlink"
   sodipodi:docbase="C:\Program Files\Apache Group\Apache2\htdocs\www\svg">
  <defs
     id="defs3" />
  <sodipodi:namedview
     id="base"
     pagecolor="#ffffff"
     bordercolor="#666666"
     borderopacity="1.0"
     inkscape:pageopacity="0.0"
     inkscape:pageshadow="2"
     inkscape:zoom="0.43415836"
     inkscape:cx="305.25953"
     inkscape:cy="417.84947"
     inkscape:window-width="640"
     inkscape:window-height="500"
     inkscape:window-x="66"
     inkscape:window-y="87" />
  <rect
     style="fill:#0000ff;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000pt;"
     id="rect825"
     width="351.25433"
     height="328.22125"
     ry="51.824409"
     x="184.26456"
     y="266.35867" />
</svg>


but .. if I now just paste only the rectangle object .. into code editor as suggested by Harpo ..

 <rect style="fill:#0000ff;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000000pt;"
     id="rect825"
     width="351.25433"
     height="328.22125"
     ry="51.824409"
     x="184.26456"
     y="266.35867" />


this object displays correctly in publish SVG.

So .. my question .. what headers must be stripped off when importing into SiteSpinner any SVG files created by third party editors?

This message has been edited. Last edited by: D_L,
 
Posts: 415 | Location: U.K. | Registered: July 06, 2003Reply With QuoteEdit or Delete MessageReport This Post
Junior Mechanic
Posted Hide Post
Ok, I understand it.
I can't use Sitespinner to "normalize" transformations in existing svg files, because I cannot graphically edit imported SVG code.
Perhaps this is a new feature for the future of Sitespinner?

But have you an idea, if there is an other tool, which can do this work?
 
Posts: 5 | Registered: August 30, 2004Reply With QuoteEdit or Delete MessageReport This Post
D_L
Honorary Mechanic
Picture of D_L
Posted Hide Post
Yes .. that is correct .. as explained above ..
_________________________________________

Harpo might suggest some "client side" ideas using SiteSpinner (or Web Engine which is designed for SVG animation .. have you tried that?) ..

but if you have external (legacy) SVG files then it seems that the only approach would be to use "server side" scripting on your SVG files.

server side scripting options include using PHP or Java ..

but be aware that you will need some control over the server configuration, so this may not meet your requirements if you are looking for a simple "tool".

_________________________________________

first, read through all the links posted above ..

including .. http://xml.apache.org/batik/

also consider using PHP as your server side scripting language allowing the attributes of SVG objects to be changed on the fly

very good example seen here ..

http://www.carto.net/papers/svg/samples/serverside_svg_php.shtml

you will need to install a personal server .. and PHP .. to experiment .. since PHP only works server side .. not client side ..

more on PHP here ..

http://www.w3schools.com/php/default.asp

and here .. http://www.php.net

also, search this forum .. use Find | "php"

you can get very simple "starter" personal server from http://www.badblue.com to run PHP scripts on your personal PC .. instal on some port such as 8080.

but you might migrate later to a more robust server such as Apache.

so .. no easy solution.
 
Posts: 415 | Location: U.K. | Registered: July 06, 2003Reply With QuoteEdit or Delete MessageReport This Post
D_L
Honorary Mechanic
Picture of D_L
Posted Hide Post
Further notes on the experiment with PHP + SVG

Setting up SiteSpinner to publish PHP and PSVG .. to a local server (Apache) running on say port number 8080.

Options | Project Target Options - select Publish Format = SVG (note: typo error here .. Fomat should read Format)

Page | Page Editor | HTML File Extension - create two new file extensions- .php and .psvg (note the preceding dot)

Publish | Publish Project

Profile Tab:-
Profile select Files on disk
Publish Format select SVG


Pages Tab:-
set extension .psvg (if running PHP + SVG)
or
set extension .php (if running just PHP)

Path Options

Local Publish Directory - choose the root directory of your server
e.g. in my localhost server installation .. Apache2
C:\Program Files\Apache Group\Apache2\htdocs\

Gather all files

tick "Add Base" .. and insert the localhost URL
e.g. in my localhost server installation
http://localhost:8080/

Now you can publish PHP and PSVG pages into your localserver and see them running on your local server.

________________________

footnote: when "publishing" or "previewing" *.php or *.psvg pages for the first time in SiteSpinner you will be asked to associate each of these new extensions with a file .. go to Windows Explorer | Tools | Folder Options | File Types .. and associate IE browser with these two new extensions to be added there.

This message has been edited. Last edited by: D_L,
 
Posts: 415 | Location: U.K. | Registered: July 06, 2003Reply With QuoteEdit or Delete MessageReport This Post
VM Staff
Picture of Harpo
Posted Hide Post
We may add the ability to import SVG to native format at some point but it would not be in the near future. I would guess that most SVG editors that import code would normalize it but I have not tested any.

D_L:
You must strip off the document headers (<xml>, <DOCTYPE> etc). If you use everything inside and including the <svg> tags, it will work but generally for vaild code you would want to use only the specific geometry you need. It is similar to HTML where you can place a <body> or <head> inside a <body> but it will not be strictly correct.
 
Posts: 3215 | Registered: January 08, 2003Reply With QuoteEdit or Delete MessageReport This Post
  Powered by Eve Community  
 


™ & © 1998 - 2008, Virtual Mechanics Inc. All rights reserved.