我正在使用react-native-sketch库https://www.npmjs.com/package/react-native-sketch,我遇到了一些问题。我想投影一个灰色的文本并在其上面“写”,就像这样。
我遇到的问题是我目前的设置,我可以在草图视图上书写,但文字在草图视图“上方”,所以我看不到文本视图背后的任何文字。如何在sketchview上方移动文本?谢谢!
import Sketch from 'react-native-sketch';
import React, {Component} from 'react';
import { ScrollView,StyleSheet, Text, View, TouchableHighlight } from 'react-native';
export default class App extends React.Component {
save = () => { this.sketch.save().then(({ path }) => { Alert.alert('Image saved!', path); }); };
render() {
return (
<View>
<CardView>
<View>
<Text> Draw </Text>
<View>
<Sketch
ref={sketch => { this.sketch = sketch; }}
strokeColor="black"
style = {styles.sketch}
strokeThickness={3}>
<View>
<Text> text here </Text>
</View>
</Sketch>
</View>
</View>
</CardView>
</View>
);
}
}