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

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

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

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

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

示例1: block_cpy

bool Widget::IsCollide(int x,int y,Direction dir){    //用拷贝的临时方块做判断    int temp_block[4][4];    block_cpy(temp_block,cur_block);    Border temp_border;    GetBorder(temp_block,temp_border);    //先尝试按照某方向走一格    switch(dir)    {    case UP:        BlockRotate(temp_block);        GetBorder(temp_block,temp_border); //旋转后要重新计算边界        break;    case DOWN:        y+=1;        break;    case LEFT:        x-=1;        break;    case RIGHT:        x+=1;        break;    default:        break;    }    for(int i=temp_border.ubound;i<=temp_border.dbound;i++)        for(int j=temp_border.lbound;j<=temp_border.rbound;j++)            if(game_area[y+i][x+j]==2&&temp_block[i][j]==1||x+temp_border.lbound<0||x+temp_border.rbound>AREA_COL-1)                return true;    return false;}
开发者ID:luspohie,项目名称:QtTetris,代码行数:32,


示例2: defined

bool wxGenericCollapsiblePane::Create(wxWindow *parent,                                      wxWindowID id,                                      const wxString& label,                                      const wxPoint& pos,                                      const wxSize& size,                                      long style,                                      const wxValidator& val,                                      const wxString& name){    if ( !wxControl::Create(parent, id, pos, size, style, val, name) )        return false;    m_strLabel = label;#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__)    // on Mac we use the disclosure triangle    // we need a light gray line above and below, lets approximate with the frame    m_pStaticLine = NULL;    m_pButton = new wxDisclosureTriangle( this, wxID_ANY, GetBtnLabel(),                                         wxDefaultPosition, wxDefaultSize, wxSIMPLE_BORDER );    m_pButton->SetBackgroundColour( wxColour( 221, 226, 239 ) );    m_sz = new wxBoxSizer(wxHORIZONTAL);    // m_sz->Add(4,4); where shall we put it?    m_sz->Add( m_pButton, 1);#else    // create children and lay them out using a wxBoxSizer    // (so that we automatically get RTL features)    m_pButton = new wxButton(this, wxID_ANY, GetBtnLabel(), wxPoint(0, 0),                             wxDefaultSize, wxBU_EXACTFIT);    m_pStaticLine = new wxStaticLine(this, wxID_ANY);    // on other platforms we put the static line and the button horizontally    m_sz = new wxBoxSizer(wxHORIZONTAL);    m_sz->Add(m_pButton, 0, wxLEFT|wxTOP|wxBOTTOM, GetBorder());    m_sz->Add(m_pStaticLine, 1, wxALIGN_CENTER|wxLEFT|wxRIGHT, GetBorder());#endif    // FIXME: at least under wxCE and wxGTK1 the background is black if we don't do    //        this, no idea why...#if defined(__WXWINCE__) || defined(__WXGTK__)    SetBackgroundColour(parent->GetBackgroundColour());#endif    // do not set sz as our sizers since we handle the pane window without using sizers    m_pPane = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxDefaultSize,                          wxTAB_TRAVERSAL|wxNO_BORDER, wxT("wxCollapsiblePanePane") );    // start as collapsed:    m_pPane->Hide();    return true;}
开发者ID:jonntd,项目名称:dynamica,代码行数:51,


示例3: GetBorder

void WebListBox::ResizeScrollBars(void){	if (mpHScroll)	{		WebRect r;		r.Set(GetMargin() + GetBorder(),		      Height() - GetMargin() - GetBorder() - miSliderWidth - 1,		      Width() - (mpVScroll ? miSliderWidth : 0) - GetMargin() - GetBorder() - 1,		      Height() - GetMargin() - GetBorder() - 1);		mpHScroll->Move(&r);		WebRect vr;		GetOptionsRect(&vr);		mpHScroll->SetWindow(vr.Width());		mpHScroll->Invalidate();	}	if (mpVScroll)	{		WebRect r;		r.Set(Width() - 1 - GetMargin() - GetBorder() - miSliderWidth,		      GetMargin() + GetBorder(),		      Width() - 1 - GetMargin() - GetBorder(),		      Height() - 1 - (mpHScroll ? miSliderWidth : 0) - GetMargin() - GetBorder());		mpVScroll->Move(&r);		WebRect vr;		GetOptionsRect(&vr);		mpVScroll->SetWindow(vr.Height());		mpVScroll->Invalidate();	}}
开发者ID:peteratebs,项目名称:webcwebbrowser,代码行数:30,


示例4: GetLayout

inline bool MtgCard::operator==(const MtgCard& rhs) {    return GetLayout() == rhs.GetLayout() &&            GetManacost() == rhs.GetManacost() &&            GetCmc() == rhs.GetCmc() &&            CompareStringList(GetColors(), rhs.GetColors()) &&            type == rhs.type &&            CompareStringList(GetSupertypes(), rhs.GetSupertypes()) &&            CompareStringList(GetTypes(), rhs.GetTypes()) &&            CompareStringList(GetSubtypes(), rhs.GetSubtypes()) &&            GetRarity() == rhs.GetRarity() &&            text == rhs.GetText() &&            GetFlavor() == rhs.GetFlavor() &&            GetArtist() == rhs.GetArtist() &&            GetNumber() == rhs.GetNumber() &&            GetPower() == rhs.GetPower() &&            GetToughness() == rhs.GetToughness() &&            GetLoyalty() == rhs.GetLoyalty() &&            GetMultiverseid() == rhs.GetMultiverseid() &&            CompareIntList(GetVariations(), rhs.GetVariations()) &&            GetImageName() == rhs.GetImageName() &&            GetWatermark() == rhs.GetWatermark() &&            GetBorder() == rhs.GetBorder() &&            IsTimeshifted() == rhs.IsTimeshifted() &&            GetHand() == rhs.GetHand() &&            GetLife() == rhs.GetLife() &&            IsReserved() == rhs.IsReserved() &&            GetReleasedate() == rhs.GetReleasedate() &&            IsStarter() == rhs.IsStarter() &&            CompareStringPairList(GetRulings(), rhs.GetRulings()) &&            CompareStringPairList(GetForeignNames(), rhs.GetForeignNames()) &&            GetOriginalText() == rhs.GetOriginalText() &&            GetOriginalType() == rhs.GetOriginalType() &&            CompareStringPairList(GetLegalities(), rhs.GetLegalities()) &&            GetEdition() == rhs.GetEdition();}
开发者ID:Nidhoegger,项目名称:ManageMagic,代码行数:35,


示例5: DoDrawBackground

// the event handler executed when the window background must be paintedvoid wxWindow::OnErase(wxEraseEvent& event){    if ( !m_renderer )    {        event.Skip();        return;    }    DoDrawBackground(*event.GetDC());#if wxUSE_SCROLLBAR    // if we have both scrollbars, we also have a square in the corner between    // them which we must paint    if ( m_scrollbarVert && m_scrollbarHorz )    {        wxSize size = GetSize();        wxRect rectClient = GetClientRect(),               rectBorder = m_renderer->GetBorderDimensions(GetBorder());        wxRect rectCorner;        rectCorner.x = rectClient.GetRight() + 1;        rectCorner.y = rectClient.GetBottom() + 1;        rectCorner.SetRight(size.x - rectBorder.width);        rectCorner.SetBottom(size.y - rectBorder.height);        if ( GetUpdateRegion().Contains(rectCorner) )        {            m_renderer->DrawScrollCorner(*event.GetDC(), rectCorner);        }    }#endif // wxUSE_SCROLLBAR}
开发者ID:iokto,项目名称:newton-dynamics,代码行数:34,


示例6: oursz

bool wxGenericCollapsiblePane::Layout(){#ifdef __WXMAC__    if (!m_pButton || !m_pPane || !m_sz)        return false;     // we need to complete the creation first!#else    if (!m_pButton || !m_pStaticLine || !m_pPane || !m_sz)        return false;     // we need to complete the creation first!#endif    wxSize oursz(GetSize());    // move & resize the button and the static line    m_sz->SetDimension(0, 0, oursz.GetWidth(), m_sz->GetMinSize().GetHeight());    m_sz->Layout();    if ( IsExpanded() )    {        // move & resize the container window        int yoffset = m_sz->GetSize().GetHeight() + GetBorder();        m_pPane->SetSize(0, yoffset,                        oursz.x, oursz.y - yoffset);        // this is very important to make the pane window layout show correctly        m_pPane->Layout();    }    return true;}
开发者ID:erwincoumans,项目名称:wxWidgets,代码行数:29,


示例7: DoSetClientSize

void wxWindow::DoSetClientSize(int width, int height){    // take into account the borders    wxRect rectBorder = m_renderer->GetBorderDimensions(GetBorder());    width += rectBorder.x;    height += rectBorder.y;    // and the scrollbars (as they may be offset into the border, use the    // scrollbar position, not size - this supposes that PositionScrollbars()    // had been called before)    wxSize size = GetSize();#if wxUSE_SCROLLBAR    if ( m_scrollbarVert )        width += size.x - m_scrollbarVert->GetPosition().x;#endif // wxUSE_SCROLLBAR    width += rectBorder.width;#if wxUSE_SCROLLBAR    if ( m_scrollbarHorz )        height += size.y - m_scrollbarHorz->GetPosition().y;#endif // wxUSE_SCROLLBAR    height += rectBorder.height;    wxWindowNative::DoSetClientSize(width, height);}
开发者ID:iokto,项目名称:newton-dynamics,代码行数:25,


示例8: InitializeCriticalSection

BOOL CRIFFChunkTreeDlg::OnInitDialog() {//	InitializeCriticalSection(&critical_section);	CResizeableDialog::OnInitDialog();	InitializeCriticalSection(&cs);	bChunkTree_stop = false;//	__int64		qwPos;//	LISTHEADER		lh;		SendDlgItemMessage(IDOK,WM_SETTEXT,NULL,(LPARAM)LoadString(STR_GEN_OK));	SendDlgItemMessage(IDCANCEL,WM_SETTEXT,NULL,(LPARAM)LoadString(STR_GEN_CANCEL));	SendDlgItemMessage(IDC_WAIT_FOR_COMPLETE_TREE, WM_SETTEXT, NULL,		(LPARAM)LoadString(STR_RIFFDLG_FULL));	DWORD dwID;	MAIN_THREAD_DATA_STRUCT* mtds = new MAIN_THREAD_DATA_STRUCT;	mtds->dlg = this;	mtds->source = source;	CreateThread(NULL, 1<<20, MainThread, mtds, NULL, &dwID);	AttachWindow(*GetDlgItem(IDOK), ATTB_RIGHT, *this, -12);	AttachWindow(*GetDlgItem(IDC_SAVE), ATTB_RIGHT, *GetDlgItem(IDOK));	AttachWindow(*GetDlgItem(IDC_SAVE), ATTB_TOP, *GetDlgItem(IDOK), ATTB_BOTTOM, 2);	AttachWindow(m_WaitButton, ATTB_TOP, *GetDlgItem(IDC_SAVE), ATTB_BOTTOM, 2);	AttachWindow(m_WaitButton, ATTB_RIGHT, *GetDlgItem(IDOK));	int border_x, border_y;	GetBorder(border_x, border_y);	AttachWindow(m_HexView, ATTB_BOTTOM, *this, -border_y);	AttachWindow(m_Tree, ATTB_LEFT, *this, 12);	AttachWindow(m_Tree, ATTB_BOTTOM, m_HexView, ATTB_TOP, -1);	AttachWindow(m_Tree, ATTB_TOP, *this, border_y + 12);	AttachWindow(m_Tree, ATTB_RIGHT, *GetDlgItem(IDOK), ATTB_LEFT, -12);	AttachWindow(m_HexView, ATTB_RIGHT, m_Tree);	AttachWindow(m_HexView, ATTB_LEFT, m_Tree);	AttachWindow(*GetDlgItem(IDOK), ATTB_TOP, m_Tree);	m_HexView.SetRange(16*256);	m_HexView.SetDataSource(source);	m_HexView.SetNewStartPos(0);	m_HexView.SetMode(HWLB_MODE_RIFF);/*	RECT r;	GetWindowRect(&r);	PostMessage(WM_SIZE, 0, (r.right-r.left) | ((r.bottom-r.top)<<16));*/	return TRUE;  // return TRUE unless you set the focus to a control	              // EXCEPTION: OCX-Eigenschaftenseiten sollten FALSE zurückgeben}
开发者ID:BrunoReX,项目名称:avimuxgui,代码行数:56,


示例9: MakeFBUmask

	void MakeFBUmask(IplImage *maskrgb, IplImage *&res, int unknownsize) {		vector<CvPoint> borders;		GetBorder(maskrgb, borders);		if (res)			cvReleaseImage(&res);		res = cvCloneImage(maskrgb);				for (int i = 0; i < (int)borders.size(); i++)			if (borders[i].x != -1 && borders[i].y != -1)				circleit(res, borders[i].x, borders[i].y, unknownsize, C_UNKNOW);	}
开发者ID:Joyhunter,项目名称:shadow_analysis,代码行数:11,


示例10: GetColor

void GUIControl::Draw(){	if(IsVisible())	{		if(GetTexture())		{				COLOR4 c = GetColor();			glColor4ub(c.r, c.g, c.b, c.a);			if(GetCurrentPattern() == 0)			{				DrawTexture(GetX(), GetY(),					0, 0,					GetWidth(), GetHeight(),					GetTexture(),					false, false, 100, 100);			}			else			{				DrawTexture(GetX(), GetY(),					GetCurrentPattern() * GetWidth(),					0,					GetCurrentPattern() * GetWidth() + GetWidth(),					GetHeight(),					GetTexture(),					false, false, 100, 100);			}		}		if(GetCaption() && GetCaptionFont())		{			COLOR4 c = GetCurrentCaptionColor();			glColor4ub(c.r, c.g, c.b, c.a);			PrintText(GetCaption(),				GetCaptionFont(),				GetX() + GetCaptionX(),				GetY() + GetCaptionY());		}		if(GetBorder())		{			if(GetBorderType() == btAlways)			{				Box(GetX(), GetY(), GetWidth(), GetHeight());			}			else if(GetBorderType() == btOnMouseMove)			{				if(_draw_border)					Box(GetX(), GetY(), GetWidth(), GetHeight());			}		}	}}
开发者ID:lightsgoout,项目名称:interview,代码行数:54,


示例11: GetBorder

void wxWindow::DoDrawBorder(wxDC& dc, const wxRect& rect){    // draw outline unless the update region is enitrely inside it in which    // case we don't need to do it#if 0 // doesn't seem to work, why?    if ( wxRegion(rect).Contains(GetUpdateRegion().GetBox()) != wxInRegion )#endif    {        m_renderer->DrawBorder(dc, GetBorder(), rect, GetStateFlags());    }}
开发者ID:iokto,项目名称:newton-dynamics,代码行数:11,


示例12: GetClientAreaOrigin

wxPoint wxWindow::GetClientAreaOrigin() const{    wxPoint pt = wxWindowBase::GetClientAreaOrigin();#if wxUSE_TWO_WINDOWS#else    if ( m_renderer )        pt += m_renderer->GetBorderDimensions(GetBorder()).GetPosition();#endif    return pt;}
开发者ID:iokto,项目名称:newton-dynamics,代码行数:12,


示例13: borderSquare

void Border::CreateBorder(){    const int CONST_SQUARE_SIDE = 12,              CONST_NUM_SQUARES = Game::GetFieldWidth()/CONST_SQUARE_SIDE,              CONST_POSITION_EXTENSION = 24;// see Game CONST_TOP_BAR_L variable    for(int i = 0; i < (CONST_NUM_SQUARES - 1); i++)    {        //top        sf::RectangleShape borderSquare(sf::Vector2f(11.0, 11.0));        borderSquare.setFillColor(sf::Color(102, 0, 0));//this is the brown color        borderSquare.setOrigin(borderSquare.getLocalBounds().left - 1.0, borderSquare.getLocalBounds().top - 1.0);        borderSquare.setPosition(i * 12, CONST_POSITION_EXTENSION);        GetBorder().push_back(borderSquare);        //right side        sf::RectangleShape borderSquare_2(sf::Vector2f(11.0, 11.0));        borderSquare_2.setFillColor(sf::Color(102, 0, 0));//this is the brown color        borderSquare_2.setOrigin(borderSquare_2.getLocalBounds().left - 1.0, borderSquare_2.getLocalBounds().top - 1.0);        borderSquare_2.setPosition((CONST_NUM_SQUARES - 1) * CONST_SQUARE_SIDE, i * CONST_SQUARE_SIDE + CONST_POSITION_EXTENSION);        GetBorder().push_back(borderSquare_2);        //bottom        sf::RectangleShape borderSquare_3(sf::Vector2f(11.0, 11.0));        borderSquare_3.setFillColor(sf::Color(102, 0, 0));//this is the brown color        borderSquare_3.setOrigin(borderSquare_3.getLocalBounds().left - 1.0, borderSquare_3.getLocalBounds().top - 1.0);        borderSquare_3.setPosition( (i + 1) * CONST_SQUARE_SIDE, (CONST_NUM_SQUARES - 1) * CONST_SQUARE_SIDE + CONST_POSITION_EXTENSION);        GetBorder().push_back(borderSquare_3);        //left side        sf::RectangleShape borderSquare_4(sf::Vector2f(11.0, 11.0));        borderSquare_4.setFillColor(sf::Color(102, 0, 0));//this is the brown color        borderSquare_4.setOrigin(borderSquare_4.getLocalBounds().left - 1.0, borderSquare_4.getLocalBounds().top - 1.0);        borderSquare_4.setPosition(0.0, (i + 1) * CONST_SQUARE_SIDE + CONST_POSITION_EXTENSION);        GetBorder().push_back(borderSquare_4);    }}
开发者ID:killerartist95,项目名称:Snake-Game,代码行数:40,


示例14: dc

wxSize wxStaticText::DoGetBestSize() const{    wxClientDC dc(const_cast<wxStaticText *>(this));    wxFont font(GetFont());    if (!font.Ok())        font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);    dc.SetFont(font);    wxCoord widthTextMax, heightTextTotal;    dc.GetMultiLineTextExtent(GetLabelText(), &widthTextMax, &heightTextTotal);#ifdef __WXWINCE__    if ( widthTextMax )        widthTextMax += 2;#endif // __WXWINCE__    // border takes extra space    //    // TODO: this is probably not wxStaticText-specific and should be moved    wxCoord border;    switch ( GetBorder() )    {        case wxBORDER_STATIC:        case wxBORDER_SIMPLE:            border = 1;            break;        case wxBORDER_SUNKEN:            border = 2;            break;        case wxBORDER_RAISED:        case wxBORDER_DOUBLE:            border = 3;            break;        default:            wxFAIL_MSG( _T("unknown border style") );            // fall through        case wxBORDER_NONE:            border = 0;    }    widthTextMax += 2*border;    heightTextTotal += 2*border;    wxSize best(widthTextMax, heightTextTotal);    CacheBestSize(best);    return best;}
开发者ID:jonntd,项目名称:dynamica,代码行数:52,


示例15: GetBorder

FVector2D SButton::ComputeDesiredSize(float LayoutScaleMultiplier) const{	// When there is no widget in the button, it sizes itself based on	// the border image specified by the style.	if (ChildSlot.GetWidget() == SNullWidget::NullWidget)	{		return GetBorder()->ImageSize;	}	else	{		return SBorder::ComputeDesiredSize(LayoutScaleMultiplier);	}}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:13,


示例16: DoGetClientSize

void wxWindow::DoGetClientSize(int *width, int *height) const{    // if it is a native window, we assume it handles the scrollbars itself    // too - and if it doesn't, there is not much we can do    if ( !m_renderer )    {        wxWindowNative::DoGetClientSize(width, height);        return;    }    int w, h;    wxWindowNative::DoGetClientSize(&w, &h);    // we assume that the scrollbars are positioned correctly (by a previous    // call to PositionScrollbars()) here    wxRect rectBorder;    if ( m_renderer )        rectBorder = m_renderer->GetBorderDimensions(GetBorder());    if ( width )    {#if wxUSE_SCROLLBAR        // in any case, take account of the scrollbar        if ( m_scrollbarVert )            w -= m_scrollbarVert->GetSize().x;#endif // wxUSE_SCROLLBAR        // account for the left and right borders        *width = w - rectBorder.x - rectBorder.width;        // we shouldn't return invalid width        if ( *width < 0 )            *width = 0;    }    if ( height )    {#if wxUSE_SCROLLBAR        if ( m_scrollbarHorz )            h -= m_scrollbarHorz->GetSize().y;#endif // wxUSE_SCROLLBAR        *height = h - rectBorder.y - rectBorder.height;        // we shouldn't return invalid height        if ( *height < 0 )            *height = 0;    }}
开发者ID:iokto,项目名称:newton-dynamics,代码行数:51,


示例17: GetSize

void wxWindow::PositionScrollbars(){#if wxUSE_SCROLLBAR    // do not use GetClientSize/Rect as it relies on the scrollbars being    // correctly positioned    wxSize size = GetSize();    wxBorder border = GetBorder();    wxRect rectBorder = m_renderer->GetBorderDimensions(border);    bool inside = m_renderer->AreScrollbarsInsideBorder();    int height = m_scrollbarHorz ? m_scrollbarHorz->GetSize().y : 0;    int width = m_scrollbarVert ? m_scrollbarVert->GetSize().x : 0;    wxRect rectBar;    if ( m_scrollbarVert )    {        rectBar.x = size.x - width;        if ( inside )           rectBar.x -= rectBorder.width;        rectBar.width = width;        rectBar.y = 0;        if ( inside )            rectBar.y += rectBorder.y;        rectBar.height = size.y - height;        if ( inside )            rectBar.height -= rectBorder.y + rectBorder.height;        m_scrollbarVert->SetSize(rectBar, wxSIZE_NO_ADJUSTMENTS);    }    if ( m_scrollbarHorz )    {        rectBar.y = size.y - height;        if ( inside )            rectBar.y -= rectBorder.height;        rectBar.height = height;        rectBar.x = 0;        if ( inside )            rectBar.x += rectBorder.x;        rectBar.width = size.x - width;        if ( inside )            rectBar.width -= rectBorder.x + rectBorder.width;        m_scrollbarHorz->SetSize(rectBar, wxSIZE_NO_ADJUSTMENTS);    }    RefreshScrollbars();#endif // wxUSE_SCROLLBAR}
开发者ID:iokto,项目名称:newton-dynamics,代码行数:50,


示例18: GetBorder

wxSize wxGenericCollapsiblePane::DoGetBestSize() const{    // NB: do not use GetSize() but rather GetMinSize()    wxSize sz = m_sz->GetMinSize();    // when expanded, we need more vertical space    if ( IsExpanded() )    {        sz.SetWidth(wxMax( sz.GetWidth(), m_pPane->GetBestSize().x ));        sz.SetHeight(sz.y + GetBorder() + m_pPane->GetBestSize().y);    }    return sz;}
开发者ID:erwincoumans,项目名称:wxWidgets,代码行数:14,


示例19: GetBorder

NS_IMETHODIMPnsIFrame::GetBorderAndPadding(nsMargin& aBorderAndPadding){  aBorderAndPadding.SizeTo(0, 0, 0, 0);  nsresult rv = GetBorder(aBorderAndPadding);  if (NS_FAILED(rv))    return rv;  nsMargin padding;  rv = GetPadding(padding);  if (NS_FAILED(rv))    return rv;  aBorderAndPadding += padding;  return rv;}
开发者ID:MozillaOnline,项目名称:gecko-dev,代码行数:17,


示例20: GetRenderer

void wxListBox::DoSetSize(int x, int y,                          int width, int height,                          int sizeFlags){    if ( GetWindowStyle() & wxLB_INT_HEIGHT )    {        // we must round up the height to an entire number of rows        // the client area must contain an int number of rows, so take borders        // into account        wxRect rectBorders = GetRenderer()->GetBorderDimensions(GetBorder());        wxCoord hBorders = rectBorders.y + rectBorders.height;        wxCoord hLine = GetLineHeight();        height = ((height - hBorders + hLine - 1) / hLine)*hLine + hBorders;    }    wxListBoxBase::DoSetSize(x, y, width, height, sizeFlags);}
开发者ID:project-renard-survey,项目名称:chandler,代码行数:19,


示例21: GetColor

void GUIVidget::Draw(){	if(IsVisible())	{		if(GetTexture())		{				COLOR4 c = GetColor();			glColor4ub(c.r, c.g, c.b, c.a);			DrawTexture(GetX(), GetY(),				0, 0, GetWidth(), GetHeight(),				GetTexture(), false, false,				100, 100);		}		if(GetBorder())		{			if(GetBorderType() == btAlways)			{				Box(GetX()-1, GetY()-1,	GetWidth()+1, GetHeight()+1);			}		}	}}
开发者ID:lightsgoout,项目名称:interview,代码行数:23,


示例22: XTPGetDispatch

LPDISPATCH CXTPChartRadarAreaSeriesStyle::OleGetBorder(){	return XTPGetDispatch(GetBorder());}
开发者ID:lai3d,项目名称:ThisIsASoftRenderer,代码行数:4,


示例23: switch

void Widget::BlockMove(Direction dir){    switch (dir) {    case UP:        if(IsCollide(block_pos.pos_x,block_pos.pos_y,UP))            break;        //逆时针旋转90度        BlockRotate(cur_block);        //防止旋转后bug,i和j从0到4重新设置方块        for(int i=0;i<4;i++)            for(int j=0;j<4;j++)                game_area[block_pos.pos_y+i][block_pos.pos_x+j]=cur_block[i][j];        //重新计算边界        GetBorder(cur_block,cur_border);        break;    case DOWN:        //方块到达边界则不再移动        if(block_pos.pos_y+cur_border.dbound==AREA_ROW-1)        {            ConvertStable(block_pos.pos_x,block_pos.pos_y);            ResetBlock();            break;        }        //碰撞检测,只计算上下左右边界,先尝试走一格,如果碰撞则稳定方块后跳出        if(IsCollide(block_pos.pos_x,block_pos.pos_y,DOWN))        {            //只有最终不能下落才转成稳定方块            ConvertStable(block_pos.pos_x,block_pos.pos_y);            ResetBlock();            break;        }        //恢复方块上场景        for(int j=cur_border.lbound;j<=cur_border.rbound;j++)            game_area[block_pos.pos_y][block_pos.pos_x+j]=0;        //没有碰撞则下落一格        block_pos.pos_y+=1;        //方块下降一格,拷贝到场景,注意左右边界        for(int i=0;i<4;i++) //必须是0到4            for(int j=cur_border.lbound;j<=cur_border.rbound;j++)                if(block_pos.pos_y+i<=AREA_ROW-1&&game_area[block_pos.pos_y+i][block_pos.pos_x+j]!=2) //注意场景数组不越界,而且不会擦出稳定的方块                    game_area[block_pos.pos_y+i][block_pos.pos_x+j]=cur_block[i][j];        break;    case LEFT:        //到左边界或者碰撞不再往左        if(block_pos.pos_x+cur_border.lbound==0||IsCollide(block_pos.pos_x,block_pos.pos_y,LEFT))            break;        //恢复方块右场景        for(int i=cur_border.ubound;i<=cur_border.dbound;i++)            game_area[block_pos.pos_y+i][block_pos.pos_x+3]=0;        block_pos.pos_x-=1;        //方块左移一格,拷贝到场景        for(int i=cur_border.ubound;i<=cur_border.dbound;i++)            for(int j=0;j<4;j++)                if(block_pos.pos_x+j>=0&&game_area[block_pos.pos_y+i][block_pos.pos_x+j]!=2) //注意场景数组不越界                    game_area[block_pos.pos_y+i][block_pos.pos_x+j]=cur_block[i][j];        break;    case RIGHT:        if(block_pos.pos_x+cur_border.rbound==AREA_COL-1||IsCollide(block_pos.pos_x,block_pos.pos_y,RIGHT))            break;        //恢复方块左场景        for(int i=cur_border.ubound;i<=cur_border.dbound;i++)            game_area[block_pos.pos_y+i][block_pos.pos_x]=0;        block_pos.pos_x+=1;        //方块右移一格,拷贝到场景        for(int i=cur_border.ubound;i<=cur_border.dbound;i++)            for(int j=0;j<4;j++)                if(block_pos.pos_x+j<=AREA_COL-1&&game_area[block_pos.pos_y+i][block_pos.pos_x+j]!=2) //注意场景数组不越界                    game_area[block_pos.pos_y+i][block_pos.pos_x+j]=cur_block[i][j];        break;    case SPACE: //一次到底        //一格一格下移,直到不能下移        while(block_pos.pos_y+cur_border.dbound<AREA_ROW-1&&!IsCollide(block_pos.pos_x,block_pos.pos_y,DOWN))        {            //恢复方块上场景            for(int j=cur_border.lbound;j<=cur_border.rbound;j++)                game_area[block_pos.pos_y][block_pos.pos_x+j]=0;            //没有碰撞则下落一格            block_pos.pos_y+=1;            //方块下降一格,拷贝到场景,注意左右边界            for(int i=0;i<4;i++) //必须是0到4                for(int j=cur_border.lbound;j<=cur_border.rbound;j++)                    if(block_pos.pos_y+i<=AREA_ROW-1&&game_area[block_pos.pos_y+i][block_pos.pos_x+j]!=2) //注意场景数组不越界,而且不会擦出稳定的方块                        game_area[block_pos.pos_y+i][block_pos.pos_x+j]=cur_block[i][j];        }        ConvertStable(block_pos.pos_x,block_pos.pos_y);        ResetBlock();        break;    default:        break;    }    //处理消行,整个场景上面的行依次下移    int i=AREA_ROW-1;    int line_count=0; //记消行数    while(i>=1)    {        bool is_line_full=true;        for(int j=0;j<AREA_COL;j++)            if(game_area[i][j]==0)            {                is_line_full=false;//.........这里部分代码省略.........
开发者ID:luspohie,项目名称:QtTetris,代码行数:101,


示例24: DrawBorder

void Border::DrawBorder(sf::RenderWindow& rwMainWindow){    for(int i = 0; i < GetBorder().size(); i++)        rwMainWindow.draw(m_vectBorder[i]);}
开发者ID:killerartist95,项目名称:Snake-Game,代码行数:5,


示例25: GetBorder

	void GetBorder(IplImage *mask, vector<CvPoint> &borders) {		GetBorder(mask, C_FG, borders);	}
开发者ID:Joyhunter,项目名称:shadow_analysis,代码行数:3,



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


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