Mikael Sand
ea17841eb5
Simplify manual kerning logic.
2017-07-22 17:19:09 +03:00
Mikael Sand
f4779efe9b
Optimize input matrix handling. Improve get(Parent)TextRoot naming.
...
Fix doc / comment.
2017-07-22 17:13:34 +03:00
Mikael Sand
1e2fd9b102
Refactor, extract common index list incrementation logic into private static method.
2017-07-22 16:27:13 +03:00
Mikael Sand
81044e480a
Fix translate and rotate regressions.
2017-07-22 16:20:04 +03:00
Mikael Sand
7c05e038b2
Refactor: simplify glyph translate calculation
2017-07-22 16:09:32 +03:00
Mikael Sand
d855b9605f
Refactor: simplify applyTextPropertiesToPaint
2017-07-22 16:00:19 +03:00
Mikael Sand
0620cb2295
Refactor: extract inline strings into private static final String constants.
2017-07-22 15:42:22 +03:00
Mikael Sand
33371ffe24
Fix index naming
2017-07-22 06:43:11 +03:00
Mikael Sand
431efe3f7b
Fix fontSize calculation for pushContext getFloatArrayFromReadableArray calls.
2017-07-22 06:32:16 +03:00
Mikael Sand
2f80931f4d
Fix very long lines.
2017-07-22 06:04:32 +03:00
Mikael Sand
4e99f2e9e1
Refactor getFloatArrayFromReadableArray
2017-07-22 05:59:48 +03:00
Mikael Sand
2e0d61bca5
Fix popContext mContextLength usage.
2017-07-22 05:53:03 +03:00
Mikael Sand
ba7d9c6da8
Refactor signature
2017-07-22 05:37:29 +03:00
Mikael Sand
a103cef1a6
Simplify naming
2017-07-22 05:31:32 +03:00
Mikael Sand
93d507b029
Simplify / Optimize nextRotation
2017-07-22 04:59:05 +03:00
Mikael Sand
5c885fe35e
Remove use of PointF, use plain float.
2017-07-22 04:37:03 +03:00
Mikael Sand
ac46b68f70
Restore default kerning, remove redundant reset.
2017-07-22 03:35:09 +03:00
Mikael Sand
92714207a6
Simplify getFont
2017-07-22 03:28:34 +03:00
Mikael Sand
b7bfaab63d
Cache textRoot for getTextRootGlyphContext.
...
Use getTextRootGlyphContext() instead of getTextRoot().getGlyphContext() in TextShadowNode.pushGlyphContext()
2017-07-22 03:00:15 +03:00
Mikael Sand
bb6ee3e430
Simplify naming.
2017-07-22 02:13:50 +03:00
Mikael Sand
ec2540a70c
Fix warnings, cleanup.
2017-07-22 00:55:10 +03:00
Mikael Sand
1a5610dfa9
Cache getTextRootGlyphContext, simplify.
2017-07-22 00:36:32 +03:00
Mikael Sand
cece2721ed
Fix formatting
2017-07-21 23:53:02 +03:00
Mikael Sand
60d956cb6c
Optimize pushContext and bytecode of getNext-Point/Delta/Rotation.
2017-07-21 23:38:28 +03:00
Mikael Sand
546fbc38ca
Cache fontSize in GlyphContext
2017-07-21 21:52:52 +03:00
Mikael Sand
c5d5ce18f7
Remove redundant if checks.
2017-07-21 21:07:20 +03:00
Mikael Sand
1b60081b11
Refactor common code into pushIndices method.
2017-07-21 21:00:47 +03:00
Mikael Sand
6c81f1a3bb
Optimize GlyphContext.
...
Use float[] and String[] instead of ArrayList<Float> and ArrayList<String>.
Restrict mutations to int and ArrayList<Integer>, use float[] and int index instead of ArrayList<Float> and .remove() to keep track of attribute value index. Makes several methods which were O(n^2) on the number of values in attribute list, into linear complexity on the number of ancestors defining attribute lists instead.
2017-07-21 20:40:15 +03:00
Mikael Sand
80e811e94b
Decrease branching in GlyphContext hot-spots.
...
Optimize getNextGlyphRotation, getNextDelta and getGlyphPosition.
2017-07-21 15:19:57 +03:00
Mikael Sand
3960a11c21
Fix code inspection / analysis warnings.
...
Update sdk, build tools, gradle, and target sdk version.
2017-07-21 02:41:54 +03:00
Mikael Sand
48b1d0882c
ViewBox, Text, Image, Gradient and Path rendering and generic matrix transforms now conforms with chrome, firefox, opera, and, edge; on desktop windows 10. And, on mobile chrome and firefox on android.
...
Fix resetting of location, delta, and, rotation; on every opening Text tag.
Stock Browser in Android Emulator doesn't support text on a path, requires setting precomputed x, y, dx, dy, and, rotate attributes for each character/glyph.
2017-07-20 21:50:48 +03:00
Mikael Sand
4ab1baa182
Simplify pull request git diff
2017-07-20 18:37:59 +03:00
Mikael Sand
8ffa2f3373
Implement correct ViewBox and Image transform
2017-07-20 06:18:50 +03:00
Mikael Sand
0e2b523f60
Implement correct canvas width/height, font-size and percentage calculation and units.
2017-07-20 02:07:50 +03:00
Mikael Sand
a5b9cea451
Implement support for remaining units.
2017-07-20 00:00:54 +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
3796b6a532
Implement correct calculation of fontSize from ancestors.
2017-07-19 22:10:10 +03:00
Mikael Sand
790542614d
First implementation attempt at generic em relative units.
2017-07-19 21:41:02 +03:00
Mikael Sand
4a757310df
Refactor and simplify GlyphContext
2017-07-19 19:48:09 +03:00
Mikael Sand
caffb0e16a
Refactor and simplify GlyphContext
2017-07-19 19:39:13 +03:00
Mikael Sand
e4ad4e3daf
Remove extra position context add call.
2017-07-19 19:14:10 +03:00
Mikael Sand
307dc59c46
Fix propagation of the ‘x’ and ‘y’ attributes.
2017-07-19 18:59:30 +03:00
Mikael Sand
3551f7d994
Optimize GlyphContext memory usage and computation.
2017-07-19 18:28:28 +03:00
Mikael Sand
ffaca06f4d
Optimize GlyphContext memory usage and computation.
2017-07-19 17:56:04 +03:00
Mikael Sand
6914e962c8
Optimize GlyphContext memory usage and computation.
2017-07-19 15:04:51 +03:00
Mikael Sand
b456fdb600
Fix warnings, cleanup.
2017-07-18 02:53:33 +03:00
Mikael Sand
ae48626815
Fix order of mRotationIndex calculation
2017-07-18 01:46:50 +03:00
Mikael Sand
99406fc0c5
Fix propagation of the ‘dx’ and ‘dy’ attribute.
...
Improve readability of GlyphContext.
2017-07-18 01:27:13 +03:00
Mikael Sand
c89fdd31c2
Fix propagation of the ‘rotate’ attribute.
...
https://www.w3.org/TR/SVG/text.html#TSpanElementRotateAttribute
https://www.w3.org/TR/SVG/text.html#ExampleTSpan03
Example tspan04, tspan05.
2017-07-17 18:14:47 +03:00
Mikael Sand
6bfee9395c
Fix kerning calculation for render method stretch
2017-07-17 12:39:26 +03:00