You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Updates
Type into a text element on the canvas, for apps that put text on pictures.
SVGUIView.beginTextEditing(of:selecting:) makes the view the editor of a text element with the system keyboard, the caret, the selection with its handles, the edit menu and the marked text of input methods, as a text field has them. endTextEditing() ends it, and editedTextElement and editedText read what is edited.
SVGUIViewTextEditingDelegate tells when editing begins, when the text changes, with the text before the change for undo, and when editing ends, and decides whether a tap outside the text ends it.
A line feed makes lines of tspan elements, and xml:space="preserve" keeps the spaces, so that the document renders as typed. The caret and the selection of a text that a transform turns turn with it.
The viewer app shows how to select, move and turn texts with fingers, and keep the picture from shrinking for the keyboard.
Apply the transform property to gradients and patterns, whose gradientTransform and patternTransform are its presentation attributes in SVG 2.
Add mask-type, so that a mask of the alpha type masks with the alpha of its content.
Interpolate the colors of a gradient in linear sRGB for color-interpolation: linearRGB.
Read -webkit-clip-path as clip-path, as browsers do.
Match attribute selectors with namespaces, such as [xlink|href], with the namespaces that @namespace rules declare.
Fixes
Read maskUnits, so that the region of a mask is in fractions of the bounding box by default, and make masks and clip paths cover their regions and shapes rather than the bounds of the element, which cut off strokes and markers outside them.
Make the default region of a filter of userSpaceOnUse units percentages of the viewport.
Paint the fallback color for a gradient or a pattern whose transform has no inverse, such as scale(0).
Place the viewBox of a pattern at the origin of its tile, and scale it by patternTransform once.
Draw the cells of a rotated or skewed pattern without lines between them.
Turn a marker half a turn to the left of the direction into a vertex where a path turns back, as Chrome and Firefox do.
setAttribute(_:to:) sets nothing for a name that the document can't write as XML, such as a name with a prefix other than xml and xlink, so that svgData() always writes XML that can be read again.
Don't read text-orientation as a presentation attribute, as SVG 2 doesn't list it as one.