mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-20 05:55:10 +00:00
Support G inherit props. Refactor text render. Text glyphs will perfectly draw along the path
18 lines
443 B
JavaScript
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
|
|
};
|
|
}
|