![]() Translate( translate-x, translate-y) scale( scale-x, scale-y). The transform applied to content contained by the element is given by ( e-height - vb-height * scale-y) to translate-y. ( e-height - vb-height * scale-y) / 2 to translate-y. ( e-width - vb-width * scale-x) to translate-x. ( e-width - vb-width * scale-x) / 2 to translate-x. Initialize translate-y to e-y - ( vb-y * scale-y).Initialize translate-x to e-x - ( vb-x * scale-x).Set the smaller of scale-x and scale-y to the larger. Otherwise, if align is not 'none' and meetOrSlice is 'slice',.The larger of scale-x and scale-y to the smaller. If align is not 'none' and meetOrSlice is 'meet', set.Initialize scale-y to e-height/ vb-height.Initialize scale-x to e-width/ vb-width.If preserveAspectRatio is not defined or if meetOrSlice is missing from this value. Let meetOrSlice be the meetOrSlice value of preserveAspectRatio, or 'meet'.Let align be the align value of preserveAspectRatio, or 'xMidYMid' if.The position and size of the element respectively. The min-x, min-y, width and height values of the viewBox attribute respectively. The position and size of the element on which the viewBox attribute is defined,Īnd the value of the preserveAspectRatio attribute on that element into a translation andĪ scale that is applied to content contained by the element. This process converts the min-x, min-y, width and height values of a viewBox attribute, Computing the equivalent transform of an SVG viewport The viewport coordinate system relative to the parent element's user coordinate system.Ībstractly, all SVG viewports are embedded in theĪ drawing region that is infinitely large in all relevant dimensions. However, a transform property on an SVG viewport's element will modify Seeīy default, a nested SVG viewport's viewport coordinate system is equivalent to the localĬoordinate system of the parent element, translated by the origin of the SVG viewport'sĮlement. Parent of that fragment (whether real or implicit). Process between the SVG document fragment generating the SVG viewport, and the The width, height and origin of SVG viewports is established by a negotiation Units and provide a new reference rectangle for "fitting" a graphic relative SVG viewports provides an opportunity to redefine the meaning of percentage ![]() To the width and height of the nearest ancestral SVG viewport. Percentage units are resolved with reference Child elements of a viewport canįurther modify the user coordinate system, for example by specifying Relative to the viewport coordinate system as described in ![]() Providing a ‘ viewBox’ on a viewport's element transforms the user coordinate system SeeĮstablishing a new SVG viewport for informationĪnd a user coordinate system, initially identical. SVG viewports are only established by elements. Establishing an initial viewport is described in more ![]() SVG viewport that establishes a mapping between the coordinate system usedīy the containing environment (for example, CSS pixels in web browsers)Īnd user units. Note that the term SVG viewport is distinct from the (width, height), and an origin, measured in abstract With a rule name as part of the component's styleOverrides property in a custom theme.Every SVG viewport defines a drawing region characterized by a size.You can override the style of the component using one of these customization options: Styles applied to the root element if fontSize="large". Styles applied to the root element if fontSize="medium". Styles applied to the root element if fontSize="small". Styles applied to the root element if fontSize="inherit". Styles applied to the root element if color="disabled". Styles applied to the root element if color="error". Styles applied to the root element if color="action". Styles applied to the root element if color="secondary". Styles applied to the root element if color="primary". Theme default props You can use MuiSvgIcon to change the default props of this component with the theme. The ref is forwarded to the root element. ![]() For example, if the SVG element is 500 (width) by 200 (height), and you pass viewBox="0 0 50 20", this means that the coordinates inside the SVG will go from the top left corner (0,0) to bottom right (50,20) and each unit will be worth 10px. Allows you to redefine what the coordinates without units mean inside an SVG element. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |