Files
react-native-svg/lib/extract/extractFill.js
Horcrux 7e13b801e1 refactor text render
Support G inherit props.
Refactor text render. Text glyphs will perfectly draw along the path
2016-07-22 23:49:15 +08:00

18 lines
443 B
JavaScript

import extractBrush from './extractBrush';
import extractOpacity from './extractOpacity';
import _ from 'lodash';
const fillRules = {
evenodd: 0,
nonzero: 1
};
export default function(props) {
return {
// default fill is black
fill: extractBrush(_.isNil(props.fill) ? '#000' : props.fill),
fillOpacity: extractOpacity(props.fillOpacity),
fillRule: fillRules[props.fillRule] === 0 ? 0 : 1
};
}