⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qpaintdevicemetrics.3qt

📁 Qt/Embedded是一个多平台的C++图形用户界面应用程序框架
💻 3QT
字号:
.TH QPaintDeviceMetrics 3qt "10 November 2000" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2000 Trolltech AS.  All rights reserved.  See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQPaintDeviceMetrics \- Information about a paint device.SH SYNOPSIS.br.PP\fC#include <qpaintdevicemetrics.h>\fR.PP.SS "Public Members".in +1c.ti -1c.BI "\fBQPaintDeviceMetrics\fR ( const QPaintDevice * ) ".br.ti -1c.BI "enum { PdmWidth = 1, PdmHeight, PdmWidthMM, PdmHeightMM, PdmNumColors, PdmDepth, PdmDpiX, PdmDpiY }".br.ti -1c.BI "int \fBwidth\fR () const".br.ti -1c.BI "int \fBheight\fR () const".br.ti -1c.BI "int \fBwidthMM\fR () const".br.ti -1c.BI "int \fBheightMM\fR () const".br.ti -1c.BI "int \fBlogicalDpiX\fR () const".br.ti -1c.BI "int \fBlogicalDpiY\fR () const".br.ti -1c.BI "int \fBnumColors\fR () const".br.ti -1c.BI "int \fBdepth\fR () const".br.in -1c.SH DESCRIPTIONThe QPaintDeviceMetrics class provides information about a paint device..PPSometimes it is necessary to obtain information about the physical characteristics of a paint device when drawing graphics. This class provides just that. For example, to compute the aspect ratio of a paint device:.PP.nf.br    QPaintDeviceMetrics pdm( myWidget );.br    double aspect = (double)pdm.widthMM() / (double)pdm.heightMM();.fi.PPQPaintDeviceMetrics contains methods to provide the width and height of a device in both pixels and millimeters, the number of colors the device supports, the number of bit planes, and finally the resolution of the device..PPNote that it is not always possible for QPaintDeviceMetrics to compute the values you ask for, particularly for external devices. The ultimate example is asking for the resolution of a QPrinter that is set to "print to file" - who knows what printer that file will end up?..SH MEMBER FUNCTION DOCUMENTATION.SH "QPaintDeviceMetrics::QPaintDeviceMetrics ( const QPaintDevice * pd )"Constructs a metric for the paint device \fIpd.\fR.SH "int QPaintDeviceMetrics::depth () const"Returns the bit depth (number of bit planes) of the paint device..SH "int QPaintDeviceMetrics::height () const"Returns the height of the paint device, in default coordinate system units (e.g. pixels for QPixmap and QWidget)..SH "int QPaintDeviceMetrics::heightMM () const"Returns the height of the paint device, measured in millimeters..SH "int QPaintDeviceMetrics::logicalDpiX () const"Returns the horizontal resolution of the device, in dots per inch, that is used when computing font sizes. For X this is usually the same as could be computed from widthMM(), but on Windows this varies..SH "int QPaintDeviceMetrics::logicalDpiY () const"Returns the vertical resolution of the device, in dots per inch, that is used when computing font sizes. For X this is usually the same as could be computed from heightMM(), but on Windows this varies..SH "int QPaintDeviceMetrics::numColors () const"Returns the number of different colors available for the paint device..SH "int QPaintDeviceMetrics::width () const"Returns the width of the paint device, in default coordinate system units (e.g. pixels for QPixmap and QWidget)..SH "int QPaintDeviceMetrics::widthMM () const"Returns the width of the paint device, measured in millimeters..SH "SEE ALSO".BR http://doc.trolltech.com/qpaintdevicemetrics.html.SH COPYRIGHTCopyright 1992-2000 Trolltech AS, http://www.trolltech.com/.  See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -