Crops each <svg>
element in the collection so that it exactly fits its contents.
var svg = Pablo(demoElement).svg();
svg.circle({r:50});
svg.rect({
x:80, y:40,
width:40,
height:30
});
svg.css('background', 'red')
.crop();
Crops each <svg>
element in the collection so that it exactly fits its contents.
var svg = Pablo(demoElement).svg();
svg.circle({r:50});
svg.rect({
x:80, y:40,
width:40,
height:30
});
svg.css('background', 'red')
.crop();
Crops each <svg>
element in the collection to the supplied bounding box, which is an object containing x
, y
, width
and height
, as returned by the bbox() method.
var svg = Pablo(demoElement).svg();
svg.circle({r:50});
svg.rect({
x:80, y:40,
width:40,
height:30
});
svg.css('background', 'red')
.crop({x:10, y:10, width:100, height:50});
Crops each <svg>
element in the collection to the bounding box of the supplied elements, where elements
can be a collection, DOM node, CSS selector or anything else that can be contained in a Pablo collection.
var svg = Pablo(demoElement).svg(),
referenceCollection;
svg.circle({r:50});
referenceCollection = Pablo.rect({width:50, height:50});
svg.css('background', 'red')
.crop(referenceCollection);
Painting is just another way of keeping a diary.Pablo Picasso