Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qpixelformat.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include "qpixelformat.h"
5
7
488static_assert(sizeof(QPixelFormat) == sizeof(quint64));
489
490
491namespace QtPrivate {
493 uchar alphaSize,
494 QPixelFormat::AlphaUsage alphaUsage,
495 QPixelFormat::AlphaPosition alphaPosition,
497 QPixelFormat::TypeInterpretation typeInterpretation,
498 QPixelFormat::ByteOrder byteOrder)
499 {
500 uchar bits_per_pixel = 0;
501 switch (yuvLayout) {
503 bits_per_pixel = 24;
504 break;
506 bits_per_pixel = 16;
507 break;
512 bits_per_pixel = 12;
513 break;
516 bits_per_pixel = 16;
517 break;
520 bits_per_pixel = 12;
521 break;
526 bits_per_pixel = 12;
527 break;
528 case QPixelFormat::Y8:
529 bits_per_pixel = 8;
530 break;
532 bits_per_pixel = 16;
533 break;
534 }
535
537 0, 0, 0, 0,
538 bits_per_pixel,
539 alphaSize,
540 alphaUsage,
541 alphaPosition,
542 premultiplied,
543 typeInterpretation,
544 byteOrder,
545 yuvLayout);
546 }
547}
548
\inmodule QtGui
ByteOrder
This enum describes the ByteOrder of the pixel format.
AlphaPosition
This enum type is used to describe the alpha channels position relative to the color channels.
AlphaPremultiplied
This enum type describes the boolean state if the alpha channel is multiplied into the color channels...
TypeInterpretation
This enum describes how each pixel is interpreted.
YUVLayout
YUV is not represented by describing the size of the color channels.
AlphaUsage
This enum describes if the alpha channel is used or not.
Combined button and popup list for selecting options.
\macro QT_NO_KEYWORDS >
QPixelFormat QPixelFormat_createYUV(QPixelFormat::YUVLayout yuvLayout, uchar alphaSize, QPixelFormat::AlphaUsage alphaUsage, QPixelFormat::AlphaPosition alphaPosition, QPixelFormat::AlphaPremultiplied premultiplied, QPixelFormat::TypeInterpretation typeInterpretation, QPixelFormat::ByteOrder byteOrder)
unsigned char uchar
Definition qtypes.h:32
unsigned long long quint64
Definition qtypes.h:61