这篇教程C++ DrawBorder函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中DrawBorder函数的典型用法代码示例。如果您正苦于以下问题:C++ DrawBorder函数的具体用法?C++ DrawBorder怎么用?C++ DrawBorder使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了DrawBorder函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: clrscrvoid Account::EditProfile(){ clrscr(); DrawBorder(25,8,59,16,0); gotoxy(24,11); cout<<"Please enter your first name : "; cin>>FName; cin.ignore(); gotoxy(24,12); cout<<"Please enter your last name : "; cin>>LName; cin.ignore(); clrscr(); DrawBorder(25,8,59,16,0); gotoxy(24,11); cout<<"ID : "; cin>>ID; gotoxy(24,12); cout<<"Username : "; cin>>Username; gotoxy(24,13); cout<<"Enter new Password : "; cin>>Password; cin.ignore();}
开发者ID:AniMysore74,项目名称:computer-class,代码行数:26,
示例2: SplashScreen//-----------Splash screens------------//void SplashScreen (int ScreenType, char *FName){ switch (ScreenType) { case 1 : clrscr(); DrawBorder(26,3,53,7,1); gotoxy(31,5); textcolor(12); cprintf("Welcome "); textcolor(7); cout<<FName; break; case 2 : clrscr(); DrawBorder(16,7,63,16,1); gotoxy(19,10); textcolor(12); cprintf("Thank you for using Intellisoft Job Portal"); gotoxy(24,12); textcolor(7); cprintf("Developed by Aniruddha Mysore"); gotoxy(26,13); cprintf("Class 12-B | Roll No. 23"); getch(); exit(0); }}
开发者ID:AniMysore74,项目名称:computer-class,代码行数:29,
示例3: DrawGridBorder/* * DrawGridBorder: Draw the border around the current room area. */void DrawGridBorder(void){ if (state == STATE_GAME && (GameGetState() == GAME_PLAY || GameGetState() == GAME_SELECT)) if (GetFocus() == hMain) DrawBorder(&view, HIGHLIGHT_INDEX, &drawborderexcludeView); else //DrawBorder(view, border_index, &drawborderexcludeView); DrawBorder(&view, BORDER_INDEX, &drawborderexcludeView);}
开发者ID:Anonic,项目名称:Meridian59,代码行数:12,
示例4: GetTilePaddedWRectvoid MinerGob::Draw(DibBitmap *pbm, int xViewOrigin, int yViewOrigin, int nLayer){#ifdef DRAW_OCCUPIED_TILE_INDICATOR { WRect wrcT; GetTilePaddedWRect(&wrcT); Rect rcT; rcT.FromWorldRect(&wrcT); rcT.Offset(-xViewOrigin, -yViewOrigin); DrawBorder(pbm, &rcT, 1, GetColor(kiclrWhite)); }#endif if (m_fHidden) return; MobileUnitGob::Draw(pbm, xViewOrigin, yViewOrigin, nLayer); if (m_st == kstMinerSuck && nLayer == knLayerDepthSorted) { SetAnimationStrip(&m_aniVacuum, m_ani.GetStrip()); m_aniVacuum.Draw(pbm, PcFromUwc(m_wx) - xViewOrigin, PcFromUwc(m_wy) - yViewOrigin); } else if (nLayer == knLayerSelection && (m_ff & kfGobSelected)) { Rect rcT; rcT.FromWorldRect(&m_pmuntc->wrcUIBounds); rcT.Offset(PcFromUwc(m_wx) - xViewOrigin, PcFromUwc(m_wy) - yViewOrigin); DrawFullnessIndicator(pbm, &rcT, m_nGalaxiteAmount / knGalaxiteValue / 2, knMinerGalaxiteMax / knGalaxiteValue / 2); }}
开发者ID:spiffcode,项目名称:hostile-takeover,代码行数:28,
示例5: InventoryBoxResize/* * InventoryBoxResize: Resize the inventory box when the main window is resized * to (xsize, ysize). view is the current grid area view. */void InventoryBoxResize(int xsize, int ysize, AREA *view){ int old_cols = cols; int old_rows = rows; int yMiniMap, iHeightAvailableForMapAndStats, iHeightMiniMap; /* Turn off highlight */ DrawBorder(&inventory_area, inventory_bg_index, NULL); inventory_area.x = view->x + view->cx + LEFT_BORDER + 3 * HIGHLIGHT_THICKNESS; inventory_area.cx = min(xsize - inventory_area.x - 3 * HIGHLIGHT_THICKNESS - EDGETREAT_WIDTH, INVENTORY_MAX_WIDTH);// inventory_area.y = 2 * TOP_BORDER + USERAREA_HEIGHT + GROUPBUTTONS_HEIGHT + EDGETREAT_HEIGHT;// inventory_area.cy = view->y + view->cy - inventory_area.y; yMiniMap = 2 * TOP_BORDER + USERAREA_HEIGHT + EDGETREAT_HEIGHT + MAPTREAT_HEIGHT; iHeightAvailableForMapAndStats = ysize - yMiniMap - 2 * HIGHLIGHT_THICKNESS - EDGETREAT_HEIGHT; iHeightMiniMap = (int)( iHeightAvailableForMapAndStats * PROPORTION_MINIMAP ) - HIGHLIGHT_THICKNESS - MAPTREAT_HEIGHT; iHeightMiniMap = min( iHeightMiniMap, MINIMAP_MAX_HEIGHT ); inventory_area.y = yMiniMap + iHeightMiniMap + 3 * HIGHLIGHT_THICKNESS + MAPTREAT_HEIGHT + GROUPBUTTONS_HEIGHT + MAP_STATS_GAP_HEIGHT + 1; inventory_area.cy = ysize - EDGETREAT_HEIGHT - HIGHLIGHT_THICKNESS - inventory_area.y - STATS_BOTTOM_GAP_HEIGHT; InventoryComputeRowsCols(); // If inventory gets bigger, go back to top if (cols > old_cols || rows > old_rows) { top_row = 0; SetScrollPos(hwndInvScroll, SB_CTL, 0, TRUE); } InventoryDisplayScrollbar();}
开发者ID:Tigerwhit4,项目名称:Meridian59,代码行数:39,
示例6: HandleExpose/** Handle an expose event. */char HandleExpose(const XExposeEvent *event){ ClientNode *np; np = FindClientByParent(event->window); if(np) { if(event->count == 0) { DrawBorder(np); } return 1; } else { np = FindClientByWindow(event->window); if(np) { if(np->state.status & STAT_WMDIALOG) { /* Dialog expose events are handled elsewhere. */ return 0; } else { /* Ignore other expose events for client windows. */ return 1; } } return event->count ? 1 : 0; }}
开发者ID:pecarter-work,项目名称:jwm,代码行数:28,
示例7: glDisablevoid CSMFGroundDrawer::Draw(const DrawPass::e& drawPass){ // must be here because water renderers also call us if (!globalRendering->drawGround) return; // if entire map is under voidwater, no need to draw *ground* if (readMap->HasOnlyVoidWater()) return; glDisable(GL_BLEND); glEnable(GL_CULL_FACE); glCullFace(GL_BACK); if (drawDeferred) { // do the deferred pass first, will allow us to re-use // its output at some future point and eventually draw // the entire map deferred DrawDeferredPass(drawPass, mapRendering->voidGround || (mapRendering->voidWater && drawPass != DrawPass::WaterReflection)); } if (drawForward) { DrawForwardPass(drawPass, mapRendering->voidGround || (mapRendering->voidWater && drawPass != DrawPass::WaterReflection)); } glDisable(GL_CULL_FACE); if (drawPass != DrawPass::Normal) return; if (drawWaterPlane) DrawWaterPlane(false); if (drawMapEdges) DrawBorder(drawPass);}
开发者ID:sprunk,项目名称:spring,代码行数:35,
示例8: BorderElementDrawstatic void BorderElementDraw( void *clientData, void *elementRecord, Tk_Window tkwin, Drawable d, Ttk_Box b, unsigned int state){ BorderElement *bd = elementRecord; Tk_3DBorder border = Tk_Get3DBorderFromObj(tkwin, bd->borderObj); XColor *borderColor = Tk_GetColorFromObj(tkwin, bd->borderColorObj); int borderWidth = 2; int relief = TK_RELIEF_FLAT; int defaultState = TTK_BUTTON_DEFAULT_DISABLED; /* * Get option values. */ Tcl_GetIntFromObj(NULL, bd->borderWidthObj, &borderWidth); Tk_GetReliefFromObj(NULL, bd->reliefObj, &relief); Ttk_GetButtonDefaultStateFromObj(NULL, bd->defaultStateObj, &defaultState); if (defaultState == TTK_BUTTON_DEFAULT_ACTIVE) { GC gc = Tk_GCForColor(borderColor, d); XDrawRectangle(Tk_Display(tkwin), d, gc, b.x, b.y, b.width-1, b.height-1); } if (defaultState != TTK_BUTTON_DEFAULT_DISABLED) { /* Space for default ring: */ b = Ttk_PadBox(b, Ttk_UniformPadding(1)); } DrawBorder(tkwin, d, border, borderColor, b, borderWidth, relief);}
开发者ID:AlexShiLucky,项目名称:bitkeeper,代码行数:30,
示例9: GetRotateMatrixvoid CXFA_FFCheckButton::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, uint32_t dwStatus) { if (!IsMatchVisibleStatus(dwStatus)) { return; } CFX_Matrix mtRotate; GetRotateMatrix(mtRotate); if (pMatrix) { mtRotate.Concat(*pMatrix); } CXFA_FFWidget::RenderWidget(pGS, &mtRotate, dwStatus); CXFA_Border borderUI = m_pDataAcc->GetUIBorder(); DrawBorder(pGS, borderUI, m_rtUI, &mtRotate, m_pDataAcc->GetCheckButtonShape() == XFA_ATTRIBUTEENUM_Round ? XFA_DRAWBOX_ForceRound : 0); RenderCaption(pGS, &mtRotate); DrawHighlight(pGS, &mtRotate, dwStatus, m_pDataAcc->GetCheckButtonShape() == XFA_ATTRIBUTEENUM_Round); CFX_Matrix mt; mt.Set(1, 0, 0, 1, m_rtCheckBox.left, m_rtCheckBox.top); mt.Concat(mtRotate); GetApp()->GetWidgetMgrDelegate()->OnDrawWidget(m_pNormalWidget->GetWidget(), pGS, &mt);}
开发者ID:documentcloud,项目名称:pdfium,代码行数:26,
示例10: GetTilePaddedWRectvoid TankGob::Draw(DibBitmap *pbm, int xViewOrigin, int yViewOrigin, int nLayer){ if (nLayer == knLayerDepthSorted) {#ifdef DRAW_OCCUPIED_TILE_INDICATOR { WRect wrcT; GetTilePaddedWRect(&wrcT); Rect rcT; rcT.FromWorldRect(&wrcT); rcT.Offset(-xViewOrigin, -yViewOrigin); DrawBorder(pbm, &rcT, 1, GetColor(kiclrWhite)); }#endif Side side = m_pplr->GetSide(); if (m_ff & kfGobDrawFlashed) side = (Side)-1; // Draw base int x = PcFromUwc(m_wx) - xViewOrigin; int y = PcFromUwc(m_wy) - yViewOrigin; m_ani.Draw(pbm, x, y, side); // Draw turret // The turret is aligned with the base's special point Point ptBaseSpecial; m_ani.GetSpecialPoint(&ptBaseSpecial); m_aniTurret.Draw(pbm, x + ptBaseSpecial.x, y + ptBaseSpecial.y, side); } else { MobileUnitGob::Draw(pbm, xViewOrigin, yViewOrigin, nLayer); }}
开发者ID:Ahmar,项目名称:hostile-takeover,代码行数:34,
示例11: GetDCvoid CChart::PrintChart(CDC *pDC,int x , int y){ int xPixel ; int yPixel ; int oldmapmode ; CDC *dc = GetDC(); xPixel = pDC->GetDeviceCaps(LOGPIXELSX); yPixel = pDC->GetDeviceCaps(LOGPIXELSY); //Calculate ratio to be zoomed. xPixel = xPixel /dc->GetDeviceCaps(LOGPIXELSX); yPixel = yPixel /dc->GetDeviceCaps(LOGPIXELSY); ReleaseDC(dc); oldmapmode = pDC->SetMapMode(MM_ANISOTROPIC); pDC->SetViewportExt(xPixel,yPixel); pDC->SetViewportOrg(x,y); DrawBorder(pDC); pDC->DrawEdge(m_ctlRect,BDR_SUNKENINNER|BDR_SUNKENOUTER, BF_RECT); DrawChartTitle(pDC); if ( bLogScale ) DrawLogGrid(pDC); DrawGrid(pDC); DrawAxis(pDC) ; DrawGridLabel(pDC); Plot(pDC) ; pDC->SetMapMode(oldmapmode);}
开发者ID:Chiasung,项目名称:Webcam,代码行数:34,
示例12: HandleExpose/** Handle an expose event. */int HandleExpose(const XExposeEvent *event) { ClientNode *np; np = FindClientByWindow(event->window); if(np) { if(event->window == np->parent) { DrawBorder(np, event); return 1; } else if(event->window == np->window && np->state.status & STAT_WMDIALOG) { /* Dialog expose events are handled elsewhere. */ return 0; } else { /* Ignore other expose events. */ return 1; } } else { return event->count ? 1 : 0; }}
开发者ID:GustavoMOG,项目名称:JWM,代码行数:27,
示例13: UiGetColorvoid MenuBar::DrawItem(GC &gc, int n){ if (n<0 || n>=list.count()) return; UiCondList ucl; if (n == select && InFocus()) ucl.Set(uiCurrentItem, true); int color_text = UiGetColor(uiColor, uiItem, &ucl, 0x0); int color_bg = UiGetColor(uiBackground, uiItem, &ucl, 0xFFFFFF); gc.Set(GetFont()); crect itemRect = ItemRect(n); gc.SetFillColor(color_bg); if (n == select && InFocus()) gc.FillRect(itemRect); if (n == select) { DrawBorder(gc, itemRect, UiGetColor(uiCurrentItemFrame, uiItem, &ucl, 0xFFFFFF)); } gc.SetTextColor( color_text ); const unicode_t *text = list[n].text.ptr(); cpoint tsize = gc.GetTextExtents(text); int x = itemRect.left + (itemRect.Width()-tsize.x)/2; int y = itemRect.top + (itemRect.Height()-tsize.y)/2; #ifdef _WIN32 gc.TextOut(x,y,text);#else gc.TextOutF(x,y,text);#endif }
开发者ID:Karamax,项目名称:WalCommander,代码行数:33,
示例14: InactiveWindow/* * InactiveWindow - display a window as inactive */void InactiveWindow( window_id wn ){ wind *w; vi_color c; if( wn == NO_WINDOW ) { return; } w = Windows[wn]; if( w == NULL ) { return; } if( !w->has_border ) { return; } /* * change the border color */ c = w->border_color1; w->border_color1 = EditVars.InactiveWindowColor; DrawBorder( wn ); w->border_color1 = c;} /* InactiveWindow */
开发者ID:Ukusbobra,项目名称:open-watcom-v2,代码行数:30,
示例15: DrawBordervoid BorderFrame::FramePaint(Draw& draw, const Rect& r){ Size sz = r.GetSize(); int n = (int)(intptr_t)*border; if(sz.cx >= 2 * n && sz.cy >= 2 * n) DrawBorder(draw, r.left, r.top, r.Width(), r.Height(), border);}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:7,
示例16: DrawText/***************************************************OnDraw - overloaded CUGCellType::OnDraw Draws the push button in its current state, pressed or unpressed. The drawing of text is performed using the CUGCellType's DrawText function, therefore it has all of the same text capabilities as the default celltype. **See CUGCellType::OnDraw for more details about this functionParams dc - device context to draw the cell with rect - rectangle to draw the cell in col - column that is being drawn row - row that is being drawn cell - cell that is being drawn selected- TRUE if the cell is selected, otherwise FALSE current - TRUE if the cell is the current cell, otherwise FALSEReturn none****************************************************/void CUGButtonType::OnDraw(CDC *dc,RECT *rect,int col,long row, CUGCell *cell,int selected,int current){ if (!m_drawThemesSet) m_useThemes = cell->UseThemes(); UGXPThemeState state = UGXPThemes::GetState(selected>0, current>0); if (m_btnDown && current) { state = ThemeStatePressed; } RECT rectout; if (m_useThemes && UGXPThemes::DrawBackground(NULL, *dc, XPCellTypeButton, state, rect, NULL)) { UGXPThemes::DrawEdge(NULL, *dc, XPCellTypeButton, state, rect, 0, 0, &rectout); cell->SetXPStyle(XPCellTypeButton); DrawText(dc,rect,rect->right - rectout.right ,col,row,cell,selected,current); } else { //draw the button if(m_btnDown && current) { cell->SetBorder(UG_BDR_RECESSED); DrawBorder(dc,rect,&rectout,cell); } else { cell->SetBorder(UG_BDR_RAISED); DrawBorder(dc,rect,&rectout,cell); } //draw the text in using the default drawing routine DrawText(dc,&rectout,0,col,row,cell,selected,current); } if(cell->IsPropertySet(UGCELL_CELLTYPEEX_SET) && current) { if(cell->GetCellTypeEx()&UGCT_BUTTONNOFOCUS) { m_ctrl->TempDisableFocusRect(); } }}
开发者ID:whybe,项目名称:Ultimate-Grid,代码行数:69,
示例17: glPushMatrixvoid Graphics::Draw(Automaton &a){ glPushMatrix(); glTranslatef(dx,dy,0.0); DrawWithMap(a); DrawBorder(); glPopMatrix();}
开发者ID:Yuki-Inoue,项目名称:qt-cell,代码行数:8,
示例18: DrawBordervoid wxStdRenderer::DrawTextBorder(wxDC& dc, wxBorder border, const wxRect& rect, int flags, wxRect *rectIn){ DrawBorder(dc, border, rect, flags, rectIn);}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:8,
示例19: DrawBordervoid CMeasuredGrid::Draw(Display::IDisplayPtr pDisplay){ IMapGrid::Draw(pDisplay); DrawBorder(pDisplay); DrawGrid(pDisplay); DrawTick(pDisplay); DrawLabel(pDisplay);}
开发者ID:lozpeng,项目名称:applesales,代码行数:9,
示例20: DrawBorderFWL_ERR CFWL_CheckBoxImp::DrawWidget(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix) { if (!pGraphics) return FWL_ERR_Indefinite; if (!m_pProperties->m_pThemeProvider) return FWL_ERR_Indefinite; IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider; if (HasBorder()) { DrawBorder(pGraphics, FWL_PART_CKB_Border, m_pProperties->m_pThemeProvider, pMatrix); } if (HasEdge()) { DrawEdge(pGraphics, FWL_PART_CKB_Edge, pTheme, pMatrix); } int32_t dwStates = GetPartStates(); { CFWL_ThemeBackground param; param.m_pWidget = m_pInterface; param.m_iPart = FWL_PART_CKB_Background; param.m_dwStates = dwStates; param.m_pGraphics = pGraphics; if (pMatrix) { param.m_matrix.Concat(*pMatrix); } param.m_rtPart = m_rtClient; if (m_pProperties->m_dwStates & FWL_WGTSTATE_Focused) { param.m_pData = &m_rtFocus; } pTheme->DrawBackground(¶m); param.m_iPart = FWL_PART_CKB_CheckBox; param.m_rtPart = m_rtBox; pTheme->DrawBackground(¶m); } if (!m_pProperties->m_pDataProvider) return FWL_ERR_Indefinite; { CFX_WideString wsCaption; m_pProperties->m_pDataProvider->GetCaption(m_pInterface, wsCaption); int32_t iLen = wsCaption.GetLength(); if (iLen <= 0) return FWL_ERR_Indefinite; CFWL_ThemeText textParam; textParam.m_pWidget = m_pInterface; textParam.m_iPart = FWL_PART_CKB_Caption; textParam.m_dwStates = dwStates; textParam.m_pGraphics = pGraphics; if (pMatrix) { textParam.m_matrix.Concat(*pMatrix); } textParam.m_rtPart = m_rtCaption; textParam.m_wsText = wsCaption; textParam.m_dwTTOStyles = m_dwTTOStyles; textParam.m_iTTOAlign = m_iTTOAlign; pTheme->DrawText(&textParam); } return FWL_ERR_Succeeded;}
开发者ID:primiano,项目名称:pdfium-merge,代码行数:57,
示例21: dc/*! Comment : //******************************************************************/void CCSTMCombo::OnPaint() { CPaintDC dc(this); // device context for painting DefWindowProc( WM_PAINT, (WPARAM)dc.GetSafeHdc(), (LPARAM)0 ); DrawBorder(&dc); }
开发者ID:JaeJoonLee,项目名称:Common,代码行数:11,
示例22: DrawProgressBarstaticVOIDDrawProgressBar( IN PPROGRESSBAR Bar){ COORD coPos; DWORD Written; PROGRESSBAR BarBorder = *Bar; CHAR TextBuffer[256]; /* Draw the progress bar "border" border */ if (Bar->DoubleEdge) { BarBorder.Top -= 5; BarBorder.Bottom += 2; BarBorder.Right += 5; BarBorder.Left -= 5; DrawThickBorder(&BarBorder); } /* Draw the progress bar border */ DrawBorder(Bar); /* Display the description text */ if (Bar->DescriptionText) CONSOLE_SetTextXY(Bar->TextTop, Bar->TextRight, Bar->DescriptionText); /* Always update and display the progress */ if (Bar->UpdateProgressProc && Bar->UpdateProgressProc(Bar, TRUE, TextBuffer, ARRAYSIZE(TextBuffer))) { coPos.X = Bar->Left + (Bar->Width - strlen(TextBuffer) + 1) / 2; coPos.Y = Bar->Top; WriteConsoleOutputCharacterA(StdOutput, TextBuffer, strlen(TextBuffer), coPos, &Written); } /* Draw the empty bar */ coPos.X = Bar->Left + 1; for (coPos.Y = Bar->Top + 2; coPos.Y <= Bar->Bottom - 1; coPos.Y++) { FillConsoleOutputAttribute(StdOutput, Bar->ProgressColour, Bar->Width - 2, coPos, &Written); FillConsoleOutputCharacterA(StdOutput, ' ', Bar->Width - 2, coPos, &Written); }}
开发者ID:Moteesh,项目名称:reactos,代码行数:57,
示例23: LOCTEXT/** draws high score */void APlatformerHUD::DrawHighscore(){ const FText Highscore = LOCTEXT("Highscore", "High score"); const float SizeX = Canvas->ClipX * 0.4f; const float SizeY = 1000 * UIScale; const float DrawX = (Canvas->ClipX - SizeX) / 2.0f; const float DrawY = (Canvas->ClipY - SizeY) / 2.0f; DrawBorder(DrawX, DrawY, SizeX, SizeY, 1.0f, BlueBorder); const float TextScale = 1.4f; const float TextMargin = 0.03f; float StrSizeX, StrSizeY; Canvas->StrLen(HUDFont, Highscore.ToString(), StrSizeX, StrSizeY); StrSizeX = StrSizeX * TextScale * UIScale; StrSizeY = StrSizeY * TextScale * UIScale; FCanvasTextItem TextItem( FVector2D( (Canvas->ClipX - StrSizeX) / 2.0f, DrawY + SizeY * TextMargin ), Highscore, HUDFont, FLinearColor::White ); TextItem.Scale = FVector2D( TextScale * UIScale, TextScale * UIScale ); TextItem.EnableShadow( FLinearColor::Transparent ); Canvas->DrawItem( TextItem ); const float BorderSize = BlueBorder.LeftBorder->Resource->GetSizeX() * UIScale; FCanvasTileItem TileItem(FVector2D( DrawX + BorderSize, DrawY + SizeY * TextMargin + StrSizeY ), BlueBorder.TopBorder->Resource, FVector2D( SizeX - 2* BorderSize, BlueBorder.TopBorder->Resource->GetSizeY() * UIScale ), FVector2D(0,0),FVector2D((SizeX - 2* BorderSize) / BlueBorder.TopBorder->Resource->GetSizeX() * UIScale,1), FLinearColor::White); TileItem.BlendMode = SE_BLEND_Translucent; Canvas->DrawItem(TileItem); const float StartY = DrawY + SizeY * TextMargin*3 + StrSizeY * TextScale * UIScale; const float ColWidths[] = {70*UIScale, 340*UIScale, 200*UIScale}; const float TotalWidth = ColWidths[0]+ColWidths[1]+ColWidths[2]; for (int32 i=0; i < 10; i++ ) { FText Texts[] = { FText::Format(FText::FromString("{0}."), FText::AsNumber(i+1)), FText::FromString(UPlatformerBlueprintLibrary::DescribeTime(HighscoreTimes[i], false)), FText::FromString(HighscoreNames[i]) }; float Offset = 0; for (uint8 column=0; column < 3; column++) { TextItem.Text = Texts[column]; Canvas->StrLen(HUDFont, TextItem.Text.ToString(), StrSizeX, StrSizeY); StrSizeX = StrSizeX * TextScale * UIScale; StrSizeY = StrSizeY * TextScale * UIScale; TextItem.Position = FVector2D((Canvas->ClipX - TotalWidth) / 2.0f + Offset + ColWidths[column] - StrSizeX, StartY + i * StrSizeY); Canvas->DrawItem( TextItem ); Offset += ColWidths[column]; } }}
开发者ID:jresch,项目名称:SpeechRecognitionGameControl,代码行数:58,
示例24: FocusClient/** Set the active client. */void FocusClient(ClientNode *np){ if(np->state.status & STAT_HIDDEN) { return; } if(!(np->state.status & (STAT_CANFOCUS | STAT_TAKEFOCUS))) { return; } if(activeClient != np || !(np->state.status & STAT_ACTIVE)) { if(activeClient) { activeClient->state.status &= ~STAT_ACTIVE; if(!(activeClient->state.status & STAT_OPACITY)) { SetOpacity(activeClient, settings.inactiveClientOpacity, 0); } DrawBorder(activeClient); } np->state.status |= STAT_ACTIVE; activeClient = np; if(!(np->state.status & STAT_OPACITY)) { SetOpacity(np, settings.activeClientOpacity, 0); } DrawBorder(np); RequirePagerUpdate(); RequireTaskUpdate(); } if(np->state.status & STAT_MAPPED) { UpdateClientColormap(np); SetWindowAtom(rootWindow, ATOM_NET_ACTIVE_WINDOW, np->window); if(np->state.status & STAT_CANFOCUS) { JXSetInputFocus(display, np->window, RevertToParent, eventTime); } if(np->state.status & STAT_TAKEFOCUS) { SendClientMessage(np->window, ATOM_WM_PROTOCOLS, ATOM_WM_TAKE_FOCUS); } } else { JXSetInputFocus(display, rootWindow, RevertToParent, eventTime); }}
开发者ID:pecarter-work,项目名称:jwm,代码行数:45,
示例25: GetItemRectClientvoid CDreamSkinWindow::DrawItem(HDC hDC, SKINITEM *pItem, RECT rcItem, WCHAR *wstrTitle){ RECT rcClient = GetItemRectClient(pItem, rcItem); DrawBackground(hDC, rcItem, &pItem->skinBk); DrawBorder(hDC, &pItem->skinLBorder, &pItem->skinRBorder, &pItem->skinTBorder, &pItem->skinBBorder, rcItem); if (wstrTitle) DrawTitle(hDC, &pItem->skinTxt, rcClient, wstrTitle);}
开发者ID:zephyrer,项目名称:dreamskin,代码行数:10,
示例26: GetClientSizevoid byoSnake::OnPaint(wxPaintEvent& event){ wxSize size = GetClientSize(); wxBitmap buffer(wxImage(size.GetWidth(),size.GetHeight())); wxBufferedPaintDC DC(this,buffer); DrawBorder(&DC); DrawSnake(&DC); DrawApple(&DC); DrawStats(&DC);}
开发者ID:stahta01,项目名称:codeAdapt_IDE,代码行数:10,
注:本文中的DrawBorder函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ DrawBox函数代码示例 C++ DrawBackground函数代码示例 |