OpenClonk
C4Rect Class Reference

#include <C4Rect.h>

Inheritance diagram for C4Rect:
[legend]

Public Member Functions

void Set (int32_t iX, int32_t iY, int32_t iWdt, int32_t iHgt)
 
void Default ()
 
bool Overlap (C4Rect &rTarget)
 
void Intersect (const C4Rect &r2)
 
void Add (const C4Rect &r2)
 
bool operator== (const C4Rect &r2) const
 
bool operator!= (const C4Rect &r2) const
 
bool Contains (int32_t iX, int32_t iY) const
 
bool Contains (int32_t iX, int32_t iY, int32_t iWdt, int32_t iHgt) const
 
bool Contains (const C4Rect &rect) const
 
bool IntersectsLine (int32_t iX, int32_t iY, int32_t iX2, int32_t iY2)
 
void Normalize ()
 
void Enlarge (int32_t iByX, int32_t iByY)
 
void Enlarge (int32_t iBy)
 
int32_t GetMiddleX () const
 
int32_t GetMiddleY () const
 
int32_t GetBottom () const
 
int32_t GetTop () const
 
int32_t GetLeft () const
 
int32_t GetRight () const
 
 C4Rect ()=default
 
 C4Rect (int32_t tx, int32_t ty, int32_t twdt, int32_t thgt)
 
 C4Rect (const FLOAT_RECT &rcfOuter)
 
void CompileFunc (StdCompiler *pComp)
 

Public Attributes

int32_t x = 0
 
int32_t y = 0
 
int32_t Wdt = 0
 
int32_t Hgt = 0
 

Detailed Description

Definition at line 27 of file C4Rect.h.

Constructor & Destructor Documentation

◆ C4Rect() [1/3]

C4Rect::C4Rect ( )
default

◆ C4Rect() [2/3]

C4Rect::C4Rect ( int32_t  tx,
int32_t  ty,
int32_t  twdt,
int32_t  thgt 
)
inline

Definition at line 64 of file C4Rect.h.

65  { x=tx; y=ty; Wdt=twdt; Hgt=thgt; }
int32_t y
Definition: C4Rect.h:30
int32_t Hgt
Definition: C4Rect.h:30
int32_t Wdt
Definition: C4Rect.h:30
int32_t x
Definition: C4Rect.h:30

References Hgt, Wdt, x, and y.

◆ C4Rect() [3/3]

C4Rect::C4Rect ( const FLOAT_RECT rcfOuter)
inline

Definition at line 66 of file C4Rect.h.

67  {
68  x=static_cast<int32_t>(rcfOuter.left); y=static_cast<int32_t>(rcfOuter.top);
69  Wdt=static_cast<int32_t>(ceilf(rcfOuter.right)-floorf(rcfOuter.left));
70  Hgt=static_cast<int32_t>(ceilf(rcfOuter.bottom)-floorf(rcfOuter.top));
71  }
float bottom
Definition: C4Rect.h:25
float top
Definition: C4Rect.h:25
float right
Definition: C4Rect.h:25
float left
Definition: C4Rect.h:25

References FLOAT_RECT::bottom, Hgt, FLOAT_RECT::left, FLOAT_RECT::right, FLOAT_RECT::top, Wdt, x, and y.

Member Function Documentation

◆ Add()

void C4Rect::Add ( const C4Rect r2)

Definition at line 144 of file C4Rect.cpp.

145 {
146  // Null? Don't do anything
147  if (!r2.Wdt || !r2.Hgt) return;
148  if (!Wdt || !Hgt)
149  {
150  *this = r2;
151  return;
152  }
153  // Expand bounds
154  if (r2.x < x)
155  if (r2.x + r2.Wdt > x + Wdt)
156  { x = r2.x; Wdt = r2.Wdt; }
157  else
158  { Wdt += (x - r2.x); x = r2.x; }
159  else if (r2.x + r2.Wdt > x + Wdt)
160  Wdt = r2.x + r2.Wdt - x;
161  if (r2.y < y)
162  if (r2.y + r2.Hgt > y + Hgt)
163  { y = r2.y; Hgt = r2.Hgt; }
164  else
165  { Hgt += (y - r2.y); y = r2.y; }
166  else if (r2.y + r2.Hgt > y + Hgt)
167  Hgt = r2.y + r2.Hgt - y;
168 }

References Hgt, Wdt, x, and y.

Referenced by C4FindObjectOnLine::C4FindObjectOnLine(), C4FindObjectOr::C4FindObjectOr(), and C4Landscape::DrawLine().

Here is the caller graph for this function:

◆ CompileFunc()

void C4Rect::CompileFunc ( StdCompiler pComp)

Definition at line 31 of file C4Rect.cpp.

32 {
33  pComp->Value(mkDefaultAdapt(x, 0)); pComp->Separator();
34  pComp->Value(mkDefaultAdapt(y, 0)); pComp->Separator();
35  pComp->Value(mkDefaultAdapt(Wdt, 0)); pComp->Separator();
36  pComp->Value(mkDefaultAdapt(Hgt, 0));
37 }
StdDefaultAdapt< T, D > mkDefaultAdapt(T &&rValue, const D &rDefault)
Definition: StdAdaptors.h:64
virtual bool Separator(Sep eSep=SEP_SEP)
Definition: StdCompiler.h:119
void Value(const T &rStruct)
Definition: StdCompiler.h:161

References Hgt, mkDefaultAdapt(), StdCompiler::Separator(), StdCompiler::Value(), Wdt, x, and y.

Referenced by C4TargetRect::CompileFunc().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Contains() [1/3]

bool C4Rect::Contains ( const C4Rect rect) const
inline

Definition at line 44 of file C4Rect.h.

45  { return Contains(rect.x, rect.y, rect.Wdt, rect.Hgt); }
bool Contains(int32_t iX, int32_t iY) const
Definition: C4Rect.h:40

References Contains(), Hgt, Wdt, x, and y.

Here is the call graph for this function:

◆ Contains() [2/3]

bool C4Rect::Contains ( int32_t  iX,
int32_t  iY 
) const
inline

Definition at line 40 of file C4Rect.h.

41  { return iX>=x && iX<x+Wdt && iY>=y && iY<y+Hgt; }

References Hgt, x, and y.

