Mikael Sand
b9d37ac897
Fix parsing of floatingPointConstants in transformParser
...
Relax transforms commaWsp requirement from one or more to zero or more.
2018-01-03 23:05:05 +02:00
Mikael Sand
f94e17e3be
Implement correct transform parser ( #507 )
2017-11-30 17:32:16 -08:00
Lauren
6ed629af3d
support rotations around defined points ( #502 )
...
This PR uses optional `cx` and `cy` props from `rotate` to change the origin of a transformation when given. Should fix https://github.com/react-native-community/react-native-svg/issues/242
2017-11-23 13:47:39 -08:00
James Ide
f9e774e03d
Handle color parsing when alpha = 1 ( #512 )
...
The `color` library doesn't include alpha when accessing `color.rgb().array()` when the alpha value is 1. Since we always use the alpha value, make it default to 1 when parsing a color.
2017-11-23 13:47:01 -08:00
James Ide
235e132baf
Update "color" dep to 2.x to fix RN minifier bug
...
There's a bug with the version of UglifyJS that RN/Metro uses which causes an error about "e.length" inside of "color" that was fixed in 2.x. One change to "color" is that `rgbaArray()` was removed and now the call is `rgb().array()`.
2017-11-09 12:28:13 -08:00
Horcrux
e1380828f0
Merge branch 'master' into 6.0.0
...
# Conflicts:
# elements/TextPath.js
# package.json
2017-11-08 12:27:41 +08:00
Bruno Lemos
ebae6480ac
Fix createReactNativeComponentClass for RN < 0.50
2017-11-07 17:48:47 -02:00
Horcrux
9bdc23d4e6
merge master
2017-11-07 17:25:57 +08:00
Bruno Lemos
4a71c7f932
Make createReactNativeComponentClass backward compatible with react native < 0.50
2017-10-27 20:44:55 -02:00
magicismight
c51ebd4976
Merge branch '6.0.0' of https://github.com/msand/react-native-svg into 6.0.0
2017-09-24 16:04:50 +08:00
magicismight
7f88436332
Remove unused code
2017-09-24 15:59:18 +08:00
Mikael Sand
68eeb5e6da
Improve numberProp and numberArrayProp PropTypes usage.
...
Implement "normal" relative unit in java.
2017-08-15 13:31:42 +03:00
Horcrux
8065076959
Merge pull request #367 from boygirl/patch-1
...
Correct matrix typo
2017-08-10 10:16:14 +08:00
magicismight
2ddb0bddc6
Fix strokeDasharray.concat(strokeDasharray)
...
`strokeDasharray.concat(strokeDasharray)` has created a new array
should assign to strokeDasharray.
Remove devDependencies
2017-08-08 11:25:38 +08:00
Mikael Sand
a1b57d3f4f
Implement default and required css 3 fonts features, fontFeatureSettings, sub-/super- script baseline-shift.
...
Activate OpenType localized forms and features required for proper display of composed characters and marks.
2017-08-07 18:26:45 +03:00
Mikael Sand
a97122a994
Initial support for OpenType.js font data/tables/metrics.
2017-08-04 21:17:02 +03:00
Mikael Sand
fe7e8b2b65
Implement baselineShift and verticalAlign (preferred).
...
Transverse Box Alignment, specifies how an inline-level box is aligned within the line, and by how much the box is shifted up from its alignment point.
https://drafts.csswg.org/css-inline/#propdef-vertical-align
https://www.w3.org/TR/css-inline-3/#propdef-baseline-shift
https://www.w3.org/TR/css-inline-3/#transverse-alignment
2017-08-04 16:29:06 +03:00
Mikael Sand
2939584d1b
Implement font-variant-ligatures.
...
https://developer.mozilla.org/en/docs/Web/CSS/font-variant-ligatures
https://www.w3.org/TR/css-fonts-3/#font-variant-ligatures-prop
2017-08-04 14:10:02 +03:00
Mikael Sand
786b5f2375
Implement strokeDasharray correctly.
...
Support units and percentages with whitespace separated and/or (possibly white-space surrounded) comma separated length lists.
2017-08-04 00:26:00 +03:00
Mikael Sand
553c17794e
Implement support for multi-letter ligatures.
...
Typographic ligature: In writing and typography, a ligature occurs where two or more graphemes or letters are joined as a single glyph.
Optimize kerning and advance widths calculation using Paint.getTextWidths(String text, float[] widths);
Make strokeWidth numberProp instead of string.
Fix caching of AlignmentBaseline.
Rename distance to pathLength.
Upgrade gradle build tools.
2017-08-03 21:35:30 +03:00
Mikael Sand
3825bbd5c8
Fix startOfRendering calculation. Fix cursor position calculation. Refactor extractStroke strokeWidth handling.
2017-07-29 14:42:37 +03:00
Mikael Sand
d08103168a
Suggest adding a compatibility mid-line rendering attribute to textPath.
2017-07-26 03:51:57 +03:00
Mikael Sand
a8fdf64828
Ensure strokeWidth is string
2017-07-25 22:37:13 +03:00
Mikael Sand
54efe3ad1e
Fix strokeDasharray handling of odd number of length values and the 'none' value.
2017-07-25 21:58:07 +03:00
Mikael Sand
2d699b4e56
Add alignment-baseline aliases to support legacy content.
2017-07-25 10:00:32 +03:00
Mikael Sand
b140d673d7
Fix interpretation of alignmentBaseline (Shouldn't inherit).
2017-07-25 08:22:56 +03:00
Mikael Sand
c05c215496
Implement prop extraction for side and alignmentBaseline. Cleanup extractText, fix linting.
2017-07-25 07:45:08 +03:00
Mikael Sand
fddb4008d1
Extend and improve propTypes. Optimize javascript hidden classes and inline caching in V8.
...
Add lengthAdjust and textLength text / tspan attributes.
2017-07-25 04:07:04 +03:00
Mikael Sand
714768c1a7
Fix TextAnchor prop-type definition.
2017-07-24 03:33:34 +03:00
Mikael Sand
c502c67968
Fix TextAttributes differ
2017-07-24 03:26:56 +03:00
Mikael Sand
a14f2d0ca0
Fix fontDiffer
2017-07-24 00:16:17 +03:00
Mikael Sand
1a9a051ee9
Fix linting, warnings, add noinspection suppression comments.
2017-07-24 00:08:28 +03:00
Mikael Sand
80b9ff9d57
Fix font PropTypes
2017-07-23 22:55:39 +03:00
Mikael Sand
fc61c9dad2
Simplify textAnchor and textDecoration handling
2017-07-23 20:11:01 +03:00
Mikael Sand
dff02c3dbb
Implement wordSpacing in extractFont
2017-07-23 08:30:28 +03:00
Mikael Sand
eaf7b5e88b
Improve fontSize handling
2017-07-22 23:02:37 +03:00
Mikael Sand
ed9c0bd647
Restructure fontSize handling.
2017-07-22 22:05:38 +03:00
Mikael Sand
6b022ac861
Harmonize parseSVGLengthList usage and naming. Probably requires api change in ios as well.
2017-07-22 20:33:05 +03:00
Mikael Sand
5372355b11
Fix parsing of generic units in dx and dy, and percentages in rotate text attributes.
2017-07-22 19:11:41 +03:00
michal jarnot
30f968c546
Fix createReactNativeComponentClass import statements
2017-07-21 14:23:25 +02:00
Mikael Sand
0dcd5d7c92
Merge remote-tracking branch 'matrixfix/patch-1' into 5.3.0-conformance
2017-07-20 07:01:13 +03:00
Mikael Sand
ebeb89beb5
Improve units and fontSize implementation.
...
Implement support for units in strokewidth based on relativeOnOther.
2017-07-19 23:35:34 +03:00
Mikael Sand
8e15791107
Fix extractTransform not to interpret text rotate attribute and transform rotation
2017-07-16 02:01:50 +03:00
Mikael Sand
2458a2f262
Implement rotate and textDecoration
2017-07-16 01:50:59 +03:00
Mikael Sand
7547effd1f
Merge remote-tracking branch 'upstream/master' into 5.3.0-conformance
...
# Conflicts:
# lib/extract/extractViewBox.js
# package.json
2017-07-15 14:07:29 +03:00
Mikael Sand
c7039588f6
Improve coordinate system calculations for font-size, letter-spacing etc.
...
Fix parsing of transform to account for single parameter scale and translate correctly.
Fix skewX, had opposite of intended effect.
https://www.w3.org/TR/SVG/coords.html
https://www.w3.org/TR/SVG2/coords.html
https://www.w3.org/TR/SVGTiny12/coords.html
https://www.w3.org/TR/SVG/coords.html#TransformAttribute
https://www.w3.org/TR/SVG/coords.html#SkewXDefined
2017-06-27 20:45:04 +03:00
Igor Borges
2e5ea29e68
move createReactNativeComponentClass import
2017-06-26 18:11:32 -03:00
Mikael Sand
bd84f09a96
Implement correct path measurement, matrix calculation, getTextAnchorShift, startOffset.
...
Add method and spacing attributes to textPath.
Correct startOffset calculation.
Implement method="stretch".
2017-06-22 17:02:30 +03:00
Mikael Sand
dac969b944
First letterSpacing implementation attempt
2017-06-20 22:04:41 +03:00
Mikael Sand
155fa4b6ae
Implement support for em in dx and dy attributes and font props for G element
2017-06-20 03:15:01 +03:00