当前位置: 首页>>代码示例>>C++>>正文


C++ DrawBorder函数代码示例

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


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

示例1: clrscr

void 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,代码来源:PROJECT.CPP

示例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,代码来源:PROJECT.CPP

示例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,代码来源:graphics.c

示例4: GetTilePaddedWRect

void 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,代码来源:Miner.cpp

示例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,代码来源:inventry.c

示例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,代码来源:event.c

示例7: glDisable

void 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,代码来源:SMFGroundDrawer.cpp

示例8: BorderElementDraw

static 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,代码来源:ttkDefaultTheme.c

示例9: GetRotateMatrix

void 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,代码来源:xfa_ffcheckbutton.cpp

示例10: GetTilePaddedWRect

void 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,代码来源:Tank.cpp

示例11: GetDC

void 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,代码来源:chart.cpp

示例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,代码来源:event.c

示例13: UiGetColor

void 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,代码来源:swl_menubox.cpp

示例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,代码来源:winshow.c

示例15: DrawBorder

void 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,代码来源:Frame.cpp


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