633 int glyph_width =
qCeil((gm.
x + gm.
width).toReal()) - glyph_x;
634 int glyph_height =
qCeil((gm.
y + gm.
height).toReal()) - glyph_y;
636 if (glyph_width <= 0 || glyph_height <= 0)
654 for (
int i=0; i<256; ++i)
655 colors[i] =
qRgba(0, 0, 0, i);
656 indexed.setColorTable(colors);
658 for (
int y=0; y<im.height(); ++y) {
660 uint *src = (
uint *) im.scanLine(y);
661 for (
int x=0; x<im.width(); ++x)
The QPainter class performs low-level painting on widgets and other paint devices.
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be ...
Q_DECL_CONSTEXPR T qAbs(const T &t)
int qAlpha(QRgb rgba)
Returns the alpha component of the ARGB quadruplet rgba.
The QImage class provides a hardware-independent image representation that allows direct access to th...
virtual glyph_metrics_t boundingBox(const QGlyphLayout &glyphs)=0
virtual void addGlyphsToPath(glyph_t *glyphs, QFixedPoint *positions, int nglyphs, QPainterPath *path, QTextItem::RenderFlags flags)
QRgb qRgba(int r, int g, int b, int a)
Returns the ARGB quadruplet ({a}, {r}, {g}, {b}).