terrylinla / react-native-sketch-canvas

A React Native component for drawing by touching on both iOS and Android.
MIT License
692 stars 450 forks source link

Text is displaced on saving #179

Open Reshma-K-U opened 3 years ago

Reshma-K-U commented 3 years ago

I added multiple texts on canvas (I used SketchCanvas) using the absolute coordinates. The texts are placed at correct position on render. Then I saved the canvas using canvas's save method. When I displayed the image returned in onSketchSaved event all the texts are displaced from their position. The coordinates are get from react native's panResponder api When I go through the doc of this library I found some thing like coordinates in points...does this mean that I have to convert value in dp to pt? How can I place text on exact position even after saving Any help would be much appreciated i used canvasText object like this { text: 'test1', font: '', fontSize: 15, coordinate: 'Absolute' , position: { x: 500, y: 500 }

},