• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ drawChildren函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getWidth

void Windowiki::draw(gcn::Graphics *graphics)
{
    Graphics *g = static_cast<Graphics*>(graphics);

    g->drawImageRect(0, 0, getWidth(), getHeight(), borderiki);

    // Draw title
    if (mShowTitle)
    {
        graphics->setFont(getFont());
        graphics->drawText(getCaption(), 7, 5, gcn::Graphics::LEFT);
    }

    g->drawImage(sagustImage, getWidth() - sagustImage->getWidth(),
            0);
    if (mCloseButton)
    {
        g->drawImage(closeImage,
            getWidth() - closeImage->getWidth(),
            0
        );
    }
    g->drawImage(solustImage, 0,0);

    g->drawImage(sagaltImage, getWidth() - sagaltImage->getWidth(),
            getHeight() - sagaltImage->getHeight());
    g->drawImage(solaltImage, 0,getHeight() - solaltImage->getHeight() );
    drawChildren(graphics);
}
开发者ID:mekolat,项目名称:elektrogamesvn,代码行数:29,代码来源:window_iki.cpp


示例2: BLOCK_START

void ConnectionDialog::draw(gcn::Graphics *graphics)
{
    BLOCK_START("ConnectionDialog::draw")
    // Don't draw the window background, only draw the children
    drawChildren(graphics);
    BLOCK_END("ConnectionDialog::draw")
}
开发者ID:sangohan,项目名称:tmw-manaplus-client,代码行数:7,代码来源:connectiondialog.cpp


示例3: drawBackground

    void ScrollArea::draw(Graphics *graphics)
    {
        drawBackground(graphics);

        if (mVBarVisible)
        {
            drawUpButton(graphics);
            drawDownButton(graphics);
            drawVBar(graphics);
            drawVMarker(graphics);
        }

        if (mHBarVisible)
        {
            drawLeftButton(graphics);
            drawRightButton(graphics);
            drawHBar(graphics);
            drawHMarker(graphics);
        }

        if (mHBarVisible && mVBarVisible)
        {
            graphics->setColor(getBaseColor());
            graphics->fillRectangle(Rectangle(getWidth() - mScrollbarWidth,
                                              getHeight() - mScrollbarWidth,
                                              mScrollbarWidth,
                                              mScrollbarWidth));
        }

        drawChildren(graphics);
    }
开发者ID:bombpersons,项目名称:Dokuro2,代码行数:31,代码来源:scrollarea.cpp


示例4: drawChildren

void TabbedArea::draw(gcn::Graphics *graphics)
{
    if (mTabs.empty())
        return;

    drawChildren(graphics);
}
开发者ID:B-Rich,项目名称:mana,代码行数:7,代码来源:tabbedarea.cpp


示例5: drawSelf

void UIWidget::draw(const Rect& visibleRect, Fw::DrawPane drawPane)
{
    Rect oldClipRect;
    if(m_clipping) {
        oldClipRect = g_painter->getClipRect();
        g_painter->setClipRect(visibleRect);
    }

    if(m_rotation != 0.0f) {
        g_painter->pushTransformMatrix();
        g_painter->rotate(m_rect.center(), m_rotation * (Fw::pi / 180.0));
    }

    drawSelf(drawPane);

    if(m_children.size() > 0) {
        if(m_clipping)
            g_painter->setClipRect(visibleRect.intersection(getPaddingRect()));

        drawChildren(visibleRect, drawPane);
    }

    if(m_rotation != 0.0f)
        g_painter->popTransformMatrix();

    if(m_clipping) {
        g_painter->setClipRect(oldClipRect);
    }
}
开发者ID:Pucker,项目名称:otclient,代码行数:29,代码来源:uiwidget.cpp


示例6: drawItem

