.. include:: headings.inc .. _VideoMode: ========================================================================================================================================== |phoenix_title| **VideoMode** ========================================================================================================================================== Determines the sizes and locations of displays connected to the system. .. seealso:: :func:`ClientDisplayRect`, :func:`DisplaySize`, :func:`DisplaySizeMM` | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **VideoMode** .. raw:: html

Inheritance diagram of VideoMode

| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~VideoMode.__init__` Constructs this class using the given parameters. :meth:`~VideoMode.GetDepth` Returns bits per pixel (e.g. :meth:`~VideoMode.GetHeight` Returns the screen height in pixels (e.g. :meth:`~VideoMode.GetWidth` Returns the screen width in pixels (e.g. :meth:`~VideoMode.IsOk` Returns ``True`` if the object has been initialized. :meth:`~VideoMode.Matches` Returns ``True`` if this mode matches the other one in the sense that all non zero fields of the other mode have the same value in this one (except for refresh which is allowed to have a greater value). :meth:`~VideoMode.__nonzero__` :meth:`~VideoMode.__ne__` :meth:`~VideoMode.__eq__` ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~VideoMode.Depth` See :meth:`~VideoMode.GetDepth` :attr:`~VideoMode.Height` See :meth:`~VideoMode.GetHeight` :attr:`~VideoMode.Width` See :meth:`~VideoMode.GetWidth` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: VideoMode(object) Determines the sizes and locations of displays connected to the system. **Possible constructors**:: VideoMode(width=0, height=0, depth=0, freq=0) .. method:: __init__(self, width=0, height=0, depth=0, freq=0) Constructs this class using the given parameters. :param `width`: :type `width`: int :param `height`: :type `height`: int :param `depth`: :type `depth`: int :param `freq`: :type `freq`: int .. method:: GetDepth(self) Returns bits per pixel (e.g. 32), 1 is monochrome and 0 means unspecified/known. :rtype: `int` .. method:: GetHeight(self) Returns the screen height in pixels (e.g. 480), 0 means unspecified. :rtype: `int` .. method:: GetWidth(self) Returns the screen width in pixels (e.g. 640), 0 means unspecified. :rtype: `int` .. method:: IsOk(self) Returns ``True`` if the object has been initialized. :rtype: `bool` .. method:: Matches(self, other) Returns ``True`` if this mode matches the other one in the sense that all non zero fields of the other mode have the same value in this one (except for refresh which is allowed to have a greater value). :param `other`: :type `other`: VideoMode :rtype: `bool` .. method:: __nonzero__(self) :rtype: `int` .. method:: __ne__(self) :param `mode`: :type `mode`: VideoMode .. method:: __eq__(self) :param `m`: :type `m`: VideoMode .. attribute:: Depth See :meth:`~VideoMode.GetDepth` .. attribute:: Height See :meth:`~VideoMode.GetHeight` .. attribute:: Width See :meth:`~VideoMode.GetWidth`