Referenced by C4FindObjectInRect::Check(), C4FindObjectAtPoint::Check(), Contains(), C4GUI::ContextMenu::CtxMouseInput(), C4PXSSystem::Draw(), IntersectsLine(), C4GUI::ListBox::MouseInput(), C4GUI::Screen::MouseInput(), C4MapScriptAlgoRect::operator()(), and C4LArea::Set().

Here is the caller graph for this function:

◆ Contains() [3/3]

bool C4Rect::Contains ( int32_t  iX,
int32_t  iY,
int32_t  iWdt,
int32_t  iHgt 
) const
inline

Definition at line 42 of file C4Rect.h.

43  { return iX>=x && iX+iWdt<x+Wdt && iY>=y && iY+iHgt<y+Hgt; }

References Hgt, x, and y.

◆ Default()

void C4Rect::Default ( )

Definition at line 26 of file C4Rect.cpp.

27 {
28  x=y=Wdt=Hgt=0;
29 }

References Hgt, Wdt, x, and y.

Referenced by C4ParticleDefCore::C4ParticleDefCore(), C4TargetRect::Default(), C4Object::Default(), and C4Def::DefaultDefCore().

Here is the caller graph for this function:

◆ Enlarge() [1/2]

void C4Rect::Enlarge ( int32_t  iBy)
inline

Definition at line 53 of file C4Rect.h.

54  { Enlarge(iBy, iBy); }
void Enlarge(int32_t iByX, int32_t iByY)
Definition: C4Rect.h:51

References Enlarge().

Here is the call graph for this function:

◆ Enlarge() [2/2]

void C4Rect::Enlarge ( int32_t  iByX,
int32_t  iByY 
)
inline

Definition at line 51 of file C4Rect.h.

52  { x -= iByX; y -= iByY; Wdt += 2*iByX; Hgt += 2*iByY; }

References Hgt, Wdt, x, and y.

Referenced by C4PXSSystem::Draw(), Enlarge(), and C4LandscapeRenderGL::GetAffectedRect().

Here is the caller graph for this function:

◆ GetBottom()

int32_t C4Rect::GetBottom ( ) const
inline

Definition at line 58 of file C4Rect.h.

58 { return y + Hgt; }

References Hgt, and y.

Referenced by C4FoWLightSection::Update().

Here is the caller graph for this function:

◆ GetLeft()

int32_t C4Rect::GetLeft ( ) const
inline

Definition at line 60 of file C4Rect.h.

60 { return x; }

References x.

◆ GetMiddleX()

int32_t C4Rect::GetMiddleX ( ) const
inline

Definition at line 56 of file C4Rect.h.

56 { return x+Wdt/2; }

References Wdt, and x.

Referenced by C4StartupScenSelDlg::C4StartupScenSelDlg(), C4GUI::ProgressBar::DrawElement(), C4GUI::ComponentAligner::GetCentered(), and C4GUI::TextWindow::TextWindow().

Here is the caller graph for this function:

◆ GetMiddleY()

int32_t C4Rect::GetMiddleY ( ) const
inline

Definition at line 57 of file C4Rect.h.

57 { return y + Hgt / 2; }

References Hgt, and y.

Referenced by C4StartupScenSelDlg::C4StartupScenSelDlg(), and C4GUI::ComponentAligner::GetCentered().

Here is the caller graph for this function:

◆ GetRight()

int32_t C4Rect::GetRight ( ) const
inline

Definition at line 61 of file C4Rect.h.

61 { return x + Wdt; }

References Wdt, and x.

◆ GetTop()

int32_t C4Rect::GetTop ( ) const
inline

Definition at line 59 of file C4Rect.h.

59 { return y; }

References y.

◆ Intersect()

void C4Rect::Intersect ( const C4Rect r2)

Definition at line 100 of file C4Rect.cpp.

101 {
102  // Narrow bounds
103  if (r2.x > x)
104  if (r2.x + r2.Wdt < x + Wdt)
105  { x = r2.x; Wdt = r2.Wdt; }
106  else
107  { Wdt -= (r2.x - x); x = r2.x; }
108  else if (r2.x + r2.Wdt < x + Wdt)
109  Wdt = r2.x + r2.Wdt - x;
110  if (r2.y > y)
111  if (r2.y + r2.Hgt < y + Hgt)
112  { y = r2.y; Hgt = r2.Hgt; }
113  else
114  { Hgt -= (r2.y - y); y = r2.y; }
115  else if (r2.y + r2.Hgt < y + Hgt)
116  Hgt = r2.y + r2.Hgt - y;
117  // Degenerated? Will happen when the two rects don't overlap
118  if (Wdt < 0) Wdt = 0;
119  if (Hgt < 0) Hgt = 0;
120 }

References Hgt, Wdt, x, and y.

Referenced by C4FindObjectAnd::C4FindObjectAnd(), C4Landscape::P::FinishChange(), FnParRect(), C4SolidMask::PutTemporary(), C4SolidMask::RemoveTemporary(), C4SolidMask::Repair(), C4LandscapeRenderGL::Update(), and C4Landscape::P::UpdateMatCnt().

Here is the caller graph for this function:

◆ IntersectsLine()

bool C4Rect::IntersectsLine ( int32_t  iX,
int32_t  iY,
int32_t  iX2,
int32_t  iY2 
)

Definition at line 122 of file C4Rect.cpp.

123 {
124  // Easy cases first
125  if (Contains(iX, iY)) return true;
126  if (Contains(iX2, iY2)) return true;
127  if (iX < x && iX2 < x) return false;
128  if (iY < y && iY2 < y) return false;
129  if (iX >= x+Wdt && iX2 >= x+Wdt) return false;
130  if (iY >= y+Hgt && iY2 >= y+Hgt) return false;
131  // check some special cases
132  if (iX == iX2 || iY == iY2) return true;
133  // Check intersection left/right
134  int32_t iXI, iYI;
135  iXI = (iX < x ? x : x+Wdt);
136  iYI = iY + (iY2 - iY) * (iXI - iX) / (iX2 - iX);
137  if (iYI >= y && iYI < y+Hgt) return true;
138  // Check intersection up/down
139  iYI = (iY < y ? y : y+Hgt);
140  iXI = iX + (iX2 - iX) * (iYI - iY) / (iY2 - iY);
141  return iXI >= x && iXI < x+Wdt;
142 }

References Contains(), Hgt, Wdt, x, and y.

Referenced by C4FindObjectOnLine::Check().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Normalize()