void GUIListGadget::draw()
{
    if (!isVisible_ || isValidated_ || !setupClipping())
        return;
    
    GlbRenderSys->draw2DRectangle(Rect_, Color_);
    
    /* Draw all item entries */
    s32 ItemPos = 0;
    for (std::list<GUIListItem*>::iterator it = ItemList_.begin(); it != ItemList_.end(); ++it)
    {
        drawItem(*it, ItemPos);
        ItemPos += (*it)->getItemSize();
    }
    
    /* Draw all column entries */
    s32 ColumnPos = 0;
    for (std::list<GUIListColumn*>::iterator it = ColumnList_.begin(); it != ColumnList_.end(); ++it)
    {
        drawColumn(*it, ColumnPos);
        ColumnPos += (*it)->getColumnSize();
    }
    
    /* Update scrollbar ranges */
    HorzScroll_.setRange(ColumnPos);
    VertScroll_.setRange(ItemPos + COLUMN_HEIGHT);
    
    drawChildren();
    
    GlbRenderSys->setClipping(true, dim::point2di(VisRect_.Left, VisRect_.Top), VisRect_.getSize());
    
    drawFrame(Rect_, 0, false);
}
开发者ID:bekasov,项目名称:SoftPixelEngine,代码行数:33,代码来源:spGUIListGadget.cpp


示例7: getWidth

void Window::draw(gcn::Graphics *graphics)
{
    Graphics *g = static_cast<Graphics*>(graphics);

    g->drawImageRect(0, 0, getWidth(), getHeight(), mSkin->getBorder());

    // Draw title
    if (mShowTitle)
    {
        g->setColor(Theme::getThemeColor(Theme::TEXT));
        g->setFont(getFont());
        g->drawText(getCaption(), 7, 5, gcn::Graphics::LEFT);
    }

    // Draw Close Button
    if (mCloseButton)
    {
        g->drawImage(mSkin->getCloseImage(),
            getWidth() - mSkin->getCloseImage()->getWidth() - getPadding(),
            getPadding());
    }

    // Draw Sticky Button
    if (mStickyButton)
    {
        Image *button = mSkin->getStickyImage(mSticky);
        int x = getWidth() - button->getWidth() - getPadding();
        if (mCloseButton)
            x -= mSkin->getCloseImage()->getWidth();

        g->drawImage(button, x, getPadding());
    }

    drawChildren(graphics);
}
开发者ID:Ablu,项目名称:invertika,代码行数:35,代码来源:window.cpp


示例8: drawChildren

void xmlgui::Container::draw() {
	if(bgImage!=NULL) {
		bgImage->draw(x, y, width, height);

	}
	drawChildren();
}
开发者ID:danielmorena,项目名称:ofxmarek,代码行数:7,代码来源:Container.cpp


示例9: drawBackground

void NodeControl::drawBody(GlInterface &gl)
{
	drawBackground(gl);

	//Draw connectors underneath selection outline
	drawChildren(gl);

	if(selected)
	{
		Color col = (isInFocus() ? Color(0.3f, 1.0f, 0.3f, 1.0f) : Color(0.1f, 0.75f, 0.75f, 1.0f));

		std::vector<TVertex> points;
		points.reserve(5);

		points.push_back(TVertex(APoint(0, 0), col));
		points.push_back(TVertex(APoint(0, size.y), col));
		points.push_back(TVertex(size, col));
		points.push_back(TVertex(APoint(size.x, 0), col));
		points.push_back(TVertex(APoint(0, 0), col));

		gl.drawShape(GL_LINE_STRIP, points);
	}

	//TODO: rest of body design (title, description, colors, etc)
}
开发者ID:skothr,项目名称:SoundSandbox,代码行数:25,代码来源:NodeGraphDisplay.cpp


示例10: getTransform

void SceneNode::draw(sf::RenderTarget & target, sf::RenderStates states) const
{
	states.transform *= getTransform();

	drawCurrent(target, states);
	drawChildren(target, states);
}
开发者ID:Blake-Lead,项目名称:SFML-Project,代码行数:7,代码来源:scenenode.cpp


示例11: if

