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

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

51自学网 2021-06-01 20:29:53
  C++
这篇教程C++ DrawBackground函数代码示例写得很实用,希望能帮到您。

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

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

示例1: GetClientRect

void DashboardInstrument_BaroHistory::Draw(wxGCDC* dc){   m_WindowRect = GetClientRect();   m_DrawAreaRect=GetClientRect();   m_DrawAreaRect.SetHeight(m_WindowRect.height-m_TopLineHeight-m_TitleHeight);   m_DrawAreaRect.SetX (m_LeftLegend+3);   DrawBackground(dc);   DrawForeground(dc);}
开发者ID:LochanaThenuwara,项目名称:Siyara2D,代码行数:9,


示例2: bounds

voidBitmapView::Draw(BRect updateRect){	BRect bounds(Bounds());	DrawBackground(bounds, updateRect);	if (fBitmap == NULL)		return;	BRect bitmapBounds = fBitmap->Bounds();	if (bitmapBounds.Width() <= 0.0f || bitmapBounds.Height() <= 0.0f)		return;	float scale = 1.0f;	if (fScaleBitmap) {		float hScale = bounds.Width() / bitmapBounds.Width();		float vScale = bounds.Height() / bitmapBounds.Height();		scale = std::min(hScale, vScale);	}	float width = bitmapBounds.Width() * scale;	float height = bitmapBounds.Height() * scale;	switch (LayoutAlignment().horizontal) {		case B_ALIGN_LEFT:			break;		case B_ALIGN_RIGHT:			bounds.left = floorf(bounds.right - width);			break;		default:		case B_ALIGN_HORIZONTAL_CENTER:			bounds.left = floorf(bounds.left				+ (bounds.Width() - width) / 2.0f);			break;	}	switch (LayoutAlignment().vertical) {		case B_ALIGN_TOP:			break;		case B_ALIGN_BOTTOM:			bounds.top = floorf(bounds.bottom - height);			break;		default:		case B_ALIGN_VERTICAL_CENTER:			bounds.top = floorf(bounds.top				+ (bounds.Height() - height) / 2.0f);			break;	}	bounds.right = ceilf(bounds.left + width);	bounds.bottom = ceilf(bounds.top + height);	SetDrawingMode(B_OP_OVER);	DrawBitmap(fBitmap, bitmapBounds, bounds, B_FILTER_BITMAP_BILINEAR);}
开发者ID:AmirAbrams,项目名称:haiku,代码行数:56,


示例3: TitleScreenOutputFrame

