refactor text render

Support G inherit props.
Refactor text render. Text glyphs will perfectly draw along the path
This commit is contained in:
Horcrux
2016-07-22 23:49:15 +08:00
parent 63f793c54e
commit 7e13b801e1
41 changed files with 467 additions and 477 deletions

View File

@@ -17,16 +17,11 @@ const joins = {
export default function(props) {
let {stroke} = props;
if (!stroke) {
return null;
}
let strokeWidth = +props.strokeWidth;
if (_.isNil(props.strokeWidth)) {
strokeWidth = 1;
} else if (!strokeWidth) {
return;
strokeWidth = null;
}
let strokeDasharray = props.strokeDasharray;
@@ -40,10 +35,6 @@ export default function(props) {
strokeDasharray.push(strokeDasharray[0]);
}
if (!stroke) {
stroke = '#000';
}
return {
stroke: extractBrush(stroke),
strokeOpacity: extractOpacity(props.strokeOpacity),