void Tab::draw(gcn::Graphics *graphics)
{
    int mode = TAB_STANDARD;

    // check which type of tab to draw
    if (mTabbedArea)
    {
        mLabel->setForegroundColor(*mTabColor);
        if (mTabbedArea->isTabSelected(this))
        {
            mode = TAB_SELECTED;
            // if tab is selected, it doesnt need to highlight activity
            mFlash = false;
        }
        else if (mHasMouse)
        {
            mode = TAB_HIGHLIGHTED;
        }
        if (mFlash)
        {
            mLabel->setForegroundColor(Theme::getThemeColor(Theme::TAB_FLASH));
        }
    }

    updateAlpha();

    // draw tab
    static_cast<Graphics*>(graphics)->
        drawImageRect(0, 0, getWidth(), getHeight(), tabImg[mode]);

    // draw label
    drawChildren(graphics);
}
开发者ID:TonyRice,项目名称:mana,代码行数:33,代码来源:tab.cpp


示例12: glPushMatrix

void Renderable::render() {
    glPushMatrix();
    setMatrix();
    drawChildren();

    if (vertexColors && colorBuffer != NULL) {
        glEnableClientState(GL_COLOR_ARRAY);
        glColorPointer(4, GL_FLOAT, 0, colorBuffer);
    } else {
        glColor4f(objectColor.r, objectColor.g, objectColor.b, objectColor.a);
    }
    if (nFaces > 0) {
//		__android_log_print(ANDROID_LOG_DEBUG,"Renderable","rendering self. nFaces = %d", nFaces);
        glEnableClientState(GL_VERTEX_ARRAY);
        glVertexPointer(3, GL_FLOAT, 0, vertexBuffer);
        if (vertexNormalBuffer != NULL) {
//			__android_log_print(ANDROID_LOG_DEBUG,"Renderable","vertexNormal enabled");
            glEnableClientState(GL_NORMAL_ARRAY);
            glNormalPointer(GL_FLOAT, 0, vertexNormalBuffer);
        }
        glDrawElements(GL_TRIANGLES, nFaces, GL_UNSIGNED_SHORT, faceBuffer);
        glDisableClientState(GL_VERTEX_ARRAY);
        glDisableClientState(GL_NORMAL_ARRAY);
    }
    if (vertexColors) {
        glDisableClientState(GL_COLOR_ARRAY);
    }
    glPopMatrix();
//	__android_log_print(ANDROID_LOG_DEBUG,"Renderable","rendering finished");
}
开发者ID:TeamBrainStorm,项目名称:Cell-Tools,代码行数:30,代码来源:Renderable.cpp


示例13: drawChildren

void MiniStatusWindow::draw(gcn::Graphics *graphics)
{
    Graphics *g = static_cast<Graphics*>(graphics);

    drawChildren(graphics);
    drawIcons(g);
}
开发者ID:jurkan,项目名称:mana,代码行数:7,代码来源:ministatuswindow.cpp


示例14: drawChildren

void Canvas::draw()
{
    g_fb->setFg(128, 128, 128);
    g_fb->fillRect(&m_rect);
    drawChildren();
    g_fb->update(&m_rect, false);
}
开发者ID:juilyoon,项目名称:OcherBook,代码行数:7,代码来源:Widgets.cpp


示例15: getWidth

