I have just been starting to use the Kivy framework, and am slightly confused on setting the window size based off the display size of the screen. For example if my display size is 200x100mm, how would I set that in Kivy?
I've looked at examples such as this one from SO, however I can't change seem to alter the size based off of the mm
metric.
I have also tried converting mm
to pixels
, however that is also the wrong size on my screen, and I think it is a frowned upon technique from what I have read online.
import kivy
kivy.require('1.9.1')
from kivy.config import Config
Config.set('graphics', 'width', '200')
Config.set('graphics', 'height', '100')
I would like to add 200mm and 100mm in, however that brings up errors when attempting to build:
[CRITICAL] [Window ] Unable to find any valuable Window provider at all!
sdl2 - ValueError: invalid literal for int() with base 10: '200mm'
How should I go about doing this in a correct manner?