您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ updateFont函数代码示例

51自学网 2021-06-03 09:13:34
  C++
这篇教程C++ updateFont函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中updateFont函数的典型用法代码示例。如果您正苦于以下问题:C++ updateFont函数的具体用法?C++ updateFont怎么用?C++ updateFont使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了updateFont函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: updateFont

void KexiTitleLabel::changeEvent(QEvent* event){    QLabel::changeEvent(event);    if (event->type() == QEvent::FontChange) {        updateFont();    }}
开发者ID:abhishekmurthy,项目名称:Calligra,代码行数:7,


示例2: updateFont

void QgsLabelingGui::on_mFontSizeSpinBox_valueChanged( double d ){  QFont font = lblFontPreview->font();  font.setPointSizeF( d );  lblFontPreview->setFont( font );  updateFont( font );}
开发者ID:CzendaZdenda,项目名称:qgis,代码行数:7,


示例3: setTextFont

void setTextFont(const char *pfn) {  size_t len;  ACL_ASSERT_BEGIN_PAINT;  len = strlen(pfn);  strcpy(g_fontName, pfn);  updateFont();}
开发者ID:ZJU-Shaonian-Biancheng-Tuan,项目名称:ACLLib,代码行数:7,


示例4: SkASSERT

void SkPDFDevice::drawPosText(const SkDraw&, const void* text, size_t len,                              const SkScalar pos[], SkScalar constY,                              int scalarsPerPos, const SkPaint& paint) {    SkASSERT(1 == scalarsPerPos || 2 == scalarsPerPos);    SkPaint textPaint = calculateTextPaint(paint);    updateGSFromPaint(textPaint, true);    // Make sure we have a glyph id encoding.    SkAutoFree glyphStorage;    uint16_t* glyphIDs;    size_t numGlyphs;    if (paint.getTextEncoding() != SkPaint::kGlyphID_TextEncoding) {        numGlyphs = paint.textToGlyphs(text, len, NULL);        glyphIDs = (uint16_t*)sk_malloc_flags(numGlyphs * 2,                                              SK_MALLOC_TEMP | SK_MALLOC_THROW);        glyphStorage.set(glyphIDs);        paint.textToGlyphs(text, len, glyphIDs);        textPaint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);    } else {        SkASSERT((len & 1) == 0);        numGlyphs = len / 2;        glyphIDs = (uint16_t*)text;    }    SkDrawCacheProc glyphCacheProc = textPaint.getDrawCacheProc();    fContent.writeText("BT/n");    updateFont(textPaint, glyphIDs[0]);    for (size_t i = 0; i < numGlyphs; i++) {        SkPDFFont* font = fGraphicStack[fGraphicStackIndex].fFont;        uint16_t encodedValue = glyphIDs[i];        if (font->glyphsToPDFFontEncoding(&encodedValue, 1) != 1) {            updateFont(textPaint, glyphIDs[i]);            i--;            continue;        }        SkScalar x = pos[i * scalarsPerPos];        SkScalar y = scalarsPerPos == 1 ? constY : pos[i * scalarsPerPos + 1];        alignText(glyphCacheProc, textPaint, glyphIDs + i, 1, &x, &y, NULL);        setTextTransform(x, y, textPaint.getTextSkewX());        SkString encodedString =            SkPDFString::formatString(&encodedValue, 1,                                      font->multiByteGlyphs());        fContent.writeText(encodedString.c_str());        fContent.writeText(" Tj/n");    }    fContent.writeText("ET/n");}
开发者ID:xuchiheng,项目名称:ucore-arm-skia,代码行数:47,


示例5: updateFont

void MSWidget::font(Font font_){   if (font_!=font())    {     Font old=font();     _fontID=font_;     updateFont(old);   }}
开发者ID:PlanetAPL,项目名称:a-plus,代码行数:9,


示例6: updateFont

void Label::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags){    if (! _visible || _originalUTF8String.empty())    {        return;    }    if (_systemFontDirty)    {        updateFont();    }    if (_contentDirty)    {        updateContent();    }    uint32_t flags = processParentFlags(parentTransform, parentFlags);    if (_shadowEnabled && _shadowBlurRadius <= 0 && (_shadowDirty || (flags & FLAGS_DIRTY_MASK)))    {        _position.x += _shadowOffset.width;        _position.y += _shadowOffset.height;        _transformDirty = _inverseDirty = true;        _shadowTransform = transform(parentTransform);        _position.x -= _shadowOffset.width;        _position.y -= _shadowOffset.height;        _transformDirty = _inverseDirty = true;        _shadowDirty = false;    }    // IMPORTANT:    // To ease the migration to v3.0, we still support the Mat4 stack,    // but it is deprecated and your code should not rely on it    Director* director = Director::getInstance();    CCASSERT(nullptr != director, "Director is null when seting matrix stack");        director->pushMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);    director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW, _modelViewTransform);        if (_textSprite)    {        drawTextSprite(renderer, flags);    }    else    {        draw(renderer, _modelViewTransform, flags);    }    director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);        // FIX ME: Why need to set _orderOfArrival to 0??    // Please refer to https://github.com/cocos2d/cocos2d-x/pull/6920    // setOrderOfArrival(0);}
开发者ID:AppleJDay,项目名称:cocos2d-x,代码行数:57,


示例7: updateFont

void Label::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated){    if (! _visible || _originalUTF8String.empty())    {        return;    }    if (_fontDirty)    {        updateFont();    }    if (_contentDirty)    {        updateContent();    }    bool dirty = parentTransformUpdated || _transformUpdated;    if (_shadowEnabled && _shadowBlurRadius <= 0 && (_shadowDirty || dirty))    {        _position.x += _shadowOffset.width;        _position.y += _shadowOffset.height;        _transformDirty = _inverseDirty = true;        _shadowTransform = transform(parentTransform);        _position.x -= _shadowOffset.width;        _position.y -= _shadowOffset.height;        _transformDirty = _inverseDirty = true;        _shadowDirty = false;    }    if(dirty)    {        _modelViewTransform = transform(parentTransform);    }    _transformUpdated = false;    // IMPORTANT:    // To ease the migration to v3.0, we still support the kmGL stack,    // but it is deprecated and your code should not rely on it    kmGLPushMatrix();    kmGLLoadMatrix(&_modelViewTransform);    if (_textSprite)    {        drawTextSprite(renderer,dirty);    }    else    {        draw(renderer, _modelViewTransform, dirty);    }    kmGLPopMatrix();        setOrderOfArrival(0);}
开发者ID:1007650105,项目名称:RockChipmunk2D,代码行数:57,


示例8: nextFont

	void nextFont()	{		number++;		if (number >= fontNames.size())			number = fontNames.size() - 1;		updateFont();	}
开发者ID:SonicZentropy,项目名称:ZenAutoTrim,代码行数:9,


示例9: painter

void TrackView::paintEvent(QPaintEvent *event){	QStylePainter painter(this->viewport());	updateFont(painter.fontMetrics()); // HACK: the fontMetrics we get from QWidget is not scaled properly	paintTopMargin(painter, event->region());	paintLeftMargin(painter, event->region());	paintTracks(painter, event->region());}
开发者ID:kusma,项目名称:rocket,代码行数:10,


示例10: if

void KopeteRichTextEditPart::setFont( const QString &newFont ){	mFont.setFamily( newFont );	if( m_capabilities & Kopete::Protocol::RichFont)		editor->setFamily( newFont );	else if( m_capabilities & Kopete::Protocol::BaseFont)		editor->setFont( mFont );	updateFont();	writeConfig();}
开发者ID:serghei,项目名称:kde3-kdenetwork,代码行数:10,


示例11: Q_Q

void QGraphicsWidgetPrivate::resolveFont(uint inheritedMask){    Q_Q(QGraphicsWidget);    inheritedFontResolveMask = inheritedMask;    if (QGraphicsWidget *p = q->parentWidget())        inheritedFontResolveMask |= p->d_func()->inheritedFontResolveMask;    QFont naturalFont = naturalWidgetFont();    QFont resolvedFont = font.resolve(naturalFont);    updateFont(resolvedFont);}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:10,


示例12: QAbstractScrollArea

TrackView::TrackView(SyncPage *page, QWidget *parent) :    QAbstractScrollArea(parent),    page(page),    windowRows(0),    readOnly(false),    dragging(false){	Q_ASSERT(page);	lineEdit = new QLineEdit(this);	lineEdit->setAutoFillBackground(true);	lineEdit->hide();	QDoubleValidator *lineEditValidator = new QDoubleValidator();	lineEditValidator->setNotation(QDoubleValidator::StandardNotation);	lineEditValidator->setLocale(QLocale::c());	lineEdit->setValidator(lineEditValidator);	QObject::connect(lineEdit, SIGNAL(editingFinished()), this, SLOT(onEditingFinished()));	viewport()->setAutoFillBackground(false);	setFocus(Qt::OtherFocusReason);	setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn);	setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);	scrollPosX = 0;	scrollPosY = 0;	editRow = 0;	editTrack = 0;	selectionStart = selectionEnd = QPoint(0, 0);	updateFont(fontMetrics());	updatePalette();	stepPen = QPen();	lerpPen = QPen(QBrush(Qt::red), 2);	smoothPen = QPen(QBrush(Qt::green), 2);	rampPen = QPen(QBrush(Qt::blue), 2);	editBrush = Qt::yellow;	bookmarkBrush = QColor(128, 128, 255);	handCursor = QCursor(Qt::OpenHandCursor);	setMouseTracking(true);	setupScrollBars();	QObject::connect(horizontalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(onHScroll(int)));	QObject::connect(verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(onVScroll(int)));	QObject::connect(page, SIGNAL(trackHeaderChanged(int)), this, SLOT(onTrackHeaderChanged(int)));	QObject::connect(page, SIGNAL(trackDataChanged(int, int, int)), this, SLOT(onTrackDataChanged(int, int, int)));}
开发者ID:kusma,项目名称:rocket,代码行数:55,


示例13: updateFont

//Easy Font setting contributed from Colin Duffy ([email
C++ updateFrame函数代码示例
C++ updateFilterParameters函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。