【发布时间】:2016-05-25 19:26:12
【问题描述】:
我正在使用 react native 制作一个图像编辑器应用程序。
只是添加函数和形状,如圆形或方形。
_handleAddCircle() {
let circle = {
left: 20,
top: 84
};
let circles = this.state.circles;
circles.push(circle);
this.setState({
circles: circles
});
},
render: function() {
let circles = this.state.circles.map((circle, key) => {
return (
<Circle key={key} left={circle.left} top={circle.top} updatePosition={this.updatePosition} />
);
});
return (
<View style={styles.container}>
<TouchableHighlight
style={styles.button}
onPress={this._handleAddCircle}
underlayColor="#88D4F5">
<Text style={styles.buttonText}>add</Text>
</TouchableHighlight>
<ScrollView ref="resultImage" style={styles.scrollView}>
<Image
style={styles.image}
source={require('../../resources/images/1422374259704.jpeg')} />
{circles}
</ScrollView>
<TouchableHighlight
style={styles.button}
onPress={this._handleSave}
underlayColor="#88D4F5">
<Text style={styles.buttonText}>save</Text>
</TouchableHighlight>
</View>
);
}
但我工作后找不到保存图像。
我猜想没有母语很难制作图像编辑器。
我需要什么包或插件?
【问题讨论】:
标签: android ios reactjs react-native image-editing