QPaintDeviceMetrics(3qt)

NAME
QPaintDeviceMetrics - Information about a paint device

SYNOPSIS

#include <qpaintdevicemetrics.h>

  Public Members
QPaintDeviceMetrics ( const QPaintDevice * )
int width () const
int height () const
int widthMM () const
int heightMM () const
int numColors () const
int depth () const

DESCRIPTION
The QPaintDeviceMetrics class provides information about a paint device.

Sometimes it is necessary to obtain information about the physical size of a paint device when drawing graphics.

Example:

    QPaintDeviceMetrics pdm( myWidget );
    float aspect = (float)pdm.widthMM / (float)pdm.heightMM();

Examples: application/application.cpp

MEMBER FUNCTION DOCUMENTATION

QPaintDeviceMetrics::QPaintDeviceMetrics ( const QPaintDevice * pd )
Constructs a metric for the paint device pd.

int QPaintDeviceMetrics::depth () const
Returns the bit depth (number of bit planes) of the paint device.

int QPaintDeviceMetrics::height () const
Returns the height of the paint device, in default coordinate system units (e.g. pixels for QPixmap and QWidget).

Examples: application/application.cpp

int QPaintDeviceMetrics::heightMM () const
Returns the height of the paint device, measured in millimeters.

int QPaintDeviceMetrics::numColors () const
Returns the number of different colors available for the paint device.

int QPaintDeviceMetrics::width () const
Returns the width of the paint device, in default coordinate system units (e.g. pixels for QPixmap and QWidget).

Examples: application/application.cpp

int QPaintDeviceMetrics::widthMM () const
Returns the width of the paint device, measured in millimeters.

SEE ALSO
http://www.troll.no/qt/qpaintdevicemetrics.html

COPYRIGHT
Copyright 1992-1997 Troll Tech AS. See the LICENSE file included in the distribution for a complete license statement.

AUTHOR
Generated automatically from the source code.