Closed otis78 closed 5 years ago
I think this issue is due to the pixel ratio. I logged the canvas size and i see that the the real size in pixel in my case is 263x263px equivalent to 100x100dp. I am drawing expecting that the conversion from dp to pixel is done by your plugin but to have the correct draw size I have to multiply every value for the display density (utils.layout.getDisplayDensity()). Is this the expected behavior?
@otis78 thanks for the example. Will fix this today. What is the android simulated device?
It is a Pixel 2 API 27
@otis78 btw can you share the full sample app? or at list the page template
Sure, see the attachment demo-angular.zip
@otis78 should be fixed in 1.0.4
Thanks @farfromrefug. It works. The only difference about this issue are the different values returned by the canvas methods getWidth and getHeight. iOS returns the values in dp (in my example 100x100). Android returns the values in pixels that in my example is 263x263. It would be better to uniform this values. What do you think about this?
@otis78 will do
@otis78 should be fixed in 1.0.5
Hi @farfromrefug. There are a lot of decimals but it works.
@otis78 hadn't any here. Will look at one point
Which platform(s) does your issue occur on?
Please, provide the following version numbers that your issue occurs with:
Please, tell us how to recreate the issue in as much detail as possible.
This si my onDraw code:
Running the App in both emulator you can se the diffent size in Android. As a reference I draw below of the CanvasView a simple label with the expected size (100x100dp). Se the attached screenshot.
thanks