Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/svg/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
SVG文件是否会根据其属性自动压缩到尽可能小的像素大小?_Svg_Vector Graphics_Pixels_Automatic Properties - Fatal编程技术网

SVG文件是否会根据其属性自动压缩到尽可能小的像素大小?

SVG文件是否会根据其属性自动压缩到尽可能小的像素大小?,svg,vector-graphics,pixels,automatic-properties,Svg,Vector Graphics,Pixels,Automatic Properties,我正在编写一段用SVG生成图形的代码,我想知道生成的SVG文件的大小。例如,对于以下两行: <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg xmlns="http://www.w3.org/2000/svg" version="1.1

我正在编写一段用SVG生成图形的代码,我想知道生成的SVG文件的大小。例如,对于以下两行:

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<line x1="0" y1="0" x2="0" y2="400.0" stroke="black" stroke-width="1"/>
<line x1="0" y1="400.0" x2="600.0" y2="400.0" stroke="black" stroke-width="1"/>
</svg>


生成的图像将自动为600×400像素,对吗?或者我需要单独定义吗?

不,601×401像素。实际上是601个单位×601个单位。SVG将是容器的大小。