void DecoratedContainer::draw(gcn::Graphics* graphics)
{
    if (isOpaque())
    {
        graphics->setColor(getBackgroundColor());
        graphics->fillRectangle(gcn::Rectangle(2, 2, getWidth() - 4, getHeight() - 4));
    }

    int i;
    for (i = 5; i < getHeight()-10; i+=5)
    {
	    graphics->drawImage(mVertical, 0, i);
	    graphics->drawImage(mVertical, getWidth()-4, i);
    }
    graphics->drawImage(mVertical, 0, 0, 0, i, 4, getHeight()-5-i);
    graphics->drawImage(mVertical, 0, 0, getWidth()-4, i, 4, getHeight()-5-i);

    for (i = 5; i < getWidth()-10; i+=5)
    {
	    graphics->drawImage(mHorizontal, i, 0);
	    graphics->drawImage(mHorizontal, i, getHeight()-4);
    }
    graphics->drawImage(mHorizontal, 0, 0, i, 0, getWidth()-5-i, 4);
    graphics->drawImage(mHorizontal, 0, 0, i, getHeight()-4, getWidth()-5-i, 4);

    graphics->drawImage(mCornerUL, 0, 0);
    graphics->drawImage(mCornerUR, getWidth()-5, 0);
    graphics->drawImage(mCornerDL, 0, getHeight()-5);
    graphics->drawImage(mCornerDR, getWidth()-5, getHeight()-5);

    drawChildren(graphics);
}
开发者ID:olofn,项目名称:db_public,代码行数:32,代码来源:decoratedcontainer.cpp


示例16: ofPushStyle

void phdGuiVerSlider::draw(float _x, float _y) {

	if(!isVisible() || getManager() == NULL) return;

	ofPushStyle();
	ofPushMatrix();
	ofTranslate(getScreenX(), getScreenY(), 0);

	ofColor _border = getManager()->getBorderColor(this);

	drawFilledBorderRectangle(0,0,getWidth(),getHeight(), getManager()->getFillColor(this), _border);

	float _pos = (1.0-value) * getHeight();
	ofLine(0.0, _pos, getWidth(), _pos); 
	drawFilledBorderRectangle(0.0, _pos, getWidth(), getHeight()-_pos, _border, _border);

	ofSetColor(getManager()->getTextColor(this));
	//ofDrawBitmapString(caption, (getWidth()-(caption.size()*8.0))/2.0, getHeight() / 2.0 + 4.0);
	//ofDrawBitmapString(caption, (getWidth()-(caption.size()*8.0))/2.0, 12.0);

	string _str = "";
	for(int i = 0; i < caption.size(); i++) _str += caption.substr(i,1) + "\n";
	ofDrawBitmapString(_str, (getWidth()-(8.0))/2.0, 12.0);

	ofPopMatrix();
	ofPopStyle();

	drawChildren(_x, _y);
}
开发者ID:eliasmelofilho,项目名称:phdGui,代码行数:29,代码来源:phdGuiVerSlider.cpp


示例17: draw

/*!
    \internal
    This replaces the standard draw() as used in Item3D.  In this instance all drawing
    carried out using \a painter follows the standard sequence.  However, after the
    transforms for the item have been applied, a QGraphicsBillboardTransform is applied
    to the model-view matrix.

    After the current item is drawn the model-view matrix from immediately before the
    billboard transform being applied will be restored so child items are not affected by it.
*/
void BillboardItem3D::draw(QGLPainter *painter)
{
    // Bail out if this item and its children have been disabled.
    if (!isEnabled())
        return;
    if (!isInitialized())
        initialize(painter);

    if (!m_bConnectedToOpenGLContextSignal) {
        QOpenGLContext* pOpenGLContext = QOpenGLContext::currentContext();
        if (pOpenGLContext) {
            bool Ok = QObject::connect(pOpenGLContext, SIGNAL(aboutToBeDestroyed()), this, SLOT(handleOpenglContextIsAboutToBeDestroyed()), Qt::DirectConnection);
            Q_UNUSED(Ok);  // quell compiler warning
            Q_ASSERT(Ok);
            m_bConnectedToOpenGLContextSignal = true;
        }
    }

    //Setup picking
    int prevId = painter->objectPickId();
    painter->setObjectPickId(objectPickId());

    //Setup effect (lighting, culling, effects etc)
    const QGLLightParameters *currentLight = 0;
    QMatrix4x4 currentLightTransform;
    drawLightingSetup(painter, currentLight, currentLightTransform);
    bool viewportBlend, effectBlend;
    drawEffectSetup(painter, viewportBlend, effectBlend);
    drawCullSetup();

    //Local and Global transforms
    drawTransformSetup(painter);

    //After all of the other transforms, apply the billboard transform to
    //ensure forward facing.
    painter->modelViewMatrix().push();
    QGraphicsBillboardTransform bill;
    bill.setPreserveUpVector(m_preserveUpVector);
    bill.applyTo(const_cast<QMatrix4x4 *>(&painter->modelViewMatrix().top()));

    //Drawing
    drawItem(painter);

    //Pop the billboard transform from the model-view matrix stack so that it
    //is not applied to child items.
    painter->modelViewMatrix().pop();

    //Draw children
    drawChildren(painter);

    //Cleanup
    drawTransformCleanup(painter);
    drawLightingCleanup(painter, currentLight, currentLightTransform);
    drawEffectCleanup(painter, viewportBlend, effectBlend);
    drawCullCleanup();

    //Reset pick id.
    painter->setObjectPickId(prevId);
}
开发者ID:Distrotech,项目名称:qt3d,代码行数:69,代码来源:billboarditem3d.cpp


