本文整理汇总了C++中QWMatrix::dy方法的典型用法代码示例。如果您正苦于以下问题:C++ QWMatrix::dy方法的具体用法?C++ QWMatrix::dy怎么用?C++ QWMatrix::dy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QWMatrix
的用法示例。
在下文中一共展示了QWMatrix::dy方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: paintScheme
// -----------------------------------------------------------------------
void GraphicText::paintScheme(QPainter *p)
{
QWMatrix wm = p->worldMatrix();
QWMatrix Mat (wm.m11(), 0.0, 0.0, wm.m22(),
wm.dx() + double(cx) * wm.m11(),
wm.dy() + double(cy) * wm.m22());
p->setWorldMatrix(Mat);
p->rotate(-Angle);
p->drawRect(0, 0, x2, y2);
p->setWorldMatrix(wm);
}
示例2: draw
/*!\overload
Draws the formatted text with \a p, at position (\a x, \a y), clipped
to \a clipRegion. Colors from the \a cg are used as
needed, and if not 0, *\a paper is used as the background brush.
Note that the display code is highly optimized to reduce flicker, so
passing a brush for \a paper is preferable to simply clearing the area
to be painted and then calling this without a brush.
This is a convenience function if there's no palette but just a
color group available. If you have a palette, pass this instead of \a cg.
*/
void QSimpleRichText::draw( QPainter* p, int x, int y, const QRegion& clipRegion,
const QColorGroup& cg, const QBrush* paper) const
{
QRect r = clipRegion.boundingRect();
QRegion bg = clipRegion;
d->doc->draw(p, x, y, 0, 0, r.x(), r.y(), r.width(), r.height(), bg, cg,
QTextOptions( paper, d->linkColor, d->linkUnderline ) );
if (paper) {
#ifndef QT_NO_TRANSFORMATIONS
QWMatrix wm = p->worldMatrix();
bg.translate( int(wm.dx()), int(wm.dy()) );
#endif
p->setClipRegion(bg);
if ( paper->pixmap() )
p->drawTiledPixmap( r, *paper->pixmap());
else
p->fillRect(r, *paper);
p->setClipping( FALSE );
}
}