void CzBitmapSprite::Draw() { if (!Visible) return; TransformDirty = false; if (!BeforeChildren) DrawChildren(); // Do not render if not visible CzImage* image = Material->Image; if (AccumDepth > 0 && image != NULL && image->getTexture() != NULL) { if (!isClippedByManager(NULL, Prim->VertCount)) { if (UVsDirty) RebuildUVList(); if (Manager != NULL && Manager->getBatching() && Prim->VertCount == 4) PLATFORM_RENDER->AddPrimtives(Prim, Material, 1, true); else PLATFORM_RENDER->DrawPrimitives(Prim, Material, 1, true); } } #if defined (_DEBUG_) else CzDebug::Log(CZ_DEBUG_CHANNEL_INFO, "CzBitmapSprite - Image is not available!"); #endif // _DEBUG_ if (BeforeChildren) DrawChildren(); }
void WORLD::Render(bool SubWorld, bool Zmask) { //pushattrib EVIL, kill it glPushAttrib(GL_ALL_ATTRIB_BITS); if (!SubWorld) { if (Lighting) SetupLighting(); //fenyezes beallitasa else glDisable(GL_LIGHTING); if (Fog) //kod beallitasa { glEnable(GL_FOG); float Col[4]; Col[0]=FogCol[0]/255.0f; Col[1]=FogCol[1]/255.0f; Col[2]=FogCol[2]/255.0f; Col[3]=1; glFogi(GL_FOG_MODE,GL_LINEAR); glFogfv(GL_FOG_COLOR,Col); glFogf(GL_FOG_START,FogStart); glFogf(GL_FOG_END,FogEnd); } DrawChildren(this,-1,true); //zmaskos render glDepthMask(false); DrawChildren(this,-1,false); //zmask nelkuli render } else DrawChildren(this,-1,Zmask); //ha subworld, akkor megy lejjebb a hierarchyn, a zmask beallitas az amit fentrol kapott, igy csak jot renderel //popattrib atikiller, badbadbad glPopAttrib(); }
/*--------------------------------------------------------------------------*/ void PegLinearBitmapScale::Draw() { if(!mpCompBitmap) { mpCompBitmap = Screen()->CreateBitmap(mpBkgBitmap->wWidth, mpBkgBitmap->wHeight); } DrawToComposite(); BeginDraw(); PegPoint tPoint; tPoint.x = mReal.wLeft; tPoint.y = mReal.wTop; Bitmap(tPoint, mpCompBitmap); if(!mpNeedleBitmap) { DrawNeedle(); } DrawChildren(); EndDraw(); }
void ScribbleWindow::Draw() { BeginDraw(); DrawFrame(); DrawChildren(); EndDraw(); }
void SceneNode::draw( sf::RenderTarget& target, sf::RenderStates states ) const { states.transform *= getTransform(); DrawCurrent( target, states ); DrawChildren( target, states ); }
int tcButtonConsole::Draw() { if (tcSoundConsole::Draw()) { Gdiplus::Graphics *graphics; if (!GetGraphics(graphics)) { std::cerr << "Failed to get Graphics object in tcButtonConsole::Draw()" << std::endl; return 0; } /** size_t nButtons = buttons.size(); for(size_t n=0;n<nButtons;n++) { buttons[n]->Draw(graphics); } */ DrawChildren(graphics); ReleaseGraphics(graphics); return 1; } else { return 0; } }
/*--------------------------------------------------------------------------*/ void PegFiniteDial::Draw() { BeginDraw(); if((mwStyle & AF_TRANSPARENT) && Parent()) { StandardBorder(Parent()->muColors[PCI_NORMAL]); } else { StandardBorder(muColors[PCI_NORMAL]); } // If this is set, we've already calculated the needle pos if(!mbValueSet) { CalcNeedlePos(); } DrawDial(); if(mwStyle & DS_TICMARKS) { DrawTicMarks(); } DrawChildren(); DrawNeedle(); DrawAnchor(); EndDraw(); }
void DrawChildren(WORLD *w, int Parent, bool ZMask) { //object hierarchy render for (int x=0; x<w->ObjectNum; x++) if (w->ObjectList[x].ParentID==Parent) { glPushMatrix(); MultModelViewMatrix(w->ObjectList[x].ModelView); //bemegyunk object space-be switch (w->ObjectList[x].Primitive) { case aDDict_SCENE: { if (((SCENE*)w->ObjectList[x].Data)->ColorDiscard) //ha animalni akarjuk az object szinet glColor4ub(w->ObjectList[x].Color.c[0],w->ObjectList[x].Color.c[1],w->ObjectList[x].Color.c[2],w->ObjectList[x].Color.c[3]); //elso korben a zmaskosak aztan a nem zmaskosak renderelodnek if (ZMask) glCallList(((SCENE*)w->ObjectList[x].Data)->ZmaskList); else glCallList(((SCENE*)w->ObjectList[x].Data)->NoZmaskList); glDisable(GL_TEXTURE_GEN_S); //envmapszamolas kikapcs glDisable(GL_TEXTURE_GEN_T); break; } case aDDict_SUBSCENE: //animacio szamitas, nem fontos d3dszempontbol ((WORLD*)w->ObjectList[x].Data)->SetToAnimPos(&w->ObjectList[x].APosData); //render ((WORLD*)w->ObjectList[x].Data)->Render(true,ZMask); break; } DrawChildren(w,w->ObjectList[x].ID,ZMask); glPopMatrix(); } }
void MyMainFrame::Draw() { BeginDraw(); DrawFrame(); DrawChildren(); EndDraw(); }
/*--------------------------------------------------------------------------*/ void PegBitmapWindow::Draw() { PegPoint tPutBitmap; PegRect CaptureRect; if (!mbCaptured) { // Capture the four bitmaps on my corners CaptureRect.wLeft = mReal.wLeft; CaptureRect.wTop = mReal.wTop; CaptureRect.wRight = CaptureRect.wLeft + CORNER_RADIUS; CaptureRect.wBottom = CaptureRect.wTop + CORNER_RADIUS; Screen()->Capture(&mCaptures[TOP_LEFT], CaptureRect); CaptureRect.Shift(mReal.Width() - CORNER_RADIUS, 0); Screen()->Capture(&mCaptures[TOP_RIGHT], CaptureRect); CaptureRect.Shift(0, mReal.Height() - CORNER_RADIUS); Screen()->Capture(&mCaptures[BOTTOM_RIGHT], CaptureRect); CaptureRect.Shift(-(mReal.Width() - CORNER_RADIUS), 0); Screen()->Capture(&mCaptures[BOTTOM_LEFT], CaptureRect); mbCaptured = TRUE; } BeginDraw(); muColors[PCI_NORMAL] = mFillColor; /* set default value with given color */ if (mpBitmap == NULL) { /* no bitmap given, so fill frame with given color */ DrawFrame(); } else { Screen()->Restore(this, &mCaptures[TOP_LEFT]); Screen()->Restore(this, &mCaptures[TOP_RIGHT]); Screen()->Restore(this, &mCaptures[BOTTOM_RIGHT]); Screen()->Restore(this, &mCaptures[BOTTOM_LEFT]); if (mBitmapStyle == kCenterBitmap) { /* center bitmap in window */ tPutBitmap.x = mReal.wLeft + ((mReal.wRight - mReal.wLeft) - mpBitmap->wWidth)/2; tPutBitmap.y = mReal.wTop + ((mReal.wBottom - mReal.wTop) - mpBitmap->wHeight)/2; } else { tPutBitmap.x = mReal.wLeft; tPutBitmap.y = mReal.wTop; } Bitmap(tPutBitmap, mpBitmap); /* set bitmap */ } DrawChildren(); /* draw buttons */ EndDraw(); }
void UIButton::Draw() { if (!visible_) { return; } DrawBase(); DrawChildren(); }
bool nuiFrameView::Draw(nuiDrawContext* pContext) { if (mpFrame) mpFrame->DrawBack(pContext, this, GetRect().Size()); DrawChildren(pContext); if (mpFrame) mpFrame->DrawFront(pContext, this, GetRect().Size()); return true; }
void vsEntity::Draw( vsDisplayList *list ) { if ( m_visible ) { _Draw(list); DrawChildren(list); } }
void Stack::Draw( GraphicsPtr graphics ) { //if (IsOpaque()) //{ // graphics->setColor(getBaseColor()); // graphics->fillRectangle(Rectangle(0, 0, GetWidth(), GetHeight())); //} DrawChildren(graphics); }
void CzDummySprite::Draw() { if (!Visible) return; TransformDirty = false; // Draw children DrawChildren(); }
void Container::Draw(GraphicsPtr graphics) { if (IsOpaque()) { graphics->setColor(getBaseColor()); graphics->fillRectangle(Rectangle(0, 0, GetWidth(), GetHeight())); } DrawChildren(graphics); }
void CUiButton::DrawElement(cairo_t* cr) const { // Set rectangle geometry from button. m_rectangle.SetProperty("geometry", m_extent); CopyProperties(this, &m_rectangle, { "backgroundColor", "borderRadius" }); m_rectangle.Draw(cr); m_text.SetProperty("geometry", m_extent); CopyProperties(this, &m_text, { "textColor", "text", "font" }); m_text.Draw(cr); DrawChildren(cr); }
void CTreemap::RecurseDrawGraph( CDC *pdc, Item *item, const CRect& rc, bool asroot, const double *psurface, double h, DWORD flags ) { ASSERT(rc.Width() >= 0); ASSERT(rc.Height() >= 0); ASSERT(item->TmiGetSize() > 0); if (m_callback != NULL) m_callback->TreemapDrawingCallback(); item->TmiSetRectangle(rc); int gridWidth= m_options.grid ? 1 : 0; if (rc.Width() <= gridWidth || rc.Height() <= gridWidth) { return; } double surface[4]; if (IsCushionShading()) { for (int i=0; i < 4; i++) surface[i]= psurface[i]; if (!asroot) AddRidge(rc, surface, h); } if (item->TmiIsLeaf()) { RenderLeaf(pdc, item, surface); } else { ASSERT(item->TmiGetChildrenCount() > 0); ASSERT(item->TmiGetSize() > 0); DrawChildren(pdc, item, surface, h, flags); } }
AUI_ERRCODE aui_Region::Draw( aui_Surface *surface, sint32 x, sint32 y ) { AUI_ERRCODE errcode = AUI_ERRCODE_OK; if ( !IsHidden() ) { errcode = DrawThis( surface, x, y ); if ( errcode == AUI_ERRCODE_OK ) DrawChildren( surface, x, y ); } m_draw = 0; return AUI_ERRCODE_OK; }
/*--------------------------------------------------------------------------*/ void PegWindow::Draw(void) { BeginDraw(); printf("pp1\n"); DrawFrame(); printf("pp2\n"); DrawChildren(); printf("pp3\n"); if (mpHScroll && mpVScroll) { printf("pp4\n"); FillScrollCorner(); } printf("pp5\n"); EndDraw(); }
void pawsTree::Draw() { csRect oldClip; if(layout) { layout->SetLayout(); SetScrollBarMax(); } ClipToParent(true); DrawBackground(); graphics2D->SetClipRect(screenFrame.xmin, screenFrame.ymin, screenFrame.xmax, screenFrame.ymax); if(decor) decor->Decorate(); ClipToParent(false); DrawChildren(); }
/*--------------------------------------------------------------------------*/ void PegChart::Draw() { BeginDraw(); StandardBorder(muColors[PCI_NORMAL]); if(mwExStyle & CS_DRAWXGRID && (mwMajorXScale > 0 || mwMinorXScale > 0)) { DrawXGrid(); } if(mwExStyle & CS_DRAWYGRID && (mwMajorYScale > 0 || mwMinorYScale > 0)) { DrawYGrid(); } if(mwExStyle & CS_DRAWXTICS && (mwMajorXScale > 0 || mwMinorXScale > 0)) { DrawXTics(); } if(mwExStyle & CS_DRAWYTICS && (mwMajorYScale > 0 || mwMinorYScale > 0)) { DrawYTics(); } if(mwExStyle & CS_DRAWXLABELS && mwXLabelScale > 0) { DrawXLabels(); } if(mwExStyle & CS_DRAWYLABELS && mwYLabelScale > 0) { DrawYLabels(); } DrawChildren(); EndDraw(); }
/*--------------------------------------------------------------------------*/ void PegBitmapButton::Draw(void) { BeginDraw(); PegButton::Draw(); PegRect OldClip = mClip; mClip &= mClient; // now draw the bitmap: PegPoint Put; Put.x = mClient.wLeft + (mClient.Width() - mpBitmap->wWidth) / 2; Put.y = mClient.wTop + (mClient.Height() - mpBitmap->wHeight) / 2; Bitmap(Put, mpBitmap); mClip = OldClip; if (First()) { DrawChildren(); } EndDraw(); }
// Rendering: bool nuiToggleButton::Draw(nuiDrawContext* pContext) { //NGL_OUT(_T("0x%x nuitoggleButton::Draw(%d)\n"), this, GetState(false)); nuiDecoration* pDeco = GetDecoration(); // if (mDisplayAsCheckBox) // { // pContext->ResetState(); // nuiTheme* pTheme = GetTheme(); // NGL_ASSERT(pTheme); // pTheme->DrawCheckBox(pContext, this); // pTheme->Release(); // // DrawChildren(pContext); // } // else if (mDisplayAsFrameBox) { pContext->ResetState(); if (!mPressed) SetStrokeColor(pContext, eNormalButtonBg); else SetStrokeColor(pContext, eSelectedButtonBg); nuiRect r(mRect.Size()); pContext->DrawRect(r, eStrokeShape); DrawChildren(pContext); } else { nuiButton::Draw(pContext); } return true; }
// Rendering: bool nuiWindow::Draw(nuiDrawContext* pContext) { pContext->PushState(); pContext->ResetState(); nuiWindowManager* pRoot = dynamic_cast<nuiWindowManager*>(mpParent); pContext->EnableBlending(false); if (!mRawWindow) { nuiTheme* pTheme = GetTheme(); NGL_ASSERT(pTheme); pTheme->DrawWindowShade(pContext, mRect.Size(), nuiColor(1.0f, 1.0f, 1.0f, GetMixedAlpha()), IsParentActive()); pContext->PushClipping(); pContext->Clip(GetRect().Size()); pContext->EnableClipping(true); if (pRoot->GetActiveWindow() == this) { if (mMoving) pTheme->DrawMovingWindow(pContext, this); else pTheme->DrawActiveWindow(pContext, this); } else pTheme->DrawWindow(pContext,this); pTheme->Release(); pContext->PopClipping(); } DrawChildren(pContext); return true; }
/*--------------------------------------------------------------------------*/ void PegColorLight::Draw() { if (!mwNumStates || !mpStateColor) { return; } BeginDraw(); PegColor Color(mpStateColor[mwCurState], mpStateColor[mwCurState], CF_FILL); if(mwStyle & LS_RECTANGLE) { StandardBorder(mpStateColor[mwCurState]); } else if(mwStyle & LS_CIRCLE) { if(mwStyle & AF_TRANSPARENT && Parent()) { StandardBorder(Parent()->muColors[PCI_NORMAL]); } SIGNED iWidth = mClient.Width() / 2; SIGNED iHeight = mClient.Height() / 2; Circle(iWidth + mClient.wLeft, iHeight + mClient.wTop, PEGMIN(iWidth, iHeight), Color, 1); PegColor Border(PCLR_SHADOW, PCLR_SHADOW, CF_NONE); Circle(iWidth + mClient.wLeft, iHeight + mClient.wTop, PEGMIN(iWidth, iHeight), Border, 1); } DrawChildren(); EndDraw(); }
bool nuiWindowManager::Draw(class nuiDrawContext *pContext) { // Draw the windows: DrawChildren(pContext); return true; }
bool nuiTabBar::Draw(nuiDrawContext* pContext) { DrawChildren(pContext); return true; }
bool nuiContainer::Draw(nuiDrawContext* pContext) { CheckValid(); return DrawChildren(pContext); }
bool nuiButton::Draw(nuiDrawContext* pContext) { DrawChildren(pContext); return true; }