Canvas drawImage method does not draw
up vote
1
down vote
favorite
I have an issue with drawImage function. when I invoke
var paint = ui.Paint();
c.drawImage(backgroundImage, ui.Offset.zero, paint);
The image is drawn on emulator but on Huawei P20 it's not. When I run the app with
flutter run --enable-software-rendering
then the image is loaded but the UI is slow (I'm using photo_view to display the image and the dragging and zooming speed is unacceptable).
Is there any solution to this issue?
dart flutter
add a comment |
up vote
1
down vote
favorite
I have an issue with drawImage function. when I invoke
var paint = ui.Paint();
c.drawImage(backgroundImage, ui.Offset.zero, paint);
The image is drawn on emulator but on Huawei P20 it's not. When I run the app with
flutter run --enable-software-rendering
then the image is loaded but the UI is slow (I'm using photo_view to display the image and the dragging and zooming speed is unacceptable).
Is there any solution to this issue?
dart flutter
post full code to get help. This is quite hard like that
– mcfly
Nov 13 at 14:56
Image widget does work without that switch. I load asset resource. Regarding the code, please see this thread: stackoverflow.com/a/53217074/5492496 I'm using this very same code. What is more, the background image is not loaded when I draw it on the canvas, when I return it directly in MapRenderer.renderMap then everything is fine.
– RMK
Nov 14 at 8:50
As I described, everything works on emulator and on Huawei P20 with the flag. But does not without that flag so there must be some issue with rendering.
– RMK
Nov 15 at 9:06
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have an issue with drawImage function. when I invoke
var paint = ui.Paint();
c.drawImage(backgroundImage, ui.Offset.zero, paint);
The image is drawn on emulator but on Huawei P20 it's not. When I run the app with
flutter run --enable-software-rendering
then the image is loaded but the UI is slow (I'm using photo_view to display the image and the dragging and zooming speed is unacceptable).
Is there any solution to this issue?
dart flutter
I have an issue with drawImage function. when I invoke
var paint = ui.Paint();
c.drawImage(backgroundImage, ui.Offset.zero, paint);
The image is drawn on emulator but on Huawei P20 it's not. When I run the app with
flutter run --enable-software-rendering
then the image is loaded but the UI is slow (I'm using photo_view to display the image and the dragging and zooming speed is unacceptable).
Is there any solution to this issue?
dart flutter
dart flutter
asked Nov 13 at 12:40
RMK
647510
647510
post full code to get help. This is quite hard like that
– mcfly
Nov 13 at 14:56
Image widget does work without that switch. I load asset resource. Regarding the code, please see this thread: stackoverflow.com/a/53217074/5492496 I'm using this very same code. What is more, the background image is not loaded when I draw it on the canvas, when I return it directly in MapRenderer.renderMap then everything is fine.
– RMK
Nov 14 at 8:50
As I described, everything works on emulator and on Huawei P20 with the flag. But does not without that flag so there must be some issue with rendering.
– RMK
Nov 15 at 9:06
add a comment |
post full code to get help. This is quite hard like that
– mcfly
Nov 13 at 14:56
Image widget does work without that switch. I load asset resource. Regarding the code, please see this thread: stackoverflow.com/a/53217074/5492496 I'm using this very same code. What is more, the background image is not loaded when I draw it on the canvas, when I return it directly in MapRenderer.renderMap then everything is fine.
– RMK
Nov 14 at 8:50
As I described, everything works on emulator and on Huawei P20 with the flag. But does not without that flag so there must be some issue with rendering.
– RMK
Nov 15 at 9:06
post full code to get help. This is quite hard like that
– mcfly
Nov 13 at 14:56
post full code to get help. This is quite hard like that
– mcfly
Nov 13 at 14:56
Image widget does work without that switch. I load asset resource. Regarding the code, please see this thread: stackoverflow.com/a/53217074/5492496 I'm using this very same code. What is more, the background image is not loaded when I draw it on the canvas, when I return it directly in MapRenderer.renderMap then everything is fine.
– RMK
Nov 14 at 8:50
Image widget does work without that switch. I load asset resource. Regarding the code, please see this thread: stackoverflow.com/a/53217074/5492496 I'm using this very same code. What is more, the background image is not loaded when I draw it on the canvas, when I return it directly in MapRenderer.renderMap then everything is fine.
– RMK
Nov 14 at 8:50
As I described, everything works on emulator and on Huawei P20 with the flag. But does not without that flag so there must be some issue with rendering.
– RMK
Nov 15 at 9:06
As I described, everything works on emulator and on Huawei P20 with the flag. But does not without that flag so there must be some issue with rendering.
– RMK
Nov 15 at 9:06
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53281216%2fcanvas-drawimage-method-does-not-draw%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
post full code to get help. This is quite hard like that
– mcfly
Nov 13 at 14:56
Image widget does work without that switch. I load asset resource. Regarding the code, please see this thread: stackoverflow.com/a/53217074/5492496 I'm using this very same code. What is more, the background image is not loaded when I draw it on the canvas, when I return it directly in MapRenderer.renderMap then everything is fine.
– RMK
Nov 14 at 8:50
As I described, everything works on emulator and on Huawei P20 with the flag. But does not without that flag so there must be some issue with rendering.
– RMK
Nov 15 at 9:06