Back to project page TweeningTextView.
The source code is released under:
Apache License
If you think the Android project TweeningTextView listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.kokalabs.svg; //from w ww . jav a2s.co m import com.google.common.collect.Lists; import java.util.List; public abstract class SvgGlyph { public static SvgGlyph from(final List<CubicBezierCurve> path) { return new SvgGlyph() { @Override public List<CubicBezierCurve> getPath() { return path; } }; } public static SvgGlyph from(final String pathDescriptions, final double unitsPerEm) { return new SvgGlyph() { List<CubicBezierCurve> cached; @Override public List<CubicBezierCurve> getPath() { if (cached == null) { SvgCommandAsCubicHandler toCubicBezierCurve = new SvgCommandAsCubicHandler(); new SvgGlyphParser(pathDescriptions).parseUsing(toCubicBezierCurve); cached = Lists.newArrayList(); for (CubicBezierCurve c : toCubicBezierCurve.getPathAsCubicBezierCurves()) { cached.add(c.normalizeWithMax(unitsPerEm * 2).flipAlongHorizontal()); } } return cached; } }; } public static SvgGlyph origin() { return SvgGlyph.from(Lists.newArrayList(CubicBezierCurve.origin())); } public abstract List<CubicBezierCurve> getPath(); }