如何显示子部分或“切片”一张SVG图片? [英] How to show a subsection or "slice" of an SVG graphic?

查看:581
本文介绍了如何显示子部分或“切片”一张SVG图片?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法切片SVG。我的意思是任何已经可用的lib。我需要在Java中实现这个切片组件。



我的意思是,我有单个SVG文件和基于标尺/比例我选择图形,我想将单个SVG切成不同的SVG文件。



希望我很清楚

解决方案

是的,虽然,你会认为这是分类信息 - 或者只是根本不可能 - 基于找到这个基本事实的难度......



显然




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

解决方案

Yes, although, you'd think this was classified information - or just simply impossible - based on how hard it is to find this basic fact....

Apparently, all you need to do is reference the viewBox from a URI "fragment".. I have confirmed, it does indeed work. Take the following example... The lesson of the story, in case you miss it, is... image.svg#svgView(viewBox(100,100,100,100))

image.svg is defined as <svg .... viewBox="0,0,400,400" width="400" height="400">

http://example.com/image.svg

http://example.com/image.svg#svgView(viewBox(100,100,100,100))

这篇关于如何显示子部分或“切片”一张SVG图片?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