I draw a picture and display it like this:

// рисую в отдельном классе ... Canvas canvas = main_picture.beginRecording(w,h); canvas.drawLine(10, 10, 100, 100, point); ... main_picture.endRecording(); .... // Вывожу в MainActivity на imgView canvas.drawPicture(main_picture); imgView.invalidate(); 

If the screen resolution on the device is very large, then all the drawn lines become poorly distinguishable. Is it possible to reduce or increase the dpi depending on the screen resolution? Or is it solved in some other way?

  • Keep a few options for pictures. Load one or the other depending on the resolution and scale it if necessary. - GreyGoblin
  • You can increase the width of the lines depending on the screen resolution;) - Eugene Troyanskii
  • You can not store options for pictures, because they are all created in memory and always different. The width of the lines to change is also not an option, because In addition to the lines, pictograms with constant width and height are also loaded. Something needs to be done with scaling the image entirely, but at the expense of changing the dpi. - kaaa

0