void C4Rect::Normalize ( )
inline

Definition at line 48 of file C4Rect.h.

49  { if (Wdt < 0) { x+=Wdt+1; Wdt=-Wdt; } if (Hgt < 0) { y+=Hgt+1; Hgt=-Hgt; } }

References Hgt, Wdt, x, and y.

◆ operator!=()

bool C4Rect::operator!= ( const C4Rect r2) const
inline

Definition at line 38 of file C4Rect.h.

38 { return 0 != ((x-r2.x) | (y-r2.y) | (Wdt-r2.Wdt) | (Hgt-r2.Hgt)); }

References Hgt, Wdt, x, and y.

◆ operator==()

bool C4Rect::operator== ( const C4Rect r2) const
inline

Definition at line 37 of file C4Rect.h.

37 { return !((x-r2.x) | (y-r2.y) | (Wdt-r2.Wdt) | (Hgt-r2.Hgt)); }

References Hgt, Wdt, x, and y.

◆ Overlap()

bool C4Rect::Overlap ( C4Rect rTarget)

Definition at line 91 of file C4Rect.cpp.

92 {
93  if (x+Wdt<=rTarget.x) return false;
94  if (x>=rTarget.x+rTarget.Wdt) return false;
95  if (y+Hgt<=rTarget.y) return false;
96  if (y>=rTarget.y+rTarget.Hgt) return false;
97  return true;
98 }

References Hgt, Wdt, x, and y.

Referenced by C4FindObjectAtRect::Check(), and C4Game::FindConstuctionSiteBlock().

Here is the caller graph for this function:

◆ Set()

void C4Rect::Set ( int32_t  iX,
int32_t  iY,
int32_t  iWdt,
int32_t  iHgt 
)

Definition at line 86 of file C4Rect.cpp.

87 {
88  x=iX; y=iY; Wdt=iWdt; Hgt=iHgt;
89 }

References Hgt, Wdt, x, and y.

Referenced by C4StartupModsListEntry::C4StartupModsListEntry(), C4StartupNetListEntry::C4StartupNetListEntry(), C4MapFolderData::Clear(), C4GUI::Element::Element(), C4ChatControl::ChatSheet::NickItem::NickItem(), C4TargetRect::Set(), and C4GUI::Window::UpdateOwnPos().

Here is the caller graph for this function:

Member Data Documentation

◆ Hgt

int32_t C4Rect::Hgt = 0

Definition at line 30 of file C4Rect.h.

