QBitmap Class ReferenceThe QBitmap class provides monochrome (1-bit depth) pixmaps. Далее... #include <QBitmap> Унаследован от: QPixmap. Открытые функции
Статические открытые члены
Дополнительные унаследованные члены
Подробное описаниеThe QBitmap class provides monochrome (1-bit depth) pixmaps. The QBitmap class is a monochrome off-screen paint device used mainly for creating custom QCursor and QBrush objects, constructing QRegion objects, and for setting masks for pixmaps and widgets. QBitmap is a QPixmap subclass ensuring a depth of 1, except for null objects which have a depth of 0. If a pixmap with a depth greater than 1 is assigned to a bitmap, the bitmap will be dithered automatically. Use the QColor objects Qt::color0 and Qt::color1 when drawing on a QBitmap object (or a QPixmap object with depth 1). Painting with Qt::color0 sets the bitmap bits to 0, and painting with Qt::color1 sets the bits to 1. For a bitmap, 0-bits indicate background (or transparent pixels) and 1-bits indicate foreground (or opaque pixels). Use the clear() function to set all the bits to Qt::color0. Note that using the Qt::black and Qt::white colors make no sense because the QColor::pixel() value is not necessarily 0 for black and 1 for white. The QBitmap class provides the transformed() function returning a transformed copy of the bitmap; use the QTransform argument to translate, scale, shear, and rotate the bitmap. In addition, QBitmap provides the static fromData() function which returns a bitmap constructed from the given uchar data, and the static fromImage() function returning a converted copy of a QImage object. Just like the QPixmap class, QBitmap is optimized by the use of implicit data sharing. For more information, see the Implicit Data Sharing documentation. See also QPixmap, QImage, QImageReader, and QImageWriter. Описание функций-членовQBitmap::QBitmap ()Constructs a null bitmap. See also QPixmap::isNull(). QBitmap::QBitmap ( const QPixmap & pixmap )Constructs a bitmap that is a copy of the given pixmap. If the pixmap has a depth greater than 1, the resulting bitmap will be dithered automatically. See also QPixmap::depth(), fromImage(), and fromData(). QBitmap::QBitmap ( int width, int height )Создаёт битовое изображение с заданной шириной width и высотой height. The pixels inside are uninitialized. See also clear(). QBitmap::QBitmap ( const QSize & size )Создаёт битовое изображение заданного размера size. The pixels in the bitmap are uninitialized. See also clear(). QBitmap::QBitmap ( const QString & fileName, const char * format = 0 )Constructs a bitmap from the file specified by the given fileName. If the file does not exist, or has an unknown format, the bitmap becomes a null bitmap. The fileName and format parameters are passed on to the QPixmap::load() function. If the file format uses more than 1 bit per pixel, the resulting bitmap will be dithered automatically. See also QPixmap::isNull() and QImageReader::imageFormat(). QBitmap::~QBitmap ()Destroys the bitmap. void QBitmap::clear ()Clears the bitmap, setting all its bits to Qt::color0. QBitmap QBitmap::fromData ( const QSize & size, const uchar * bits, QImage::Format monoFormat = QImage::Format_MonoLSB ) [static]Создаёт битовое изображение заданного размера size, а также устанавливает содержимым предоставленное bits. The bitmap data has to be byte aligned and provided in in the bit order specified by monoFormat. The mono format must be either QImage::Format_Mono or QImage::Format_MonoLSB. Use QImage::Format_Mono to specify data on the XBM format. See also fromImage(). QBitmap QBitmap::fromImage ( const QImage & image, Qt::ImageConversionFlags flags = Qt::AutoColor ) [static]Returns a copy of the given image converted to a bitmap using the specified image conversion flags. See also fromData(). void QBitmap::swap ( QBitmap & other )Swaps bitmap other with this bitmap. Эта операция очень быстрая и не может завершиться ошибкой. Эта функция была введена в Qt 4.8. QBitmap QBitmap::transformed ( const QTransform & matrix ) constВозвращает копию данного битового изображения, преобразованного согласно заданной матрице matrix. See also QPixmap::transformed(). QBitmap::operator QVariant () constReturns the bitmap as a QVariant. QBitmap & QBitmap::operator= ( const QPixmap & pixmap )Это перегруженная функция. Assigns the given pixmap to this bitmap and returns a reference to this bitmap. If the pixmap has a depth greater than 1, the resulting bitmap will be dithered automatically. See also QPixmap::depth(). |
Попытка перевода Qt документации. Если есть желание присоединиться, или если есть замечания или пожелания, то заходите на форум: Перевод Qt документации на русский язык... Люди внесшие вклад в перевод: Команда переводчиков |