tags:

views:

221

answers:

2

Is there any way to slice an SVG . I mean any already available lib . I need to implement this slicing component in Java.

I mean , I have single SVG file and based rulers/scales i choose graphically , I want to slice the single SVG into different SVG files.

Hope I am clear

A: 

If you're working with SVG in Java, the Batik SVG Toolkit will provide a lot of functionality (I confess I don't know what you mean by slicing, however)

Brian Agnew
I have tried Batik , but it does support SVG slicing operation.
Jijoy
A: 

All you have to do is edit the <svg> tag. Edit width and height, set the viewBox attribute on the main svg element to the rectangle you want, render, repeat.

Each svg will contain all the data from the original but will only display the part of the drawing inside the viewBox. See http://dingoskidneys.com/~dholth/svg/

viewbox = "x y width height"
joeforker
I need to , slice a bigger SVG and turn them to mulitple SVGS.eg : I have a big picture , and i divde the whole rectangle into 9 rectangles based on my selection and the output should be these new 9 SVG files , made of content inside these rectangles.I hope I am clear ?
Jijoy
It makes sense. As long as you don't mind that the slices are the same size on disk, viewBox is all you need.
joeforker