Referenced by Add(), C4GUI::ListBox::AddElement(), C4Object::addtop(), C4Menu::AdjustPosition(), C4Object::At(), C4MapScriptLayer::Blit(), C4Viewport::BlitOutput(), C4GameOptionButtons::C4GameOptionButtons(), C4GameOverDlg::C4GameOverDlg(), C4LeagueSignupDialog::C4LeagueSignupDialog(), C4Rect(), C4SolidMask::C4SolidMask(), C4StartupMainDlg::C4StartupMainDlg(), C4StartupModsListEntry::C4StartupModsListEntry(), C4StartupNetListEntry::C4StartupNetListEntry(), C4StartupOptionsDlg::C4StartupOptionsDlg(), C4StartupPlrSelDlg::C4StartupPlrSelDlg(), C4StartupScenSelDlg::C4StartupScenSelDlg(), C4TexRef::C4TexRef(), C4GUI::ContextMenu::CheckOpenSubmenu(), C4Object::CheckSolidMaskRect(), C4TexRef::ClearRect(), C4TargetRect::ClipBy(), C4RectList::ClipByRect(), CompileFunc(), C4Shape::CompileFunc(), ConstructionCheck(), Contains(), C4GUI::ContextMenu::ContextMenu(), C4GUI::ListBox::ContractToElementHeight(), C4Game::CreateObjectConstruction(), C4GameObjects::CrossCheck(), C4MaterialMap::CrossMapMaterials(), Default(), C4FileSelDlg::DefaultListItem::DefaultListItem(), C4GUI::Element::DoContext(), C4GUI::Screen::DoContext(), C4ChatDlg::DoPlacement(), C4DefGraphics::Draw(), C4EditCursor::Draw(), C4SolidMask::Draw(), C4GUI::Window::Draw(), C4GUI::Dialog::Draw(), C4Viewport::Draw(), C4GraphicsOverlay::Draw(), C4GUI::FrameDecoration::Draw(), C4MouseControl::Draw(), C4Object::Draw(), C4GameMessage::Draw(), C4ScriptGuiWindow::Draw(), C4GUI::Element::Draw3DFrame(), C4GUI::Element::DrawBar(), C4ScriptGuiWindow::DrawChildren(), C4Landscape::DrawChunks(), C4GUI::WoodenLabel::DrawElement(), C4GUI::ProgressBar::DrawElement(), C4GUI::Picture::DrawElement(), C4GUI::OverlayPicture::DrawElement(), C4GUI::GroupBox::DrawElement(), C4GUI::Button::DrawElement(), C4GUI::IconButton::DrawElement(), C4GUI::ArrowButton::DrawElement(), C4GUI::FacetButton::DrawElement(), C4GUI::Edit::DrawElement(), C4GUI::CheckBox::DrawElement(), C4GUI::ListBox::DrawElement(), C4GUI::Tabular::DrawElement(), C4GUI::TextWindow::DrawElement(), C4GUI::ContextMenu::Entry::DrawElement(), C4GUI::ContextMenu::DrawElement(), C4GUI::ContextButton::DrawElement(), C4GUI::ComboBox::DrawElement(), C4GUI::Dialog::DrawElement(), C4MenuItem::DrawElement(), C4Menu::DrawElement(), C4StartupMainDlg::DrawElement(), C4StartupNetListEntry::DrawElement(), C4Chart::DrawElement(), C4Object::DrawFace(), C4ViewportList::DrawFullscreenBackground(), C4GUI::Element::DrawHBarByVGfx(), C4EditCursor::DrawObject(), C4Object::DrawSelectMark(), C4Object::DrawTopFace(), C4GUI::Element::DrawVBar(), C4GUI::TextWindow::ElementPosChanged(), C4GUI::TextWindow::ElementSizeChanged(), Enlarge(), C4GUI::ContextMenu::Entry::Entry(), C4GUI::ComponentAligner::ExpandBottom(), C4GUI::ComponentAligner::ExpandTop(), C4MapScriptLayer::Fill(), C4Game::FindConstuctionSiteBlock(), C4MapScriptLayer::FindPos(), C4Landscape::P::FinishChange(), C4GUI::FullscreenDialog::FullscreenDialog(), C4GUI::ComponentAligner::GetAll(), C4Object::GetArea(), C4Shape::GetBottom(), GetBottom(), C4GUI::ComponentAligner::GetCentered(), C4ScriptGuiWindow::GetClippingRect(), C4SolidMask::DensityProvider::GetDensity(), C4Object::GetEntranceArea(), C4FoWRegion::GetFragTransform(), C4FoWAmbient::GetFragTransform(), C4GUI::ComponentAligner::GetFromBottom(), C4GUI::ComponentAligner::GetFromLeft(), C4GUI::ComponentAligner::GetFromRight(), C4GUI::ComponentAligner::GetFromTop(), C4GUI::ComponentAligner::GetGridCell(), C4GUI::Element::GetHeight(), C4GUI::ComponentAligner::GetHeight(), C4GUI::ComponentAligner::GetInnerHeight(), C4GUI::WoodenLabel::GetLeftIndent(), C4GUI::Tabular::GetMarginBottom(), C4GUI::Tabular::GetMarginTop(), C4GUI::Dialog::GetMarginTop(), C4StartupPlrSelDlg::GetMarginTop(), C4StartupScenSelDlg::GetMarginTop(), C4GUI::ScrollBar::GetMaxScroll(), GetMiddleY(), C4Object::GetOCFForPos(), C4MapScriptLayer::GetPixCount(), C4GUI::GetScreenHgt(), C4Game::GetTextSpecImageAspect(), C4GUI::Element::GetToprightCornerRect(), C4Shape::GetVertexOutline(), C4GUI::ScrollBar::HasPin(), C4EditCursor::HasTransformMarker(), C4Object::Height(), C4GUI::DialogWindow::Init(), C4Command::InitEvaluation(), C4Menu::InitLocation(), C4Menu::InitSize(), C4GUI::InputDialog::InputDialog(), Intersect(), IntersectsLine(), C4FoWLightSection::Invalidate(), C4FindObjectInRect::IsImpossible(), C4GUI::ScrollWindow::IsRangeInView(), C4GUI::ScrollWindow::IsScrollingNecessary(), C4Command::JumpControl(), C4ParticleDef::Load(), C4StartupPlrSelDlg::PlayerListItem::Load(), C4TexRef::Lock(), C4TexRef::LockForUpdate(), C4GUI::ComponentAligner::LogIt(), C4Landscape::P::MapToLandscape(), C4GUI::MessageDialog::MessageDialog(), C4GUI::CheckBox::MouseInput(), C4ScriptGuiWindow::MouseInput(), C4MouseControl::Move(), Normalize(), ObjectComDrop(), C4ScriptGuiWindow::OnMouseIn(), C4StartupPlrSelDlg::OnNewBtn(), C4GUI::ScrollBar::OnPosChanged(), C4StartupPlrSelDlg::OnPropertyBtn(), C4Application::OnResolutionChanged(), operator!=(), ObjectAddWaypoint::operator()(), operator==(), Overlap(), C4GUI::PaintBox::PaintBox(), CStdGL::PerformMesh(), C4GUI::DialogWindow::PerformUpdate(), C4Object::Picture2Facet(), C4Game::PlaceAnimal(), C4Player::PlaceReadyBase(), C4Game::PreInit(), C4ScriptGuiWindow::ProcessMouseInput(), C4GUI::ProgressDialog::ProgressDialog(), C4Command::Put(), C4SolidMask::Put(), C4SolidMask::PutTemporary(), C4ViewportList::RecalculateViewports(), C4SolidMask::Remove(), C4SolidMask::RemoveTemporary(), C4FoWRegion::Render(), C4SolidMask::Repair(), C4Shape::Rotate(), C4GUI::ScrollWindow::ScrollBy(), C4GUI::ListBox::ScrollItemInView(), C4GUI::ScrollWindow::ScrollPages(), C4GUI::ScrollWindow::ScrollRangeInView(), C4GUI::ScrollWindow::ScrollToBottom(), C4TargetFacet::Set(), C4TargetRect::Set(), Set(), C4GUI::Dialog::SetClientSize(), C4GUI::Tabular::SetGfx(), C4GoalDisplay::SetGoals(), C4Object::SetOCF(), C4GUI::TextWindow::SetPicture(), C4TargetFacet::SetRect(), C4GUI::Label::SetText(), C4MouseControl::SetTooltipRectangle(), C4GUI::TextWindow::TextWindow(), C4Command::Throw(), C4TexRef::Unlock(), C4GUI::ScrollBar::Update(), C4GUI::ScrollWindow::Update(), C4FoWLightSection::Update(), C4LandscapeRenderGL::Update(), CStdGL::UpdateClipper(), C4StartupPlrSelDlg::PlayerListItem::UpdateCore(), C4MouseControl::UpdateCursorTarget(), C4GUI::ListBox::UpdateElementPositions(), C4Menu::UpdateElementPositions(), C4Object::UpdateFace(), C4GraphicsOverlay::UpdateFacet(), C4FoWAmbient::UpdateFromLandscape(), C4GUI::MultilineLabel::UpdateHeight(), C4ScriptGuiWindow::UpdateLayout(), C4ScriptGuiWindow::UpdateLayoutGrid(), C4ScriptGuiWindow::UpdateLayoutTightGrid(), C4ScriptGuiWindow::UpdateLayoutVertical(), C4Landscape::P::UpdateMatCnt(), C4Object::UpdateOCF(), C4Viewport::UpdateOutputSize(), C4GUI::Window::UpdateOwnPos(), C4Landscape::P::UpdatePixCnt(), C4Menu::UpdateScrollBar(), C4GUI::TextWindow::UpdateSize(), C4GUI::Dialog::UpdateSize(), and C4Object::VerticalBounds().

◆ Wdt

int32_t C4Rect::Wdt = 0

Definition at line 30 of file C4Rect.h.

