Commit Graph

195 Commits

Author SHA1 Message Date
Ben Roth
5f74c92a58 Namespaces or un-globalifies a handful more iOS globals 2018-02-16 17:14:10 -08:00
Mikael Sand
13487029c0 Fix paths. 2018-02-15 13:29:32 +02:00
Ben Roth
b217dcaff8 Prefix iOS symbols with RNSVG
fixes https://github.com/react-native-community/react-native-svg/issues/603
2018-02-14 19:04:32 -08:00
James Ide
10f8134dab Add "typedef" to NS_ENUM declarations, fix duplicate symbol error
NS_ENUM is designed to go with typedef c.f. Apple docs: https://developer.apple.com/library/content/releasenotes/ObjectiveC/ModernizationObjC/AdoptingModernObjective-C/AdoptingModernObjective-C.html#//apple_ref/doc/uid/TP40014150-CH1-SW6

Fixes #579
2018-02-12 18:14:04 -08:00
Mikael Sand
be81454041 Fix strokeWidth hitArea units calculation 2018-02-03 20:09:36 +02:00
Douglas Lowder
27f0245110 Fix tvOS compile issue (BezierElement.m) 2018-01-26 23:08:39 -08:00
Mikael Sand
310fbed841 Fix image rendering 2018-01-03 20:30:36 +02:00
Mikael Sand
83d00d09db Optimize and improve accuracy of textPath. 2018-01-02 23:39:58 +02:00
Mikael Sand
4a8808b0fb Fix handling of combined ligatures and kerning.
Remove hasGlyph helper and ligature tracking array.
Use single call to:
 - CFAttributedStringCreate
 - CTLineCreateWithAttributedString
and a call per bi-di/layout run to:
 - CTRunGetGlyphs for glyphs
 - CTFontGetAdvancesForGlyphs for advances
 - CTRunGetStringIndices for indices of ligatures