void TitleScreenOutputFrame(void){	DrawBackground(&BG, 0);	HighScoreDisplayDraw(&HSD);	for (int i = 0; i < MAX_PLAYERS; i++)	{		Tex t = GetControlTex(i);		SDL_Rect dest =		{			SCREEN_X((i + 1) * FIELD_WIDTH / (MAX_PLAYERS + 1)) -				t.W / 2,			(SCREEN_HEIGHT - t.H) / 2 - SCREEN_X(PLAYER_RADIUS),			t.W, t.H		};		RenderTex(t.T, NULL, &dest);	}	for (int i = 0; i < MAX_PLAYERS; i++)	{		PlayerDraw(&players[i], 0);	}	for (int i = 0; i < MAX_PLAYERS; i++)	{		BlockDraw(&blocks[i], 0);	}	DrawTitleImg();	// Draw player icons if winners	if (!Start)	{		const int left =			(SCREEN_WIDTH - PLAYER_SPRITESHEET_WIDTH * winners) / 2;		for (int i = 0; i < winners; i++)		{			const int playerIndex = winnerIndices[i];			SDL_Rect src = {				0, 0, PLAYER_SPRITESHEET_WIDTH, PLAYER_SPRITESHEET_HEIGHT			};			SDL_Rect dest =			{				left + i * PLAYER_SPRITESHEET_WIDTH,				SCREEN_HEIGHT * 0.66f,				src.w, src.h			};			RenderTex(PlayerSpritesheets[playerIndex].T, &src, &dest);		}	}	SDL_Color c = { 177, 177, 177, 255 };	TextRenderCentered(		font, WelcomeMessage, (int)(SCREEN_HEIGHT * 0.75f), c);	SDL_RenderPresent(Renderer);}
开发者ID:AMDmi3,项目名称:FallingTime,代码行数:56,


示例4: UIShader_Prepare

void InGameMenuScreen::render() {	UIShader_Prepare();	UIBegin();	DrawBackground(1.0f);	const char *title;	if (UTF8StringHasNonASCII(game_title.c_str())) {		title = "(can't display japanese title)";	} else {		title = game_title.c_str();	}	ui_draw2d.DrawText(UBUNTU48, title, dp_xres / 2, 30, 0xFFFFFFFF, ALIGN_HCENTER);	int x = 30;	int y = 50;	UICheckBox(GEN_ID, x, y += 50, "Show Debug Statistics", ALIGN_TOPLEFT, &g_Config.bShowDebugStats);	UICheckBox(GEN_ID, x, y += 50, "Show FPS", ALIGN_TOPLEFT, &g_Config.bShowFPSCounter);	// TODO: Maybe shouldn't show this if the screen ratios are very close...	UICheckBox(GEN_ID, x, y += 50, "Stretch to display", ALIGN_TOPLEFT, &g_Config.bStretchToDisplay);	UICheckBox(GEN_ID, x, y += 50, "Hardware Transform", ALIGN_TOPLEFT, &g_Config.bHardwareTransform);	bool fs = g_Config.iFrameSkip == 1;	UICheckBox(GEN_ID, x, y += 50, "Frameskip", ALIGN_TOPLEFT, &fs);	g_Config.iFrameSkip = fs ? 1 : 0;	// TODO: Add UI for more than one slot.	HLinear hlinear1(x, y + 80, 20);	if (UIButton(GEN_ID, hlinear1, LARGE_BUTTON_WIDTH, "Save State", ALIGN_LEFT)) {		SaveState::SaveSlot(0, 0, 0);		screenManager()->finishDialog(this, DR_CANCEL);	}	if (UIButton(GEN_ID, hlinear1, LARGE_BUTTON_WIDTH, "Load State", ALIGN_LEFT)) {		SaveState::LoadSlot(0, 0, 0);		screenManager()->finishDialog(this, DR_CANCEL);	}	VLinear vlinear(dp_xres - 10, 160, 20);	if (UIButton(GEN_ID, vlinear, LARGE_BUTTON_WIDTH, "Continue", ALIGN_RIGHT)) {		screenManager()->finishDialog(this, DR_CANCEL);	}	if (UIButton(GEN_ID, vlinear, LARGE_BUTTON_WIDTH, "Return to Menu", ALIGN_RIGHT)) {		screenManager()->finishDialog(this, DR_OK);	}		if (UIButton(GEN_ID, Pos(dp_xres - 10, dp_yres - 10), LARGE_BUTTON_WIDTH*2, "Debug: Dump Next Frame", ALIGN_BOTTOMRIGHT)) {		gpu->DumpNextFrame();	}	DrawWatermark();	UIEnd();	glsl_bind(UIShader_Get());	ui_draw2d.Flush(UIShader_Get());}
开发者ID:phaew,项目名称:ppsspp,代码行数:56,


示例5: DrawHighlightedButton

void DrawHighlightedButton(buttonT & button) {    SetPenColor("ACTIVATED_BACKGROUND");    DrawBackground(button);    SetPenColor("ACTIVATED_INNERSHADE");    DrawInnerShade(button);    SetPenColor("ACTIVATED_BORDER");    DrawOutline(button);    SetPenColor("ACTIVATED_TEXT");    DrawButtonText(button);}
开发者ID:Nikvand,项目名称:glass_bonus_challenge,代码行数:10,


示例6: GetClientRect

void TacticsInstrument_WindDirHistory::Draw(wxGCDC* dc){    m_WindowRect = GetClientRect();    m_DrawAreaRect = GetClientRect();    m_DrawAreaRect.SetHeight(m_WindowRect.height - m_TopLineHeight - m_TitleHeight);    m_DrawAreaRect.SetX(m_LeftLegend + 3);//  wxLogMessage("WindHist: m_WindowRect.height=%d,m_DrawAreaRect.height=%d,m_TopLineHeight=%d,m_TitleHeight=%d", m_WindowRect.height, m_DrawAreaRect.height, m_TopLineHeight, m_TitleHeight);    DrawBackground(dc);    DrawForeground(dc);}
开发者ID:tom-r,项目名称:tactics_pi,代码行数:10,


示例7: GetItemRectClient

void 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,


示例8: UpdateTarget

void GBDebuggerView::Draw() {	UpdateTarget();	DrawBackground();	GBRect box;	if ( ! target ) {		DrawStringLeft("No robot selected", 4, 20, 12);		box.top = kEdgeSpace;		box.bottom = box.top + kProfileBoxHeight;		box.right = Width() - kEdgeSpace;		box.left = box.right - kProfileBoxWidth;		DrawProfileBox(box);	} else {	// draw robot name		box.left = box.top = kEdgeSpace;		box.right = Width() - kEdgeSpace;		box.bottom = box.top + kStatusBoxHeight;		DrawStatusBox(box);	// get brain		const GBStackBrain * sbrain = dynamic_cast<GBStackBrain *>(target->Brain());		if ( sbrain ) {		// draw pc			box.top = box.bottom + kEdgeSpace;			box.bottom = box.top + kPCBoxHeight;			box.right -= kHardwareBoxWidth + kEdgeSpace;			DrawPCBox(box, sbrain);		// draw stack			box.top = box.bottom + kEdgeSpace;			box.bottom = box.top + kStackBoxHeight;			box.right = (Width() - kHardwareBoxWidth - kEdgeSpace) / 2;			DrawStackBox(box, sbrain);		// draw return stack			box.left = (Width() - kHardwareBoxWidth + kEdgeSpace) / 2;			box.right = Width() - kHardwareBoxWidth - kEdgeSpace * 2;			DrawReturnStackBox(box, sbrain);		// draw variables			box.top = box.bottom + kEdgeSpace;			box.bottom = box.top + (sbrain->NumVariables() + sbrain->NumVectorVariables()) * 10 + 15;			box.left = kEdgeSpace;			DrawVariablesBox(box, sbrain);		// draw prints			box.top = box.bottom + kEdgeSpace;			box.bottom = box.top + kPrintBoxHeight;			DrawPrintBox(box, sbrain);		}	// draw hardware		box.top = kStatusBoxHeight + kEdgeSpace * 2;		box.right = Width() - kEdgeSpace;		box.left = box.right - kHardwareBoxWidth;		box.bottom = box.top + kHardwareBoxHeight;		DrawHardwareBox(box);	}// record	worldChanges = world.ChangeCount();	redrawAnyway = false;}
开发者ID:manofsteel76667,项目名称:Grobots_Java,代码行数:55,


示例9: UIShader_Prepare

void SystemScreen::render() {	UIShader_Prepare();	UIBegin(UIShader_Get());	DrawBackground(1.0f);	I18NCategory *s = GetI18NCategory("System");	I18NCategory *g = GetI18NCategory("General");	ui_draw2d.SetFontScale(1.5f, 1.5f);	ui_draw2d.DrawText(UBUNTU24, s->T("System Settings"), dp_xres / 2, 20, 0xFFFFFFFF, ALIGN_HCENTER);	ui_draw2d.SetFontScale(1.0f, 1.0f);	if (UIButton(GEN_ID, Pos(dp_xres - 10, dp_yres-10), LARGE_BUTTON_WIDTH, 0, g->T("Back"), ALIGN_RIGHT | ALIGN_BOTTOM)) {		screenManager()->finishDialog(this, DR_OK);	}	int x = 30;	int y = 30;	int stride = 40;	int columnw = 400;	UICheckBox(GEN_ID, x, y += stride, s->T("Dynarec", "Dynarec (JIT)"), ALIGN_TOPLEFT, &g_Config.bJit);	if (g_Config.bJit)		UICheckBox(GEN_ID, x, y += stride, s->T("Fast Memory", "Fast Memory (unstable)"), ALIGN_TOPLEFT, &g_Config.bFastMemory);	UICheckBox(GEN_ID, x, y += stride, s->T("Show Debug Statistics"), ALIGN_TOPLEFT, &g_Config.bShowDebugStats);	UICheckBox(GEN_ID, x, y += stride, s->T("Show FPS"), ALIGN_TOPLEFT, &g_Config.bShowFPSCounter);	VGrid vlang(530, 100, dp_yres - 50, 10, 10);	for (size_t i = 0; i < langs_.size(); i++) {		std::string code;		size_t dot = langs_[i].name.find('.');		if (dot != std::string::npos)			code = langs_[i].name.substr(0, dot);		std::string buttonTitle = langs_[i].name;		if (!code.empty())			buttonTitle = code;		if (UIButton(GEN_ID_LOOP(i), vlang, LARGE_BUTTON_WIDTH, 0, buttonTitle.c_str(), ALIGN_TOPLEFT)) {			std::string oldLang = g_Config.languageIni;			g_Config.languageIni = code;			if (i18nrepo.LoadIni(g_Config.languageIni)) {				// Dunno what else to do here.				// After this, g and s are no longer valid. Let's return, some flicker is okay.				g = GetI18NCategory("General");				s = GetI18NCategory("System");			} else {				g_Config.languageIni = oldLang;			}		}	}	UIEnd();}
开发者ID:wargio,项目名称:ppsspp,代码行数:55,


示例10: UIShader_Prepare

void DeveloperScreen::render() {	UIShader_Prepare();	UIBegin(UIShader_Get());	DrawBackground(1.0f);	I18NCategory *g = GetI18NCategory("General");	I18NCategory *d = GetI18NCategory("Developer");	I18NCategory *s = GetI18NCategory("System");	ui_draw2d.SetFontScale(1.5f, 1.5f);	ui_draw2d.DrawText(UBUNTU24, d->T("Developer Tools"), dp_xres / 2, 10, 0xFFFFFFFF, ALIGN_HCENTER);	ui_draw2d.SetFontScale(1.0f, 1.0f);	int x = 50;	int y = 40;	const int stride = 40;	const int w = 400;	UICheckBox(GEN_ID, x, y += stride, s->T("Show Debug Statistics"), ALIGN_TOPLEFT, &g_Config.bShowDebugStats);	bool reportingEnabled = Reporting::IsEnabled();	const static std::string reportHostOfficial = "report.ppsspp.org";	if (UICheckBox(GEN_ID, x, y += stride, s->T("Enable Compatibility Server Reports"), ALIGN_TOPLEFT, &reportingEnabled)) {		g_Config.sReportHost = reportingEnabled ? reportHostOfficial : "";	}	VLinear vlinear(x, y + stride + 12, 16);	if (UIButton(GEN_ID, Pos(dp_xres - 10, dp_yres - 10), LARGE_BUTTON_WIDTH, 0, g->T("Back"), ALIGN_RIGHT | ALIGN_BOTTOM)) {		screenManager()->finishDialog(this, DR_OK);	}	if (UIButton(GEN_ID, vlinear, w, 0, d->T("Load language ini"), ALIGN_LEFT)) {		i18nrepo.LoadIni(g_Config.languageIni);		// After this, g and s are no longer valid. Need to reload them.		g = GetI18NCategory("General");		d = GetI18NCategory("Developer");	}	if (UIButton(GEN_ID, vlinear, w, 0, d->T("Save language ini"), ALIGN_LEFT)) {		i18nrepo.SaveIni(g_Config.languageIni);		}	if (UIButton(GEN_ID, vlinear, w, 0, d->T("Run CPU tests"), ALIGN_LEFT)) {		// TODO: Run tests		RunTests();		// screenManager()->push(new EmuScreen())	}	if (UIButton(GEN_ID, vlinear, w, 0, d->T("Dump frame to log"), ALIGN_LEFT)) {		gpu->DumpNextFrame();	}	UIEnd();}
开发者ID:jack00,项目名称:ppsspp,代码行数:55,


示例11: ASSERT

void CBarGraphEditor::OnPaint(){	ASSERT(m_pBackDC != NULL);	CPaintDC dc(this);		DrawBackground(m_pBackDC, m_iLevels, false, 0);	DrawRange(m_pBackDC, m_iLevels, 0);	// Return now if no sequence is selected	if (!m_pSequence) {		PaintBuffer(m_pBackDC, &dc);		return;	}	// Draw items	int Count = m_pSequence->GetItemCount();	if (!Count) {		PaintBuffer(m_pBackDC, &dc);		return;	}	int StepWidth = GetItemWidth();	int StepHeight = m_GraphRect.Height() / m_iLevels;	if (m_iHighlightedValue > 0 && m_iHighlightedItem >= 0 && m_iHighlightedItem < Count) {		int x = m_GraphRect.left + m_iHighlightedItem * StepWidth + 1;		int y = m_GraphRect.top + StepHeight * (m_iLevels - m_iHighlightedValue);		int w = StepWidth;		int h = StepHeight * m_iHighlightedValue;		DrawShadowRect(m_pBackDC, x, y, w, h);	}	// Draw items	for (int i = 0; i < Count; i++) {		int x = m_GraphRect.left + i * StepWidth + 1;		int y = m_GraphRect.top + StepHeight * (m_iLevels - m_pSequence->GetItem(i));		int w = StepWidth;		int h = StepHeight * m_pSequence->GetItem(i);		if (m_iCurrentPlayPos == i)			DrawPlayRect(m_pBackDC, x, y, w, h);		else if ((m_iHighlightedItem == i) && (m_pSequence->GetItem(i) >= m_iHighlightedValue) && !IsEditLine())			DrawCursorRect(m_pBackDC, x, y, w, h);		else			DrawRect(m_pBackDC, x, y, w, h);	}		DrawLoopPoint(m_pBackDC, StepWidth);	DrawReleasePoint(m_pBackDC, StepWidth);	DrawLine(m_pBackDC);	PaintBuffer(m_pBackDC, &dc);}
开发者ID:WhoIsLudwig,项目名称:nesicide,代码行数:55,


示例12: GameOutputFrame

void GameOutputFrame(void){	const float screenYOff =		(float)MAX(-SCREEN_HEIGHT, SCREEN_Y(camera.Y) - SCREEN_HEIGHT / 2);	// Draw the background.	DrawBackground(&BG, screenYOff);	SpaceDraw(&space, screenYOff);	PickupsDraw(Screen, screenYOff);	ParticlesDraw(Screen, screenYOff);	int c = 0;	for (int i = 0; i < MAX_PLAYERS; i++)	{		PlayerDraw(&players[i], screenYOff);		if (!players[i].Enabled) continue;		// Draw each player's current score.		char buf[17];		sprintf(buf, "%d", players[i].Score);		const SDL_Color white = { 255, 255, 255, 255 };#ifdef TTF		SDL_Surface *t = TTF_RenderText_Blended(font, buf, white);#endif		const int x = (c + 1) * SCREEN_WIDTH / (PlayerEnabledCount() + 1);#ifdef TTF		const int wHalf = (t->w + PLAYER_SPRITESHEET_WIDTH) / 2;#else		const int wHalf = (16 + PLAYER_SPRITESHEET_WIDTH) / 2;#endif		// Draw the player icon, followed by the score number		SDL_Rect src = {			0, 0, PLAYER_SPRITESHEET_WIDTH, PLAYER_SPRITESHEET_HEIGHT		};		SDL_Rect dest = { (Sint16)(x - wHalf), 0, 0, 0 };		SDL_BlitSurface(PlayerSpritesheets[i], &src, Screen, &dest);		// Draw score number		dest.x = (Sint16)(x - wHalf + PLAYER_SPRITESHEET_WIDTH);#ifdef TTF		dest.y = (Sint16)(PLAYER_SPRITESHEET_HEIGHT - t->h) / 2;#else		dest.y = (Sint16)(PLAYER_SPRITESHEET_HEIGHT - 16) / 2;#endif		#ifdef TTF		SDL_BlitSurface(t, NULL, Screen, &dest);		SDL_FreeSurface(t);#endif		c++;	}	SDL_Flip(Screen);}
开发者ID:gameblabla,项目名称:fallingtime,代码行数:55,


示例13: dc

void ControlToolBar::OnPaint(wxPaintEvent & evt){   wxPaintDC dc(this);   int width, height;   GetSize(&width, &height);   #if defined __WXMAC__      // Mac has an Aqua background...      DrawBackground(dc, width, height);    #else      if (mShowTools)      {         //TODO: Get rid of all the magic numbers used in sizing.         // On other platforms put the big buttons on a beveled platform.         DrawBackground(dc, 81, height);         // Width is reduced by an extra two pixels to visually separate         // the control toolbar from the next grab bar on the right.         wxRect bevelRect( 81, 0, width-84, height-1 );         AColor::Bevel( dc, true, bevelRect );      }      else      {         DrawBackground(dc, width, height);          wxRect bevelRect(0, 0, width - 1, height - 1);         AColor::Bevel(dc, true, bevelRect);      }   #endif   #ifndef __WXMAC__      if (mShowTools)      {         // JKC: Grey horizontal spacer line between buttons.         // Not quite ideal, but seems the best solution to          // make the tool button heights add up to the          // main control button height.         AColor::Dark( &dc, false);         dc.DrawLine(0, 27, 81, 27);      }   #endif}
开发者ID:andreipaga,项目名称:audacity,代码行数:42,


示例14: EraseScreen

VOID EraseScreen(VOID){    RC rc;    HDC HdcSet();    if(!FGetHdc())        return;    GetClientRect(hwndApp, (LPRECT) &rc);    DrawBackground(rc.xLeft, rc.yTop, rc.xRight, rc.yBot);    ReleaseHdc();}
开发者ID:andyvand,项目名称:ms-ported,代码行数:11,


示例15: DrawBackground

void JMChattControl::SetBackImage(Bitmap* strImageFileName, bool bRedraw){	__stScreenInfo.pBitmapBackground = strImageFileName;	DrawBackground(__pCanvasBack);	if( bRedraw )		this->RequestRedraw();}
开发者ID:JunminLee,项目名称:Winwin,代码行数:11,


示例16: SystemGc

void CSpaceInvadersAppView::Draw( const TRect& /*aRect*/ ) const{    // Get the standard graphics context    CWindowGc& gc = SystemGc();    DrawBackground(gc);    DrawShip(gc);    DrawAliens(gc);    DrawPoints(gc);    DrawQuitCommand(gc);}
开发者ID:Watkinsong,项目名称:s6ace_invaders,代码行数:11,


示例17: UpdateDisplay

void UpdateDisplay() {    glColor4f(1.0f, 1.0f, 1.0f, 1.0f);    glClearColor( 0.0f, 0.0f, 0.0f, 0.0f );    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);    DrawBackground();    DrawGrid(game->GetGrid(), game->GetTextures());    DrawTetromino(game->GetGrid(), game->GetTetromino(), game->GetTextures());    DrawPreview();    DrawText();}
开发者ID:shiver,项目名称:heavy_metal,代码行数:11,


示例18: UIShader_Prepare

void SystemScreen::render() {	UIShader_Prepare();	UIBegin(UIShader_Get());	DrawBackground(1.0f);	I18NCategory *s = GetI18NCategory("System");	I18NCategory *g = GetI18NCategory("General");	ui_draw2d.SetFontScale(1.5f, 1.5f);	ui_draw2d.DrawText(UBUNTU24, s->T("System Settings"), dp_xres / 2, 10, 0xFFFFFFFF, ALIGN_HCENTER);	ui_draw2d.SetFontScale(1.0f, 1.0f);	if (UIButton(GEN_ID, Pos(dp_xres - 10, dp_yres - 10), LARGE_BUTTON_WIDTH, 0, g->T("Back"), ALIGN_RIGHT | ALIGN_BOTTOM)) {		screenManager()->finishDialog(this, DR_OK);	}	int x = 30;	int y = 30;	int stride = 40;	int columnw = 400;#ifdef IOS	if(!isJailed)		UICheckBox(GEN_ID, x, y += stride, s->T("Dynarec", "Dynarec (JIT)"), ALIGN_TOPLEFT, &g_Config.bJit);	else	{		UICheckBox(GEN_ID, x, y += stride, s->T("DynarecisJailed", "Dynarec (JIT) - (Not jailbroken - JIT not available)"), ALIGN_TOPLEFT, &g_Config.bJit);		g_Config.bJit = false;	}#else	UICheckBox(GEN_ID, x, y += stride, s->T("Dynarec", "Dynarec (JIT)"), ALIGN_TOPLEFT, &g_Config.bJit);#endif	if (g_Config.bJit)		UICheckBox(GEN_ID, x, y += stride, s->T("Fast Memory", "Fast Memory (unstable)"), ALIGN_TOPLEFT, &g_Config.bFastMemory);	UICheckBox(GEN_ID, x, y += stride, s->T("Show Debug Statistics"), ALIGN_TOPLEFT, &g_Config.bShowDebugStats);	UICheckBox(GEN_ID, x, y += stride, s->T("Show FPS"), ALIGN_TOPLEFT, &g_Config.bShowFPSCounter);	UICheckBox(GEN_ID, x, y += stride, s->T("Encrypt Save"), ALIGN_TOPLEFT, &g_Config.bEncryptSave);	UICheckBox(GEN_ID, x, y += stride, s->T("Use Button X to Confirm"), ALIGN_TOPLEFT, &g_Config.bButtonPreference); 	bool tf = g_Config.itimeformat == 1;	if (UICheckBox(GEN_ID, x, y += stride, s->T("12HR Time Format"), ALIGN_TOPLEFT, &tf)) {		g_Config.itimeformat = tf ? 1 : 0;	}	bool reportingEnabled = Reporting::IsEnabled();	const static std::string reportHostOfficial = "report.ppsspp.org";	if (UICheckBox(GEN_ID, x, y += stride, s->T("Enable Compatibility Server Reports"), ALIGN_TOPLEFT, &reportingEnabled)) {		g_Config.sReportHost = reportingEnabled ? reportHostOfficial : "";	}	if (UIButton(GEN_ID, Pos(x, y += stride * 3), LARGE_BUTTON_WIDTH, 0, s->T("Language"), ALIGN_BOTTOMLEFT)) {		screenManager()->push(new LanguageScreen());	}	UIEnd();}
开发者ID:CPkmn,项目名称:ppsspp,代码行数:54,


示例19: _T

// 初始化窗口背景皮肤(加载到背景内存dc)void CDuiVisionDesignerView::InitWindowBkSkin(){	m_strBkImg = _T("skin:");	int nType = 0;	COLORREF clr = RGB(0,0,0);	CString strImgFile = _T("");	BOOL bRet = TRUE;	if(!m_strBkImg.IsEmpty())	// 如果窗口设置了背景图片属性,就用此背景图片	{		// 通过Skin读取		if(m_strBkImg.Find(_T("skin:")) == 0)		{			strImgFile = GetDuiVisionPluginPath() + _T("bkimg//SKIN_PIC_0.png");//DuiSystem::Instance()->GetSkin(m_strBkImg);		}else		{			strImgFile = m_strBkImg;		}		if(strImgFile.Find(_T(".")) != -1)	// 加载图片文件		{			nType = BKTYPE_IMAGE_FILE;		}	}else	if(m_crlBack != RGB(0,0,0))	// 如果窗口设置了背景颜色属性,就用此背景颜色	{		nType = BKTYPE_COLOR;		clr = m_crlBack;	}else	{		// 调用DuiSystem从应用程序获取背景信息		bRet = FALSE;//DuiSystem::Instance()->GetWindowBkInfo(nType, nIDResource, clr, strImgFile);	}	// 设置窗口背景皮肤	if(bRet)	{		if(nType == BKTYPE_COLOR)	// 颜色		{			DrawBackground(clr);		}else		if(nType == BKTYPE_IMAGE_FILE)	// 图片文件		{			LoadBackgroundImage(strImgFile);		}	}else	{		// 默认加载第一张背景图片		strImgFile = GetDuiVisionPluginPath() + _T("bkimg//SKIN_PIC_0.png");//DuiSystem::Instance()->GetSkin(_T("SKIN_PIC_0"));		LoadBackgroundImage(strImgFile);	}}
开发者ID:github4fans,项目名称:Script.NET,代码行数:54,


示例20: DrawBackground

Control* Window::RemoveControl(unsigned short i){	if (i < Controls.size() ) {		Control *ctrl = Controls[i];		const Region& frame = ctrl->ControlFrame();		DrawBackground(&frame); // paint over the spot the control occupied		Controls.erase(Controls.begin()+i);		ControlRemoved(ctrl);		return ctrl;	}	return NULL;}
开发者ID:AlanWasTaken,项目名称:gemrb,代码行数:12,


示例21: dc

void CDepartmentEstimationDialog::OnPaint(){	CPaintDC dc(this);	DrawBackground(dc);	DrawEstablishment(dc);	DrawDepartmentsUserIsIn(dc);//DrawUserPositions(dc);	DrawDepartments(dc);	DrawSensors(dc);	CTabDlg::OnPaint();}
开发者ID:FelGel,项目名称:BlueMagic,代码行数:12,


示例22: DrawBackground

void Window::Render(){   mutex.Lock();   DrawBackground();   for(atpm_int32 i=0;i<childs.size();++i){	      childs[i]->Render();   }   BaseWindow::Render();   mutex.Unlock();}
开发者ID:hamzakilic,项目名称:autopilot_manager,代码行数:13,


示例23: DrawNormalButton

void DrawNormalButton(buttonT & button) {    SetPenColor("STANDARD_BACKGROUND");    DrawBackground(button);    SetPenColor("STANDARD_OUTERSHADE");    DrawOuterShade(button);    SetPenColor("STANDARD_INNERSHADE");    DrawInnerShade(button);    SetPenColor("STANDARD_HIGHLIGHT");    DrawHighlight(button);    SetPenColor("Black");    DrawOutline(button);    DrawButtonText(button);}
开发者ID:Nikvand,项目名称:glass_bonus_challenge,代码行数:13,


示例24: Render

        virtual void Render(StyledWindow* window) const {            wxAutoBufferedPaintDC deviceContext(window);            auto textBox = static_cast<StyledTextBox*>(window);            auto g = std::unique_ptr<wxGraphicsContext>(wxGraphicsContext::Create(deviceContext));            auto context = g.get();            DrawBackground(context, textBox);            DrawSelection(context, textBox);            DrawText(context, textBox);            DrawCursor(context, textBox);        }
开发者ID:alexpana,项目名称:wxStyle,代码行数:13,


示例25: dc

void CPropPageFrameEx::OnPaint() {	CPaintDC dc(this);  CRect rect;  GetClientRect(&rect);  CMemDC memDC( &dc,&rect );  // Draw the background.  DrawBackground( &memDC );  // Draw the title pane.  Draw( &memDC );	}
开发者ID:lozpeng,项目名称:applesales,代码行数:13,


示例26: DrawBackground

/****************************************************************************	Desc: グラフを描画する.	 Arg: グラフの幅		  グラフの高さ  Return: ---****************************************************************************/void CStockGraph::Draw(CDC* pDC){	DrawBackground(pDC);	DrawKLine(pDC);	DrawVolume(pDC);	for (int iLine = 0; iLine < MA_LINE_MAX; iLine++)	{		DrawMovingAverages(pDC, iLine);	}	if (m_nMarkCount > 0)		DrawMark(pDC);}
开发者ID:sunyongqi,项目名称:StockKLine,代码行数:19,


示例27: dc

void EditToolBar::OnPaint(wxPaintEvent & evt){   wxPaintDC dc(this);   int width, height;   GetSize(&width, &height);   DrawBackground(dc, width, height);   dc.SetPen(*wxBLACK_PEN);//   for(int i=0; i<mNumDividers; i++)//      dc.DrawLine(mDividers[i], 0, mDividers[i], mIdealSize.GetHeight());}
开发者ID:AaronFae,项目名称:VimProject,代码行数:13,


示例28: UIShader_Prepare

void GraphicsScreenP1::render() {	UIShader_Prepare();	UIBegin(UIShader_Get());	DrawBackground(1.0f);	I18NCategory *g = GetI18NCategory("General");	I18NCategory *gs = GetI18NCategory("Graphics");	ui_draw2d.SetFontScale(1.5f, 1.5f);	ui_draw2d.DrawText(UBUNTU24, gs->T("Graphics Settings"), dp_xres / 2, 20, 0xFFFFFFFF, ALIGN_HCENTER);	ui_draw2d.SetFontScale(1.0f, 1.0f);	if (UIButton(GEN_ID, Pos(dp_xres - 10, dp_yres - 10), LARGE_BUTTON_WIDTH, 0, g->T("Back"), ALIGN_RIGHT | ALIGN_BOTTOM)) {		screenManager()->finishDialog(this, DR_OK);	}	if (UIButton(GEN_ID, Pos( 220 , dp_yres - 10), LARGE_BUTTON_WIDTH, 0, g->T("Next Page"), ALIGN_RIGHT | ALIGN_BOTTOM)) {		screenManager()->push(new GraphicsScreenP2());	}	int x = 30;	int y = 30;	int stride = 40;	int columnw = 400;	UICheckBox(GEN_ID, x, y += stride, gs->T("Vertex Cache"), ALIGN_TOPLEFT, &g_Config.bVertexCache);#ifndef __SYMBIAN32__	UICheckBox(GEN_ID, x, y += stride, gs->T("Hardware Transform"), ALIGN_TOPLEFT, &g_Config.bHardwareTransform);	UICheckBox(GEN_ID, x, y += stride, gs->T("Stream VBO"), ALIGN_TOPLEFT, &g_Config.bUseVBO);#endif	UICheckBox(GEN_ID, x, y += stride, gs->T("Media Engine"), ALIGN_TOPLEFT, &g_Config.bUseMediaEngine);	UICheckBox(GEN_ID, x, y += stride, gs->T("Linear Filtering"), ALIGN_TOPLEFT, &g_Config.bLinearFiltering);	bool enableFrameSkip = g_Config.iFrameSkip != 0;	UICheckBox(GEN_ID, x, y += stride, gs->T("Frame Skipping"), ALIGN_TOPLEFT, &enableFrameSkip);	if (enableFrameSkip) {		// This one doesn't have the # of frame options, so only change the setting if they flipped it.		// 3 means auto.		if (g_Config.iFrameSkip == 0)			g_Config.iFrameSkip = 3;	}	else {		g_Config.iFrameSkip = 0;	}	UICheckBox(GEN_ID, x, y += stride, gs->T("Mipmapping"), ALIGN_TOPLEFT, &g_Config.bMipMap);	if (UICheckBox(GEN_ID, x, y += stride, gs->T("Buffered Rendering"), ALIGN_TOPLEFT, &g_Config.bBufferedRendering)) {		if (gpu)			gpu->Resized();	}	UIEnd();}
开发者ID:cemedine,项目名称:ppsspp,代码行数:51,



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


C++ DrawBorder函数代码示例
C++ DrawArrow函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。