Referenced by Add(), C4GUI::ListBox::AddElement(), C4Object::AssignRemoval(), C4Object::At(), C4MapScriptLayer::Blit(), C4Viewport::BlitOutput(), C4GameOptionButtons::C4GameOptionButtons(), C4LeagueSignupDialog::C4LeagueSignupDialog(), C4Rect(), C4SolidMask::C4SolidMask(), C4StartupMainDlg::C4StartupMainDlg(), C4StartupModsDlg::C4StartupModsDlg(), C4StartupModsListEntry::C4StartupModsListEntry(), C4StartupNetDlg::C4StartupNetDlg(), C4StartupNetListEntry::C4StartupNetListEntry(), C4StartupOptionsDlg::C4StartupOptionsDlg(), C4StartupPlrSelDlg::C4StartupPlrSelDlg(), C4StartupScenSelDlg::C4StartupScenSelDlg(), C4TexRef::C4TexRef(), C4GUI::ContextMenu::CheckOpenSubmenu(), C4Object::CheckSolidMaskRect(), C4TexRef::ClearRect(), C4TargetRect::ClipBy(), C4RectList::ClipByRect(), C4MaterialCore::CompileFunc(), CompileFunc(), C4Shape::CompileFunc(), ConstructionCheck(), Contains(), C4GUI::ContextMenu::ContextMenu(), C4Game::CreateObjectConstruction(), C4GameObjects::CrossCheck(), C4MaterialMap::CrossMapMaterials(), Default(), C4GUI::Dialog::Dialog(), C4GUI::Element::DoContext(), C4GUI::Screen::DoContext(), C4ChatDlg::DoPlacement(), C4ScoreboardDlg::DoPlacement(), C4DefGraphics::Draw(), C4EditCursor::Draw(), C4SolidMask::Draw(), C4GUI::Window::Draw(), C4GUI::Dialog::Draw(), C4Viewport::Draw(), C4GraphicsOverlay::Draw(), C4GUI::FrameDecoration::Draw(), C4MouseControl::Draw(), C4Object::Draw(), C4GameMessage::Draw(), C4ScriptGuiWindow::Draw(), C4GUI::Element::Draw3DFrame(), C4GUI::Element::DrawBar(), C4ScriptGuiWindow::DrawChildren(), C4Landscape::DrawChunks(), C4GUI::WoodenLabel::DrawElement(), C4GUI::ProgressBar::DrawElement(), C4GUI::HorizontalLine::DrawElement(), C4GUI::Picture::DrawElement(), C4GUI::OverlayPicture::DrawElement(), C4GUI::GroupBox::DrawElement(), C4GUI::Button::DrawElement(), C4GUI::IconButton::DrawElement(), C4GUI::ArrowButton::DrawElement(), C4GUI::Edit::DrawElement(), C4GUI::ListBox::DrawElement(), C4GUI::Tabular::DrawElement(), C4GUI::TextWindow::DrawElement(), C4GUI::ContextMenu::Entry::DrawElement(), C4GUI::ContextMenu::DrawElement(), C4GUI::ContextButton::DrawElement(), C4GUI::ComboBox::DrawElement(), C4GUI::Dialog::DrawElement(), C4MenuItem::DrawElement(), C4Menu::DrawElement(), C4StartupMainDlg::DrawElement(), C4StartupNetListEntry::DrawElement(), C4Chart::DrawElement(), C4Object::DrawFace(), C4ViewportList::DrawFullscreenBackground(), C4GUI::Element::DrawHBarByVGfx(), C4EditCursor::DrawObject(), C4Object::DrawSelectMark(), C4Object::DrawTopFace(), Enlarge(), C4GUI::ContextMenu::Entry::Entry(), C4Object::ExecMovement(), C4Command::Exit(), C4GUI::ComponentAligner::ExpandLeft(), C4GUI::ComponentAligner::ExpandRight(), C4MapScriptLayer::Fill(), C4Game::FindConstuctionSiteBlock(), C4MapScriptLayer::FindPos(), C4Landscape::P::FinishChange(), C4GUI::FullscreenDialog::FullscreenDialog(), C4GUI::ComponentAligner::GetAll(), C4Object::GetArea(), C4GUI::ComponentAligner::GetCentered(), C4ScriptGuiWindow::GetClippingRect(), C4SolidMask::DensityProvider::GetDensity(), C4Object::GetEntranceArea(), C4FoWRegion::GetFragTransform(), C4FoWAmbient::GetFragTransform(), C4GUI::ComponentAligner::GetFromBottom(), C4GUI::ComponentAligner::GetFromLeft(), C4GUI::ComponentAligner::GetFromRight(), C4GUI::ComponentAligner::GetFromTop(), C4GUI::ComponentAligner::GetGridCell(), C4GUI::ComponentAligner::GetInnerWidth(), C4GUI::ListBox::GetItemWidth(), C4GUI::Tabular::GetMarginLeft(), C4GUI::Tabular::GetMarginRight(), C4GUI::ScrollBar::GetMaxScroll(), GetMiddleX(), C4Object::GetOCFForPos(), C4MapScriptLayer::GetPixCount(), GetRight(), C4GUI::GetScreenWdt(), C4Game::GetTextSpecImageAspect(), C4GUI::Element::GetToprightCornerRect(), C4Shape::GetVertexOutline(), C4GUI::Element::GetWidth(), C4GUI::ComponentAligner::GetWidth(), C4GUI::ScrollBar::HasPin(), C4EditCursor::HasTransformMarker(), C4GUI::DialogWindow::Init(), C4Menu::InitLocation(), C4GUI::InputDialog::InputDialog(), C4GUI::ListBox::InsertElement(), Intersect(), IntersectsLine(), C4FoWLightSection::Invalidate(), C4FindObjectInRect::IsImpossible(), C4ParticleDef::Load(), C4TexRef::Lock(), C4TexRef::LockForUpdate(), C4GUI::ComponentAligner::LogIt(), C4GameLobby::MainDlg::MainDlg(), C4Landscape::P::MapToLandscape(), C4GUI::MessageDialog::MessageDialog(), C4GUI::Tabular::MouseInput(), C4ScriptGuiWindow::MouseInput(), C4MouseControl::Move(), C4Command::MoveTo(), Normalize(), ObjectComDrop(), C4ScriptGuiWindow::OnMouseIn(), C4StartupPlrSelDlg::OnNewBtn(), C4StartupPlrSelDlg::OnPropertyBtn(), C4Application::OnResolutionChanged(), operator!=(), ObjectAddWaypoint::operator()(), operator==(), Overlap(), C4GUI::PaintBox::PaintBox(), CStdGL::PerformMesh(), C4GUI::DialogWindow::PerformUpdate(), C4Object::Picture2Facet(), C4Game::PlaceAnimal(), C4Player::PlaceReadyBase(), C4Player::PlaceReadyCrew(), C4Player::PlaceReadyMaterial(), C4Player::PlaceReadyVehic(), C4Game::PreInit(), C4ScriptGuiWindow::ProcessMouseInput(), C4Command::Put(), C4SolidMask::Put(), C4SolidMask::PutTemporary(), C4ViewportList::RecalculateViewports(), C4SolidMask::Remove(), C4SolidMask::RemoveTemporary(), C4FoWRegion::Render(), C4SolidMask::Repair(), C4Shape::Rotate(), C4StartupScenSelDlg::ScenListItem::ScenListItem(), C4GUI::ScrollWindow::ScrollWindow(), C4TargetFacet::Set(), C4TargetRect::Set(), Set(), C4GUI::Dialog::SetClientSize(), C4GUI::Tabular::SetGfx(), C4GoalDisplay::SetGoals(), C4Object::SetOCF(), C4TargetFacet::SetRect(), C4GUI::Label::SetText(), C4GUI::Dialog::SetTitle(), C4MouseControl::SetTooltipRectangle(), C4GUI::Label::SetX0(), C4Object::SideBounds(), C4GUI::TextWindow::TextWindow(), C4TexRef::Unlock(), C4GUI::ScrollWindow::Update(), C4FoWLightSection::Update(), C4LandscapeRenderGL::Update(), CStdGL::UpdateClipper(), C4GUI::ListBox::UpdateColumnCount(), C4MouseControl::UpdateCursorTarget(), C4GUI::ListBox::UpdateElementPosition(), C4GUI::ListBox::UpdateElementPositions(), C4Object::UpdateFace(), C4GraphicsOverlay::UpdateFacet(), C4FoWAmbient::UpdateFromLandscape(), C4ScriptGuiWindow::UpdateLayout(), C4ScriptGuiWindow::UpdateLayoutGrid(), C4ScriptGuiWindow::UpdateLayoutTightGrid(), C4Landscape::P::UpdateMatCnt(), C4Object::UpdateOCF(), C4Viewport::UpdateOutputSize(), C4GUI::Label::UpdateOwnPos(), C4GUI::Window::UpdateOwnPos(), C4GUI::ScrollWindow::UpdateOwnPos(), C4Landscape::P::UpdatePixCnt(), C4GUI::MultilineLabel::UpdateSize(), C4GUI::TextWindow::UpdateSize(), C4GUI::Dialog::UpdateSize(), C4Object::UpdateSolidMask(), and C4Object::Width().

