![]() |
Qt 6.x
The Qt SDK
|
#include <qvideotexturehelper_p.h>
Public Member Functions | |
bool | update (const QSize &frameSize, QString text) |
void | draw (QPainter *painter, const QPointF &translate) const |
QImage | toImage () const |
Public Attributes | |
QSize | videoSize |
QRectF | bounds |
QTextLayout | layout |
Definition at line 78 of file qvideotexturehelper_p.h.
void QVideoTextureHelper::SubtitleLayout::draw | ( | QPainter * | painter, |
const QPointF & | translate | ||
) | const |
Definition at line 793 of file qvideotexturehelper.cpp.
References Qt::black, bounds, QPainter::CompositionMode_SourceOver, QTextLayout::draw(), QPainter::drawRect(), layout, Qt::NoPen, painter, QPainter::restore(), QPainter::save(), QColor::setAlpha(), QPainter::setBrush(), QPainter::setCompositionMode(), QPainter::setPen(), QString::size(), QTextLayout::text(), QPainter::translate(), translate(), and Qt::white.
QImage QVideoTextureHelper::SubtitleLayout::toImage | ( | ) | const |
Definition at line 813 of file qvideotexturehelper.cpp.
References Qt::black, bounds, QTextLayout::draw(), QImage::Format_RGBA8888_Premultiplied, layout, painter, QColor::setAlpha(), QString::size(), QRectF::size(), QTextLayout::text(), QRectF::topLeft(), QSizeF::toSize(), QPainter::translate(), and Qt::white.
Referenced by QVideoWindowPrivate::updateSubtitle().
Definition at line 739 of file qvideotexturehelper.cpp.
References Qt::AlignCenter, QTextLayout::beginLayout(), bounds, QTextLayout::createLine(), QTextLayout::endLayout(), font, frameSize(), QSize::height(), QString::isEmpty(), layout, line, QChar::LineSeparator, qMax(), QString::replace(), QTextLayout::setFont(), QFont::setPointSize(), QTextLayout::setPosition(), QTextLayout::setText(), QTextLayout::setTextOption(), text, QTextLayout::text(), videoSize, and QSize::width().
Referenced by QVideoWindowPrivate::updateSubtitle().
QRectF QVideoTextureHelper::SubtitleLayout::bounds |
Definition at line 81 of file qvideotexturehelper_p.h.
Referenced by draw(), QVideoWindowPrivate::render(), toImage(), update(), and QVideoWindowPrivate::updateSubtitle().
QTextLayout QVideoTextureHelper::SubtitleLayout::layout |
Definition at line 82 of file qvideotexturehelper_p.h.
QSize QVideoTextureHelper::SubtitleLayout::videoSize |
Definition at line 80 of file qvideotexturehelper_p.h.
Referenced by QVideoWindowPrivate::render(), and update().