And an efficient loop over the substituted characters of ligatures,
to make glyph context calls for incrementing the attribute indices.
2018-01-02 23:17:04 +02:00
Mikael Sand
17a66f3c2c Fix ligature glyph advance value calculation on ios 2017-12-31 15:36:26 +02:00
Mikael Sand
f8b0d34c6a Fix types and glyph context nextX spacing handling. 2017-12-31 04:23:58 +02:00
Mikael Sand
9ab405cbec Add binary search for text paths with lineCount >= 16 2017-12-31 01:38:28 +02:00
Mikael Sand
f07e8f041c Allow TextPath to reference any RNSVGNode instead of only RNSVGPath.
Remove unused RNSVGTextAnchor
2017-12-30 03:35:58 +02:00
Mikael Sand
7088d52b71 Refactor and simplify, cache path properties.
Remove use of UIBezierPath and categories.
2017-12-29 23:04:24 +02:00
Mikael Sand
f49eabf8e8 Rewrite recursive block using stack and while loop. 2017-12-28 16:55:06 +02:00
Mikael Sand
77dbd3c306 Fix retain cycle warning 2017-12-28 14:57:49 +02:00
Mikael Sand
b9959c779c Implement tailor made data structure and logic for text on a path rendering.
Remove postinstall script and dependencies on PerformanceBezier & QuartzBookPack.
2017-12-28 06:25:07 +02:00
Mikael Sand
ec2a967592 Implement getAlignmentBaseline and getBaselineShift in ios. (#527)
* Implement correct transform parser

* Implement getAlignmentBaseline and getBaselineShift in ios.
Add comments to glyphcontext and align with android.
Implement correct isWordSeparator predicate.
Cleanup GlyphContext j2objc remnants.

* Fix getBaselineShift bugs and font data invalidation.
2017-12-16 08:57:53 -08:00
Ben Roth
9fa9667a93 Fix crash when passing wrong type to percentage prop 2017-12-04 17:25:48 -08:00
NoilPaw
e4269aed9f Respect responsible flag of RNSVGNode. (#293) 2017-11-23 13:48:17 -08:00
szakhlypa
ffea98f863 Fix memory leak in iOS RNSVGTSpan (#521) 2017-11-23 13:46:48 -08:00
Horcrux
7474c90957 Fix image render 2017-11-08 12:25:39 +08:00
Horcrux
75786787e9 Fix Image in iOS 2017-11-08 01:34:53 +08:00
Horcrux
5b2972f8f6 Fix Symbol position 2017-11-08 01:14:45 +08:00
Horcrux
bd189437a4 Remove unused linker flags 2017-11-07 23:55:06 +08:00
Horcrux
177f71c801 import QuartzBookPack as framework 2017-11-07 21:03:53 +08:00
Horcrux
6081b27822 Fix fontWeight and fontStyle 2017-11-07 19:29:36 +08:00
Horcrux
2998aa1bb6 Download Quartz and PerformanceBezier from github 2017-11-07 18:49:53 +08:00
magicismight
be8797be52 Add PerformanceBezier as a submodule 2017-09-24 23:44:17 +08:00
magicismight
d5923bb4fe fix exc_bad_access errors 2017-09-24 21:19:27 +08:00
Mikael Sand
5a01d672b9 Optimize and simplify hasGlyph. 2017-08-29 03:16:52 +03:00
Mikael Sand
04887af278 Implement kerning, ligatures, etc., and cleanup; in ios.
Implement hasGlyph ligature helper.

Export view property setters for:
 text: textLength, baselineShift, lengthAdjust, alignmentBaseline,
 textPath: side, method, midLine, spacing.

Attempt to fix alignmentBaseline and baselineShift,
but both properties are nil at all times, I must be missing something.
2017-08-29 02:34:56 +03:00
Mikael Sand
0dbddcc2b4 Fix viewbox scale and translate order/interaction on ios. 2017-08-27 17:31:03 +03:00
Mikael Sand
8dd795bdd7 Fix text on a path rendering accuracy 2017-08-27 01:09:01 +03:00
Mikael Sand
6cc3f76b24 Fix relative strokeWidth and relativeOnOther usage. 2017-08-25 14:34:00 +03:00
Mikael Sand
c6028e825d Fix rotate and G element font settings. 2017-08-25 13:46:03 +03:00
Mikael Sand
95736f2f69 Disable ligatures on ios (doesn't account for per character advance width correctly yet) 2017-08-24 21:43:34 +03:00
Mikael Sand
e604d7fb8f Simplify enum parsing 2017-08-24 19:14:11 +03:00
Mikael Sand
5372a3078e Cleanup headers 2017-08-24 12:42:18 +03:00
Mikael Sand
13d5157fc1 Cleanup. 2017-08-23 16:22:49 +03:00
Mikael Sand
ccb8729917 Port new GlyphContext, FontData, enums, props, Bezier and text rendering 2017-08-23 05:41:35 +03:00
Mikael Sand
3cafc34cb2 Fix ViewBox, images, transforms, and, gradients; on ios.
Make getContextWidth/Height and setupGlyphContext take clip bounding box and affine transform matrix into consideration.
2017-08-16 19:06:23 +03:00
Mikael Sand
f1657d9ddf Prepare for new GlyphContext. 2017-08-15 19:50:50 +03:00
Mikael Sand
1c1e8a860b Fix type warning. 2017-08-15 15:44:10 +03:00
Mikael Sand
f3cd34f2e1 Fix ios/objective-c types and errors/red boxes. 2017-08-11 02:27:33 +03:00
magicismight
39ffaaf758 Fix #387 2017-07-21 12:26:09 +08:00
Albert Brand
7048492fce Make clipPaths animations possible again, recreate clipPath on every getClipPath call during render (not during hitTest) 2017-05-31 16:50:49 +02:00
Connor McEwen
3682234d25 Add tvOS target 2017-04-26 13:00:16 +01:00
Horcrux
9df76e5668 Use Image.propTypes.source as href propType 2017-04-04 10:45:54 +08:00
Horcrux
cad8d8902b Merge pull request #216 from gpminsuk/master
Data URI support for href in react-native-svg Image tag
2017-04-04 10:41:35 +08:00