◆ x

int32_t C4Rect::x = 0

Definition at line 30 of file C4Rect.h.

Referenced by Add(), C4GUI::ListBox::AddElement(), C4GUI::Window::ApplyElementOffset(), C4GUI::Dialog::ApplyElementOffset(), C4GUI::Window::ApplyInvElementOffset(), C4GUI::Dialog::ApplyInvElementOffset(), C4MapScriptLayer::Blit(), C4Viewport::BlitOutput(), C4LeagueSignupDialog::C4LeagueSignupDialog(), C4Rect(), C4StartupModsListEntry::C4StartupModsListEntry(), C4StartupNetListEntry::C4StartupNetListEntry(), C4StartupScenSelDlg::C4StartupScenSelDlg(), C4TexRef::C4TexRef(), C4FindObjectAtPoint::Check(), C4FindObjectAtRect::Check(), C4GUI::ContextMenu::CheckOpenSubmenu(), C4Shape::CheckScaleToWalk(), C4Object::CheckSolidMaskRect(), C4TexRef::ClearRect(), C4GUI::Element::ClientPos2ScreenPos(), C4TargetRect::ClipBy(), C4RectList::ClipByRect(), CompileFunc(), C4Shape::CompileFunc(), C4GUI::ComponentAligner::ComponentAligner(), C4Shape::ContactCheck(), Contains(), C4MapFolderData::CreateGUIElements(), C4GameObjects::CrossCheck(), C4GUI::ContextMenu::CtxMouseInput(), Default(), C4GUI::Element::DoDragging(), C4ChatDlg::DoPlacement(), C4ScoreboardDlg::DoPlacement(), C4DefGraphics::Draw(), C4EditCursor::Draw(), C4SolidMask::Draw(), C4GUI::Window::Draw(), C4GUI::Dialog::Draw(), C4Viewport::Draw(), C4GraphicsOverlay::Draw(), C4GUI::FrameDecoration::Draw(), C4GameMessage::Draw(), C4ScriptGuiWindow::Draw(), C4LandscapeRenderGL::Draw(), C4GUI::Element::Draw3DFrame(), C4GUI::Element::DrawBar(), C4ScriptGuiWindow::DrawChildren(), C4Landscape::DrawChunks(), C4GUI::WoodenLabel::DrawElement(), C4GUI::MultilineLabel::DrawElement(), C4GUI::ProgressBar::DrawElement(), C4GUI::HorizontalLine::DrawElement(), C4GUI::Picture::DrawElement(), C4GUI::OverlayPicture::DrawElement(), C4GUI::ScrollBar::DrawElement(), C4GUI::GroupBox::DrawElement(), C4GUI::PaintBox::DrawElement(), C4GUI::Button::DrawElement(), C4GUI::IconButton::DrawElement(), C4GUI::ArrowButton::DrawElement(), C4GUI::Edit::DrawElement(), C4GUI::CheckBox::DrawElement(), C4GUI::ListBox::DrawElement(), C4GUI::Tabular::DrawElement(), C4GUI::TextWindow::DrawElement(), C4GUI::ContextMenu::Entry::DrawElement(), C4GUI::ContextMenu::DrawElement(), C4GUI::ContextButton::DrawElement(), C4GUI::ComboBox::DrawElement(), C4GUI::Dialog::DrawElement(), C4MenuItem::DrawElement(), C4Menu::DrawElement(), C4ScoreboardDlg::DrawElement(), C4StartupNetListEntry::DrawElement(), C4StartupPlrPropertiesDlg::DrawElement(), C4Chart::DrawElement(), C4ViewportList::DrawFullscreenBackground(), C4GUI::Element::DrawHBarByVGfx(), C4GUI::Element::DrawHVBar(), C4EditCursor::DrawObject(), C4Object::DrawTopFace(), Enlarge(), C4GUI::ComponentAligner::ExpandLeft(), C4MapScriptLayer::Fill(), C4Game::FindConstuctionSiteBlock(), C4MapScriptLayer::FindPos(), C4GUI::ComponentAligner::GetAll(), C4GUI::ComponentAligner::GetCentered(), C4ScriptGuiWindow::GetClippingRect(), C4GUI::Element::GetContainedClientRect(), C4SolidMask::DensityProvider::GetDensity(), C4Object::GetEntranceArea(), C4FoWRegion::GetFragTransform(), C4FoWAmbient::GetFragTransform(), C4GUI::ComponentAligner::GetFromBottom(), C4GUI::ComponentAligner::GetFromLeft(), C4GUI::ComponentAligner::GetFromRight(), C4GUI::ComponentAligner::GetFromTop(), C4GUI::ComponentAligner::GetGridCell(), GetLeft(), GetMiddleX(), C4Object::GetOCFForPos(), C4MapScriptLayer::GetPixCount(), GetRight(), C4GUI::Element::GetToprightCornerRect(), C4Shape::GetVertexOutline(), C4Shape::GetX(), C4Menu::InitLocation(), C4Menu::InitSize(), C4GUI::InputDialog::InputDialog(), C4GUI::ListBox::InsertElement(), Intersect(), IntersectsLine(), C4Object::Left(), C4ParticleDef::Load(), C4TexRef::Lock(), C4TexRef::LockForUpdate(), C4GUI::ComponentAligner::LogIt(), C4Landscape::P::MapToLandscape(), C4GUI::MessageDialog::MessageDialog(), C4GUI::Window::MouseInput(), C4GUI::ContextMenu::MouseInput(), C4ScriptGuiWindow::MouseInput(), C4GUI::Screen::MouseInput(), C4MouseControl::Move(), Normalize(), ObjectComDrop(), C4ScriptGuiWindow::OnMouseIn(), C4GUI::ContextMenu::Open(), operator!=(), operator==(), Overlap(), CStdGL::PerformMesh(), C4Object::Picture2Facet(), C4ScriptGuiWindow::ProcessMouseInput(), C4Command::Put(), C4SolidMask::Put(), C4SolidMask::PutTemporary(), C4ViewportList::RecalculateViewports(), C4SolidMask::Remove(), C4SolidMask::RemoveTemporary(), C4FoWRegion::Render(), C4SolidMask::Repair(), C4Shape::Rotate(), C4StartupScenSelDlg::ScenListItem::ScenListItem(), C4GUI::Element::ScreenPos2ClientPos(), C4GUI::ScrollWindow::ScrollWindow(), C4TargetFacet::Set(), C4TargetRect::Set(), Set(), C4GUI::Dialog::SetClientSize(), C4GUI::Tabular::SetGfx(), C4TexRef::SetPix(), C4GUI::Window::SetPos(), C4TargetFacet::SetRect(), C4MouseControl::SetTooltipRectangle(), C4GUI::Label::SetX0(), C4GUI::Screen::ShowDialog(), C4Shape::Stretch(), C4GUI::TextWindow::TextWindow(), C4TexRef::Unlock(), C4GUI::ScrollWindow::Update(), C4ScoreboardDlg::Update(), C4FoWLightSection::Update(), C4LandscapeRenderGL::Update(), CStdGL::UpdateClipper(), C4MouseControl::UpdateCursorTarget(), C4GUI::ListBox::UpdateElementPosition(), C4GUI::ListBox::UpdateElementPositions(), C4Menu::UpdateElementPositions(), C4Object::UpdateFace(), C4GraphicsOverlay::UpdateFacet(), C4FoWAmbient::UpdateFromLandscape(), C4ScriptGuiWindow::UpdateLayout(), C4ScriptGuiWindow::UpdateLayoutGrid(), C4ScriptGuiWindow::UpdateLayoutTightGrid(), C4Landscape::P::UpdateMatCnt(), C4Viewport::UpdateOutputSize(), C4GUI::Label::UpdateOwnPos(), C4GUI::Window::UpdateOwnPos(), C4GUI::ScrollWindow::UpdateOwnPos(), C4Landscape::P::UpdatePixCnt(), C4GUI::Dialog::UpdatePos(), and C4GUI::TextWindow::UpdateSize().

