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); }
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") }
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); }
void TabbedArea::draw(gcn::Graphics *graphics) { if (mTabs.empty()) return; drawChildren(graphics); }
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); } }
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); }
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); }
void xmlgui::Container::draw() { if(bgImage!=NULL) { bgImage->draw(x, y, width, height); } drawChildren(); }
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) }
void SceneNode::draw(sf::RenderTarget & target, sf::RenderStates states) const { states.transform *= getTransform(); drawCurrent(target, states); drawChildren(target, states); }
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); }
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"); }
void MiniStatusWindow::draw(gcn::Graphics *graphics) { Graphics *g = static_cast<Graphics*>(graphics); drawChildren(graphics); drawIcons(g); }
void Canvas::draw() { g_fb->setFg(128, 128, 128); g_fb->fillRect(&m_rect); drawChildren(); g_fb->update(&m_rect, false); }
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); }
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); }
/*! \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); }
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(); } }
void CharCreateDialog::draw(gcn::Graphics *graphics) { Graphics *g = static_cast<Graphics*>(graphics); g->drawImage(mBackGround,0,0); drawChildren(graphics); }
void Wellcome::draw(gcn::Graphics* graphics) { Window::draw(graphics); Graphics *g = static_cast<Graphics*>(graphics); g->drawImage(mSlide,10,20); drawChildren(graphics); }
void SceneNode::draw(sf::RenderTarget& target, sf::RenderStates states) const { //two transforms chained, one after the other. //Combines the parent's absolute transform with the current node's relative one //the result is the absolute transform of the CURRENT node states.transform *= getTransform(); //now, states.transform contains the absolute world transform drawCurrent(target, states); //draw's the CURRENT node (ie the parent) drawChildren(target, states); //recursively calls draw until all the children nodes are drawn }
void Panel::draw() { if (active) { drawBackground(); drawBorders(); drawChildren(); } }
void ofxFlashStage :: draw () { drawChildren( this, children ); if( bShowRedrawRegions ) { drawChildrenDebug( this, children ); } }
void Button::draw() { if (active) { drawBackground(); drawBorders(); drawChildren(); } }
void vmain::draw (gcn::Graphics *graphics){ if(!img){ std::stringstream imgPath(std::string("")); imgPath << ConfigData::GetPath("gui") << "main_menu/main.png"; img = gcn::Image::load(imgPath.str()); } graphics->drawImage(img,0,0); drawChildren(graphics); }
void SceneNode::draw(sf::RenderTarget& target, sf::RenderStates states) const { // Apply transform of current node states.transform *= getTransform(); // Draw node and children with changed transform drawCurrent(target, states); drawChildren(target, states); }
void Label::Draw(GL2DProgram * shaders) { //Draw text in black drawBackground(shaders); //Draw text text.Draw(shaders); drawChildren(shaders); }
void Container::draw(Graphics* graphics) { if (isOpaque()) { graphics->setColor(getBaseColor()); graphics->fillRectangle(Rectangle(0, 0, getWidth(), getHeight())); } drawChildren(graphics); }
void MenuBar::draw(GlInterface &gl) { if(isolateViewport(gl, false)) //Dont clamp children { drawBackground(gl); drawChildren(gl); restoreViewport(gl); } }
void SceneNode::draw(sf::RenderTarget& target, sf::RenderStates states) const { states.transform *= getTransform(); drawCurrent(target, states); drawChildren(target, states); //if(isSelected()) // drawBoundingRect(target, states); }