CSS requires the use of a 'unit identifier'. If a 'unit identifier' is missing or 'px', the length is interpreted to be in 'user units'.The width could also be written as '960' or '960px' using the CSS/SVG defined value of 96 pixels per inch.The width of '10in' could be equivalently written as '25.4cm', '254mm', etc.It is very unlikely to be the nominal size when displayed on a digital screen. The actual size of the drawing when displayed depends on how it is displayed.Only used in ui/widget/page-sizer.cpp.Ĭonsider an SVG with the following SVG root element:ĭrawing size This is a nominal 10圆 inch drawing. The variable has been renamed to 'page_size_units' in trunk. It's only use is to set the default unit in the page-sizer widget. Page Size Unit Identifier (namedview 'units') The unit identifier displayed in the page size widget. (Renamed to avoid confusion.) Read in sp-namedview.cpp, read and written in ui/dialog/document-properties.cpp, metafile-inout.cpp, test_reassemble.c. This value is returned in 0.91 by getDefaultUnit() and in trunk by getDisplayUnit(). During the run-up to 0.91 it was used in some places to represent the "SVG Scale". a width may be displayed in mm in the GUI but should be stored in 'user units'). It should not be used when storing numerical values inside the SVG file (e.g. Inkscape specific GUI Unit Identifier ('inkscape:document-units') The unit identifier displayed in the GUI. It serves to map 'user units' inside an SVG document to the real world. SVG Scale Factor A scale factor determined by SVG root 'width'/'height' and the 'viewBox'. In SVG there are six ' absolute' unit identifiers: 'mm', 'cm', 'in', 'pt', 'pc', 'px' and several ' relative' unit identifiers: 'em', 'ex', '%'. Unit Identifier The part of a length value that expresses the units used to interpret the length. Generic SVG User Unit A term defined by the SVG specification: a unit length in the current user coordinate system. Often unit is used when one should use unit identifier. To better understand the following discussion it is necessary to have well defined terms to describe which unit is being talked about. It should be noted that the relative units em, ex, and % can be As 'px' is defined in SVG to be the same as a user unit the following are equal: font-size="20" and style="font-size:20px". In CSS a unit identifier must be present. "real" world value of the SVG user unit.) This reflect the opinion of ViewBox determines an appropriate scale for a drawing. The root width and height may have units, which with a proper Eventually, after long arguments, the CSS working group dictated that one inch would be fixed to 96 pixels regardless of screen resolution (ironically, with so called Retina displays, there is once again interest in scaling drawings based on DPI).Ībsolute units (other than 'px' inside CSS) should not be used inside an SVG file with one exception: Thus, the use of "real" units never became popular and in reality it is usually not what one wanted. Display manufactures rarely provided the means to query the DPI of the display, and when they did, they often returned incorrect results. This required that displays be queryable as to what their true DPI was. In otherwords, a "one inch square" would be displayed on a screen as a physical one inch square. In the early days it was assumed that one would want to display drawings on a screen at full scale. Part of the problem with units in SVG and CSS in general is why they are there in the first place. Units are not as straight-forward as one should think they are. This page documents the philosophy for Units handling inside Inkscape.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |