1
イメージをrequire
で参照していて、スプライトイメージからアイコンを切り抜きたいと思っていました。 イメージを反応ネイティブでトリミングする
const sprite = require('./sprite.png')
const crop = {left: 10, top: 50, width: 20, height: 40}
export const cartLogo = sprite({crop})
// How do I apply the crop to the sprite?
then
<Image source={cartLogo}/>
私が反応し、ネイティブの{uri: 'url-to-image', crop: {left: 10, top: 50, width: 20, height: 40}}
in hereを使用する際に、画像をトリミングする方法を参照してください。 require
でそれを行う方法?