◆ y

int32_t C4Rect::y = 0

Definition at line 30 of file C4Rect.h.

Referenced by Add(), C4GUI::ListBox::AddElement(), C4Menu::AdjustPosition(), C4GUI::Window::ApplyElementOffset(), C4GUI::Dialog::ApplyElementOffset(), C4GUI::Window::ApplyInvElementOffset(), C4GUI::Dialog::ApplyInvElementOffset(), C4MapScriptLayer::Blit(), C4Viewport::BlitOutput(), C4Rect(), C4StartupModsListEntry::C4StartupModsListEntry(), C4StartupNetListEntry::C4StartupNetListEntry(), C4StartupScenSelDlg::C4StartupScenSelDlg(), C4TexRef::C4TexRef(), C4FindObjectAtPoint::Check(), C4FindObjectAtRect::Check(), C4GUI::ContextMenu::CheckOpenSubmenu(), C4Shape::CheckScaleToWalk(), C4Object::CheckSolidMaskRect(), C4TexRef::ClearRect(), C4GUI::Element::ClientPos2ScreenPos(), C4TargetRect::ClipBy(), C4RectList::ClipByRect(), CompileFunc(), C4GUI::ComponentAligner::ComponentAligner(), C4Shape::ContactCheck(), Contains(), C4MapFolderData::CreateGUIElements(), C4GameObjects::CrossCheck(), C4MaterialMap::CrossMapMaterials(), C4GUI::ContextMenu::CtxMouseInput(), Default(), C4GUI::Element::DoDragging(), C4ChatDlg::DoPlacement(), C4ScoreboardDlg::DoPlacement(), C4DefGraphics::Draw(), C4EditCursor::Draw(), C4SolidMask::Draw(), C4GUI::Window::Draw(), C4GUI::Dialog::Draw(), C4Viewport::Draw(), C4GraphicsOverlay::Draw(), C4GUI::FrameDecoration::Draw(), C4GameMessage::Draw(), C4ScriptGuiWindow::Draw(), C4LandscapeRenderGL::Draw(), C4GUI::Element::Draw3DFrame(), C4GUI::Element::DrawBar(), C4ScriptGuiWindow::DrawChildren(), C4Landscape::DrawChunks(), C4GUI::Label::DrawElement(), C4GUI::WoodenLabel::DrawElement(), C4GUI::MultilineLabel::DrawElement(), C4GUI::ProgressBar::DrawElement(), C4GUI::HorizontalLine::DrawElement(), C4GUI::Picture::DrawElement(), C4GUI::OverlayPicture::DrawElement(), C4GUI::ScrollBar::DrawElement(), C4GUI::GroupBox::DrawElement(), C4GUI::PaintBox::DrawElement(), C4GUI::Button::DrawElement(), C4GUI::IconButton::DrawElement(), C4GUI::ArrowButton::DrawElement(), C4GUI::Edit::DrawElement(), C4GUI::CheckBox::DrawElement(), C4GUI::ListBox::DrawElement(), C4GUI::Tabular::DrawElement(), C4GUI::TextWindow::DrawElement(), C4GUI::ContextMenu::Entry::DrawElement(), C4GUI::ContextMenu::DrawElement(), C4GUI::ContextButton::DrawElement(), C4GUI::ComboBox::DrawElement(), C4GUI::Dialog::DrawElement(), C4MenuItem::DrawElement(), C4Menu::DrawElement(), C4ScoreboardDlg::DrawElement(), C4StartupNetListEntry::DrawElement(), C4StartupPlrPropertiesDlg::DrawElement(), C4Chart::DrawElement(), C4ViewportList::DrawFullscreenBackground(), C4GUI::Element::DrawHBarByVGfx(), C4GUI::Element::DrawHVBar(), C4EditCursor::DrawObject(), C4Object::DrawTopFace(), C4GUI::TextWindow::ElementPosChanged(), C4GUI::TextWindow::ElementSizeChanged(), Enlarge(), C4Command::Exit(), C4GUI::ComponentAligner::ExpandTop(), C4MapScriptLayer::Fill(), C4Game::FindConstuctionSiteBlock(), C4MapScriptLayer::FindPos(), C4GUI::ComponentAligner::GetAll(), C4Shape::GetBottom(), GetBottom(), C4GUI::ComponentAligner::GetCentered(), C4ScriptGuiWindow::GetClippingRect(), C4GUI::Element::GetContainedClientRect(), C4SolidMask::DensityProvider::GetDensity(), C4Object::GetEntranceArea(), C4FoWRegion::GetFragTransform(), C4FoWAmbient::GetFragTransform(), C4GUI::ComponentAligner::GetFromBottom(), C4GUI::ComponentAligner::GetFromLeft(), C4GUI::ComponentAligner::GetFromRight(), C4GUI::ComponentAligner::GetFromTop(), C4GUI::ComponentAligner::GetGridCell(), GetMiddleY(), C4Object::GetOCFForPos(), C4MapScriptLayer::GetPixCount(), GetTop(), C4GUI::Element::GetToprightCornerRect(), C4Shape::GetVertexOutline(), C4Shape::GetY(), C4EditCursor::HasTransformMarker(), C4Menu::InitLocation(), C4Menu::InitSize(), Intersect(), IntersectsLine(), C4FoWLightSection::Invalidate(), C4Shape::Jolt(), C4GUI::Label::Label(), C4ParticleDef::Load(), C4TexRef::Lock(), C4TexRef::LockForUpdate(), C4GUI::ComponentAligner::LogIt(), C4Landscape::P::MapToLandscape(), C4GUI::Window::MouseInput(), C4GUI::ContextMenu::MouseInput(), C4ScriptGuiWindow::MouseInput(), C4GUI::Screen::MouseInput(), C4MouseControl::Move(), Normalize(), ObjectActionThrow(), ObjectComDrop(), C4ScriptGuiWindow::OnMouseIn(), C4GUI::ContextMenu::Open(), operator!=(), operator==(), Overlap(), CStdGL::PerformMesh(), C4Object::Picture2Facet(), C4ScriptGuiWindow::ProcessMouseInput(), C4Command::Put(), C4SolidMask::Put(), C4SolidMask::PutTemporary(), C4ViewportList::RecalculateViewports(), C4SolidMask::Remove(), C4SolidMask::RemoveTemporary(), C4FoWRegion::Render(), C4SolidMask::Repair(), C4Shape::Rotate(), C4GUI::Element::ScreenPos2ClientPos(), C4GUI::ListBox::ScrollItemInView(), C4GUI::ScrollWindow::ScrollWindow(), C4TargetFacet::Set(), C4TargetRect::Set(), Set(), C4GUI::Dialog::SetClientSize(), C4GUI::Tabular::SetGfx(), C4GUI::TextWindow::SetPicture(), C4TexRef::SetPix(), C4GUI::Window::SetPos(), C4TargetFacet::SetRect(), C4GUI::ScrollWindow::SetScroll(), C4MouseControl::SetTooltipRectangle(), C4GUI::Screen::ShowDialog(), C4GUI::TextWindow::TextWindow(), C4Object::Top(), C4TexRef::Unlock(), C4GUI::ScrollWindow::Update(), C4ScoreboardDlg::Update(), C4FoWLightSection::Update(), C4LandscapeRenderGL::Update(), CStdGL::UpdateClipper(), C4MouseControl::UpdateCursorTarget(), C4GUI::ListBox::UpdateElementPositions(), C4Menu::UpdateElementPositions(), C4Object::UpdateFace(), C4GraphicsOverlay::UpdateFacet(), C4FoWAmbient::UpdateFromLandscape(), C4ScriptGuiWindow::UpdateLayout(), C4ScriptGuiWindow::UpdateLayoutGrid(), C4ScriptGuiWindow::UpdateLayoutTightGrid(), C4ScriptGuiWindow::UpdateLayoutVertical(), C4Landscape::P::UpdateMatCnt(), C4Viewport::UpdateOutputSize(), C4GUI::Window::UpdateOwnPos(), C4GUI::ScrollWindow::UpdateOwnPos(), C4Landscape::P::UpdatePixCnt(), C4GUI::Dialog::UpdatePos(), C4Menu::UpdateScrollBar(), and C4GUI::TextWindow::UpdateSize().


The documentation for this class was generated from the following files: