本文整理汇总了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();
}
示例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);
}
}
示例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);
}
示例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);
}
}
示例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();
}
示例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;
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}
示例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;
}
}
示例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
}
示例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 */
示例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);
}