SVG Coordinate System - points vs. pixels

后端 未结 1 1494
鱼传尺愫
鱼传尺愫 2021-02-20 09:35

Reading through the SVG 1.1 specification, I\'m trying to understand the relationship between the units used to define the initial viewport, and the units used throughout the re

相关标签:
1条回答
  • 2021-02-20 09:51

    You are correct. If the initial width/height is defined in points, and matches the viewbox declaration (which establishes ratio between user units and real sizes), then the default unit for the rest of the doc will be 1pt.

    cf: http://www.w3.org/TR/SVG/coords.html#SVGInitialUserCoordinateSystem

    (However, I should point out that your interpretation of the cubic bezier curve is not correct - the destination point is 52.75, 18.97 (aka the first two sets of coordinates specify control points, not destination point. Also note that the capital "C" denotes absolute coordinates (vs. small "c" being relative)).

    (Also, just being curious - but why are you picking points vs. pixels? That seems a little unusual unless you're planning to do interesting things with text.)

    0 讨论(0)
提交回复
热议问题