示例18: glPushMatrix

void BasicScreenObject::draw() {

  // int elapsed = 0;

  if ((isvisible && _isParentTreeVisible && _isAddedToRenderer) || ismask) {

    glPushMatrix();
    glMultMatrixf(getLocalTransformMatrix().getPtr());

    if (hasmask)
      setupMask();

    glBlendFunc(sfactor, dfactor);

    lightingbefore = glIsEnabled(GL_LIGHTING);
    depthtestbefore = glIsEnabled(GL_DEPTH_TEST);

    if (depthtestenabled && !depthtestbefore)
      glEnable(GL_DEPTH_TEST);
    if (!depthtestenabled && depthtestbefore)
      glDisable(GL_DEPTH_TEST);

    if (lightingenabled && !lightingbefore)
      glEnable(GL_LIGHTING);
    if (!lightingenabled && lightingbefore)
      glDisable(GL_LIGHTING);

    ofPushMatrix();
    ofPushStyle();
    ofSetColor(color.r, color.g, color.b, getCombinedAlpha());
    _draw();
    ofPopStyle();
    ofPopMatrix();

    ofPushMatrix();
    drawChildren();
    ofPopMatrix();
    ofPushMatrix();
    _drawAfterChildren();
    ofPopMatrix();

    // lighting out
    if (lightingenabled && !lightingbefore)
      glDisable(GL_LIGHTING);
    if (!lightingenabled && lightingbefore)
      glEnable(GL_LIGHTING);

    // Depthtest out
    if (depthtestenabled && !depthtestbefore)
      glDisable(GL_DEPTH_TEST);
    if (!depthtestenabled && depthtestbefore)
      glEnable(GL_DEPTH_TEST);

    if (hasmask)
      restoreMask();

    glPopMatrix();
  }
}
开发者ID:kitschpatrol,项目名称:ofxRRScenegraph,代码行数:59,代码来源:BasicScreenObject.cpp


示例19: drawChildren

void
CharCreateDialog::draw(gcn::Graphics *graphics)
{
    Graphics *g = static_cast<Graphics*>(graphics);
    g->drawImage(mBackGround,0,0);

    drawChildren(graphics);
}
开发者ID:mekolat,项目名称:elektrogamesvn,代码行数:8,代码来源:charcreatedialog.cpp


示例20: drawChildren

void
Wellcome::draw(gcn::Graphics* graphics)
{
    Window::draw(graphics);
    Graphics *g = static_cast<Graphics*>(graphics);
    g->drawImage(mSlide,10,20);
    drawChildren(graphics);
}
开发者ID:mekolat,项目名称:elektrogamesvn,代码行数:8,代码来源:wellcome.cpp



注:本文中的drawChildren函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ drawCircle函数代码示例发布时间:2022-05-30
下一篇:
C++ drawChar函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap