OpenClonk
C4TargetFacet Class Reference

#include <C4Facet.h>

Inheritance diagram for C4TargetFacet:
[legend]
Collaboration diagram for C4TargetFacet:
[legend]

Public Member Functions

 C4TargetFacet ()
 
 ~C4TargetFacet ()=default
 
void Default ()
 
void Clear ()
 
void Set (const C4Facet &cpy)
 
void Set (const C4TargetFacet &cpy)
 
void Set (class C4Surface *nsfc, float nx, float ny, float nwdt, float nhgt, float ntx=0, float nty=0, float Zoom=1)
 
void Set (class C4Surface *nsfc, const C4Rect &r, float ntx=0, float nty=0, float Zoom=1)
 
void Set (class C4Surface *nsfc, float nx, float ny, float nwdt, float nhgt, float ntx, float nty, float Zoom, float prx, float pry)
 
C4TargetFacetoperator= (const C4Facet &rhs)
 
void SetRect (C4TargetRect &rSrc)
 
void Set (C4Surface &rSfc)
 
void Set (C4Surface *nsfc, float nx, float ny, float nwdt, float nhgt)
 
void Expand (int32_t iLeft=0, int32_t iRight=0, int32_t iTop=0, int32_t iBottom=0)
 
void DrawEnergyLevelEx (int32_t iLevel, int32_t iRange, const C4Facet &gfx, int32_t bar_idx)
 
void DrawX (C4Surface *sfcTarget, float iX, float iY, float iWdt, float iHgt, int32_t iPhaseX=0, int32_t iPhaseY=0) const
 
void DrawXFloat (C4Surface *sfcTarget, float fX, float fY, float fWdt, float fHgt) const
 
void DrawValue (C4Facet &cgo, int32_t iValue, int32_t iPhaseX=0, int32_t iPhaseY=0, int32_t iAlign=C4FCT_Center)
 
void DrawValue2 (C4Facet &cgo, int32_t iValue1, int32_t iValue2, int32_t iPhaseX=0, int32_t iPhaseY=0, int32_t iAlign=C4FCT_Center, int32_t *piUsedWidth=nullptr)
 
void Draw (C4Facet &cgo, bool fAspect=true, int32_t iPhaseX=0, int32_t iPhaseY=0, bool fTransparent=true)
 
void Draw (C4Surface *sfcTarget, float iX, float iY, int32_t iPhaseX=0, int32_t iPhaseY=0)
 
void DrawFullScreen (C4Facet &cgo)
 
void DrawT (C4Surface *sfcTarget, float iX, float iY, int32_t iPhaseX, int32_t iPhaseY, C4DrawTransform *pTransform)
 
void DrawT (C4Facet &cgo, bool fAspect, int32_t iPhaseX, int32_t iPhaseY, C4DrawTransform *pTransform)
 
void DrawTUnscaled (C4Surface *sfcTarget, float iX, float iY, int32_t iPhaseX, int32_t iPhaseY, C4DrawTransform *pTransform)
 
void DrawTUnscaled (C4Facet &cgo, bool fAspect, int32_t iPhaseX, int32_t iPhaseY, C4DrawTransform *pTransform)
 
void DrawXT (C4Surface *sfcTarget, float iX, float iY, int32_t iWdt, int32_t iHgt, int32_t iPhaseX, int32_t iPhaseY, C4DrawTransform *pTransform)
 
void DrawClr (C4Facet &cgo, bool fAspect=true, DWORD dwClr=0)
 
void DrawXClr (C4Surface *sfcTarget, int32_t iX, int32_t iY, int32_t iWdt, int32_t iHgt, DWORD dwClr)
 
void DrawValue2Clr (C4Facet &cgo, int32_t iValue1, int32_t iValue2, DWORD dwClr)
 
void DrawXR (C4Surface *sfcTarget, int32_t iX, int32_t iY, int32_t iWdt, int32_t iHgt, int32_t iPhaseX=0, int32_t iPhaseY=0, int32_t r=0)
 
bool GetPhaseNum (int32_t &rX, int32_t &rY)
 
C4Facet GetSection (int32_t iSection)
 
C4Facet GetPhase (int iPhaseX=0, int iPhaseY=0)
 
C4Facet GetFraction (int32_t percentWdt, int32_t percentHgt=0, int32_t alignX=C4FCT_Left, int32_t alignY=C4FCT_Top)
 
C4Facet TruncateSection (int32_t iAlign=C4FCT_Left)
 
C4Facet Truncate (int32_t iAlign, int32_t iSize)
 
int32_t GetSectionCount ()
 
int32_t GetWidthByHeight (int32_t iHeight)
 
int32_t GetHeightByWidth (int32_t iWidth)
 

Public Attributes

float TargetX
 
float TargetY
 
float Zoom
 
float ParRefX
 
float ParRefY
 
C4SurfaceSurface
 
float X
 
float Y
 
float Wdt
 
float Hgt
 

Detailed Description

Definition at line 159 of file C4Facet.h.

Constructor & Destructor Documentation

◆ C4TargetFacet()

C4TargetFacet::C4TargetFacet ( )
inline

Definition at line 162 of file C4Facet.h.

162 { Default(); }
void Default()
Definition: C4Facet.h:179

References Default().

Here is the call graph for this function:

◆ ~C4TargetFacet()

C4TargetFacet::~C4TargetFacet ( )
default

Member Function Documentation

◆ Clear()

void C4TargetFacet::Clear ( )
inline

Definition at line 180 of file C4Facet.h.

180 { Surface=nullptr; }
C4Surface * Surface
Definition: C4Facet.h:117

References C4Facet::Surface.

◆ Default()

void C4TargetFacet::Default ( )
inline

Definition at line 179 of file C4Facet.h.

void Default()
Definition: C4Facet.cpp:31
float TargetY
Definition: C4Facet.h:165
float TargetX
Definition: C4Facet.h:165
float Zoom
Definition: C4Facet.h:165
float ParRefY
Definition: C4Facet.h:177
float ParRefX
Definition: C4Facet.h:177

References C4Facet::Default(), ParRefX, ParRefY, TargetX, TargetY, and Zoom.

Referenced by C4TargetFacet(), C4GUI::FrameDecoration::Clear(), and C4GraphicsOverlay::UpdateFacet().

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

◆ Draw() [1/2]

void C4Facet::Draw ( C4Facet cgo,
bool  fAspect = true,
int32_t  iPhaseX = 0,
int32_t  iPhaseY = 0,
bool  fTransparent = true 
)
inherited

Definition at line 154 of file C4Facet.cpp.

155 {
156  // Valid parameter check
157  if (!pDraw || !Surface || !cgo.Surface || !Wdt || !Hgt) return;
158  // Drawing area
159  C4Facet ccgo = cgo;
160  // Adjust for fixed aspect ratio (letterbox)
161  if (fAspect)
162  {
163  // By height
164  if (cgo.Wdt / Wdt < cgo.Hgt / Hgt)
165  {
166  ccgo.Hgt = Hgt * cgo.Wdt / Wdt;
167  ccgo.Y += (cgo.Hgt - ccgo.Hgt) / 2;
168  }
169  // By width
170  else if (cgo.Hgt / Hgt < cgo.Wdt / Wdt)
171  {
172  ccgo.Wdt = Wdt * cgo.Hgt / Hgt;
173  ccgo.X += (cgo.Wdt - ccgo.Wdt) / 2;
174  }
175  }
176  // Blit
177  pDraw->Blit(Surface,
178  float(X+Wdt*iPhaseX),float(Y+Hgt*iPhaseY),float(Wdt),float(Hgt),
179  ccgo.Surface,
180  ccgo.X,ccgo.Y,ccgo.Wdt,ccgo.Hgt,
181  fTransparent);
182 }
C4Draw * pDraw
Definition: C4Draw.cpp:42
bool Blit(C4Surface *sfcSource, float fx, float fy, float fwdt, float fhgt, C4Surface *sfcTarget, float tx, float ty, float twdt, float thgt, bool fSrcColKey=false, const C4BltTransform *pTransform=nullptr)
Definition: C4Draw.cpp:301
float Hgt
Definition: C4Facet.h:118
float Wdt
Definition: C4Facet.h:118
float Y
Definition: C4Facet.h:118
float X
Definition: C4Facet.h:118

References C4Draw::Blit(), C4Facet::Hgt, pDraw, C4Facet::Surface, C4Facet::Wdt, C4Facet::X, and C4Facet::Y.

Referenced by C4MainMenu::ActivateGoals(), C4MainMenu::DoRefillInternal(), C4UpperBoard::Draw(), C4GUI::FrameDecoration::Draw(), C4GUI::Element::DrawBar(), C4GUI::Tabular::Sheet::DrawCaption(), C4Facet::DrawClr(), C4GUI::WoodenLabel::DrawElement(), C4GUI::Picture::DrawElement(), C4GUI::OverlayPicture::DrawElement(), C4GUI::ScrollBar::DrawElement(), C4GUI::PaintBox::DrawElement(), C4GUI::ContextMenu::Entry::DrawElement(), C4GUI::ContextButton::DrawElement(), C4StartupPlrPropertiesDlg::DrawElement(), C4Facet::DrawEnergyLevelEx(), C4Player::DrawHostility(), C4EditCursor::DrawObject(), C4Viewport::DrawPlayerStartup(), C4RankSystem::DrawRankSymbol(), C4Facet::DrawValue(), C4Facet::DrawValue2(), C4FacetSurface::EnsureOwnSurface(), C4GUI::Picture::EnsureOwnSurface(), C4RoundResultsPlayer::EvaluatePlayer(), C4ScenarioListLoader::Entry::Load(), and C4Object::Picture2Facet().

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

◆ Draw() [2/2]

void C4Facet::Draw ( C4Surface sfcTarget,
float  iX,
float  iY,
int32_t  iPhaseX = 0,
int32_t  iPhaseY = 0 
)
inherited

Definition at line 66 of file C4Facet.cpp.

67 {
68  if (!pDraw || !Surface || !sfcTarget || !Wdt || !Hgt) return;
69 
71  float(X+Wdt*iPhaseX),float(Y+Hgt*iPhaseY),float(Wdt),float(Hgt),
72  sfcTarget,
73  iX,iY,Wdt,Hgt,true);
74 }

References C4Draw::Blit(), C4Facet::Hgt, pDraw, C4Facet::Surface, C4Facet::Wdt, C4Facet::X, and C4Facet::Y.

Here is the call graph for this function:

◆ DrawClr()

void C4Facet::DrawClr ( C4Facet cgo,
bool  fAspect = true,
DWORD  dwClr = 0 
)
inherited

Definition at line 213 of file C4Facet.cpp.

214 {
215  if (!Surface) return;
216  // set ColorByOwner-color
217  Surface->SetClr(dwClr);
218  // draw
219  Draw(cgo, fAspect);
220 }
void Draw(C4Facet &cgo, bool fAspect=true, int32_t iPhaseX=0, int32_t iPhaseY=0, bool fTransparent=true)
Definition: C4Facet.cpp:154
void SetClr(DWORD toClr)
Definition: C4Surface.h:132

References C4Facet::Draw(), C4Surface::SetClr(), and C4Facet::Surface.

Referenced by C4MainMenu::DoRefillInternal(), C4DefGraphics::DrawClr(), C4GUI::Picture::DrawElement(), C4MenuItem::DrawElement(), C4Player::DrawHostility(), C4StartupPlrSelDlg::PlayerListItem::Load(), and C4StartupPlrSelDlg::PlayerListItem::UpdateCore().

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

◆ DrawEnergyLevelEx()

void C4Facet::DrawEnergyLevelEx ( int32_t  iLevel,
int32_t  iRange,
const C4Facet gfx,
int32_t  bar_idx 
)
inherited

Definition at line 402 of file C4Facet.cpp.

403 {
404  // draw energy level using graphics
405  if (!pDraw || !gfx.Surface) return;
406  int32_t h=gfx.Hgt;
407  int32_t yBar = Hgt - Clamp<int32_t>(iLevel,0,iRange) * Hgt / std::max<int32_t>(iRange,1);
408  int32_t iY = 0, vidx=0;
409  C4Facet gfx_draw = gfx;
410  bool filled = false;
411  while (iY < Hgt)
412  {
413  int32_t dy = iY % h;
414  int32_t dh = (iY >= Hgt-h) ? Hgt - iY : h - dy;
415  if (!filled)
416  {
417  if (iY >= yBar)
418  {
419  filled = true; // fully filled
420  }
421  else if (iY + h >= yBar)
422  dh = yBar - iY; // partially filled
423  }
424  if (!vidx && iY && iY + dh > h)
425  {
426  if (iY < h)
427  {
428  // had a break within top section of bar; finish top section
429  dh = h - iY;
430  }
431  else
432  {
433  // top section finished
434  ++vidx;
435  }
436  }
437  if (iY + dh >= Hgt - h)
438  {
439  if (iY >= Hgt - h)
440  {
441  // within bottom section
442  vidx = 2;
443  dy = iY + h - Hgt;
444  }
445  else
446  {
447  // finish middle section
448  dh = Hgt - h - iY;
449  }
450  }
451  // draw it; partially if necessary
452  gfx_draw.Y = gfx.Y + vidx*h + dy;
453  gfx_draw.Hgt = dh;
454  gfx_draw.Draw(Surface, X, Y+iY, bar_idx+bar_idx+!filled);
455  iY += dh;
456  }
457 }

References C4Facet::Draw(), C4Facet::Hgt, pDraw, C4Facet::Surface, C4Facet::X, and C4Facet::Y.

Here is the call graph for this function:

◆ DrawFullScreen()

void C4Facet::DrawFullScreen ( C4Facet cgo)
inherited

Definition at line 184 of file C4Facet.cpp.

185 {
186  // Valid parameter check
187  if (!pDraw || !Surface || !cgo.Surface || !Wdt || !Hgt) return;
188  // Drawing area
189  C4Facet ccgo = cgo;
190  // stretched fullscreen blit: make sure right and lower side are cleared, because this may be missed due to stretching
191  if (cgo.Wdt > Wdt+2 || cgo.Hgt > Wdt+2)
192  {
193  ccgo.X -= 1; ccgo.Y -= 1;
194  ccgo.Wdt += 2; ccgo.Hgt += 2;
195  }
196  // Adjust for fixed aspect ratio (crop)
197  // By height
198  if (cgo.Wdt / Wdt < cgo.Hgt / Hgt)
199  {
200  ccgo.Wdt = Wdt * cgo.Hgt / Hgt;
201  ccgo.X += (cgo.Wdt - ccgo.Wdt) / 2;
202  }
203  // By width
204  else if (cgo.Hgt / Hgt < cgo.Wdt / Wdt)
205  {
206  ccgo.Hgt = Hgt * cgo.Wdt / Wdt;
207  ccgo.Y += (cgo.Hgt - ccgo.Hgt) / 2;
208  }
209  // Blit
210  pDraw->Blit(Surface, X, Y, Wdt, Hgt, ccgo.Surface, ccgo.X, ccgo.Y, ccgo.Wdt, ccgo.Hgt);
211 }

References C4Draw::Blit(), C4Facet::Hgt, pDraw, C4Facet::Surface, C4Facet::Wdt, C4Facet::X, and C4Facet::Y.

Referenced by C4LoaderScreen::Draw(), and C4GUI::FullscreenDialog::DrawBackground().

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

◆ DrawT() [1/2]

void C4Facet::DrawT ( C4Facet cgo,
bool  fAspect,
int32_t  iPhaseX,
int32_t  iPhaseY,
C4DrawTransform pTransform 
)
inherited

Definition at line 86 of file C4Facet.cpp.

87 {
88  if (!pDraw || !Surface || !cgo.Surface || !Wdt || !Hgt) return;
89 
90  // Drawing area
91  C4Facet ccgo = cgo;
92  // Adjust for fixed aspect ratio
93  if (fAspect)
94  {
95  // By height
96  if (100*cgo.Wdt/Wdt<100*cgo.Hgt/Hgt)
97  {
98  ccgo.Hgt=Hgt*cgo.Wdt/Wdt;
99  ccgo.Y+=(cgo.Hgt-ccgo.Hgt)/2;
100  }
101  // By width
102  else if (100*cgo.Hgt/Hgt<100*cgo.Wdt/Wdt)
103  {
104  ccgo.Wdt=Wdt*cgo.Hgt/Hgt;
105  ccgo.X+=(cgo.Wdt-ccgo.Wdt)/2;
106  }
107  }
108 
109  pDraw->Blit(Surface,
110  float(X+Wdt*iPhaseX),float(Y+Hgt*iPhaseY),float(Wdt),float(Hgt),
111  ccgo.Surface,ccgo.X,ccgo.Y,ccgo.Wdt,ccgo.Hgt,
112  true,pTransform);
113 }

References C4Draw::Blit(), C4Facet::Hgt, pDraw, C4Facet::Surface, C4Facet::Wdt, C4Facet::X, and C4Facet::Y.

Here is the call graph for this function:

◆ DrawT() [2/2]

void C4Facet::DrawT ( C4Surface sfcTarget,
float  iX,
float  iY,
int32_t  iPhaseX,
int32_t  iPhaseY,
C4DrawTransform pTransform 
)
inherited

Definition at line 76 of file C4Facet.cpp.

77 {
78  if (!pDraw || !Surface || !sfcTarget || !Wdt || !Hgt) return;
79 
81  float(X+Wdt*iPhaseX),float(Y+Hgt*iPhaseY),float(Wdt),float(Hgt),
82  sfcTarget,
83  iX,iY,Wdt,Hgt,true,pTransform);
84 }

References C4Draw::Blit(), C4Facet::Hgt, pDraw, C4Facet::Surface, C4Facet::Wdt, C4Facet::X, and C4Facet::Y.

Referenced by C4GraphicsOverlay::Draw(), and C4GUI::Element::DrawHVBar().

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

◆ DrawTUnscaled() [1/2]

void C4Facet::DrawTUnscaled ( C4Facet cgo,
bool  fAspect,
int32_t  iPhaseX,
int32_t  iPhaseY,
C4DrawTransform pTransform 
)
inherited

Definition at line 125 of file C4Facet.cpp.

126 {
127  if (!pDraw || !Surface || !cgo.Surface || !Wdt || !Hgt) return;
128 
129  // Drawing area
130  C4Facet ccgo = cgo;
131  // Adjust for fixed aspect ratio
132  if (fAspect)
133  {
134  // By height
135  if (100*cgo.Wdt/Wdt<100*cgo.Hgt/Hgt)
136  {
137  ccgo.Hgt=Hgt*cgo.Wdt/Wdt;
138  ccgo.Y+=(cgo.Hgt-ccgo.Hgt)/2;
139  }
140  // By width
141  else if (100*cgo.Hgt/Hgt<100*cgo.Wdt/Wdt)
142  {
143  ccgo.Wdt=Wdt*cgo.Hgt/Hgt;
144  ccgo.X+=(cgo.Wdt-ccgo.Wdt)/2;
145  }
146  }
147 
149  float(X+Wdt*iPhaseX),float(Y+Hgt*iPhaseY),float(Wdt),float(Hgt),
150  ccgo.Surface,ccgo.X,ccgo.Y,ccgo.Wdt,ccgo.Hgt,
151  true,pTransform);
152 }
bool BlitUnscaled(C4Surface *sfcSource, float fx, float fy, float fwdt, float fhgt, C4Surface *sfcTarget, float tx, float ty, float twdt, float thgt, bool fSrcColKey=false, const C4BltTransform *pTransform=nullptr)
Definition: C4Draw.cpp:309

References C4Draw::BlitUnscaled(), C4Facet::Hgt, pDraw, C4Facet::Surface, C4Facet::Wdt, C4Facet::X, and C4Facet::Y.

Here is the call graph for this function:

◆ DrawTUnscaled() [2/2]

void C4Facet::DrawTUnscaled ( C4Surface sfcTarget,
float  iX,
float  iY,
int32_t  iPhaseX,
int32_t  iPhaseY,
C4DrawTransform pTransform 
)
inherited

Definition at line 115 of file C4Facet.cpp.

116 {
117  if (!pDraw || !Surface || !sfcTarget || !Wdt || !Hgt) return;
118 
120  float(X+Wdt*iPhaseX),float(Y+Hgt*iPhaseY),float(Wdt),float(Hgt),
121  sfcTarget,
122  iX,iY,Wdt,Hgt,true,pTransform);
123 }

References C4Draw::BlitUnscaled(), C4Facet::Hgt, pDraw, C4Facet::Surface, C4Facet::Wdt, C4Facet::X, and C4Facet::Y.

Referenced by C4DefGraphics::Draw().

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

◆ DrawValue()

void C4Facet::DrawValue ( C4Facet cgo,
int32_t  iValue,
int32_t  iPhaseX = 0,
int32_t  iPhaseY = 0,
int32_t  iAlign = C4FCT_Center 
)
inherited

Definition at line 308 of file C4Facet.cpp.

309 {
310  if (!pDraw) return;
311  char ostr[25]; sprintf(ostr,"%i",iValue);
312  switch (iAlign)
313  {
314  case C4FCT_Center:
315  Draw(cgo, true, iSectionX, iSectionY);
316  pDraw->TextOut(ostr, ::GraphicsResource.FontRegular, 1.0, cgo.Surface,
317  cgo.X + cgo.Wdt - 1, cgo.Y + cgo.Hgt - 1, C4Draw::DEFAULT_MESSAGE_COLOR, ARight);
318  break;
319  case C4FCT_Right:
320  {
321  int32_t textwdt, texthgt;
322  ::GraphicsResource.FontRegular.GetTextExtent(ostr, textwdt, texthgt, false);
323  pDraw->TextOut(ostr, ::GraphicsResource.FontRegular, 1.0, cgo.Surface,
324  cgo.X + cgo.Wdt - 1, cgo.Y, C4Draw::DEFAULT_MESSAGE_COLOR, ARight);
325  cgo.Set(cgo.Surface, cgo.X + cgo.Wdt - 1 - textwdt - 2 * cgo.Hgt, cgo.Y, 2 * cgo.Hgt, cgo.Hgt);
326  Draw(cgo, true, iSectionX, iSectionY);
327  break;
328  }
329  }
330 }
const int32_t C4FCT_Right
Definition: C4Facet.h:28
const int32_t C4FCT_Center
Definition: C4Facet.h:31
C4GraphicsResource GraphicsResource
const int ARight
Definition: C4Surface.h:41
#define sprintf
Definition: Standard.h:162
@ DEFAULT_MESSAGE_COLOR
Definition: C4Draw.h:167
bool TextOut(const char *szText, CStdFont &rFont, float fZoom, C4Surface *sfcDest, float iTx, float iTy, DWORD dwFCol=0xffffffff, BYTE byForm=ALeft, bool fDoMarkup=true)
Definition: C4Draw.cpp:561
void Set(C4Surface &rSfc)
Definition: C4Facet.cpp:459
bool GetTextExtent(const char *szText, int32_t &rsx, int32_t &rsy, bool fCheckMarkup=true)

References ARight, C4FCT_Center, C4FCT_Right, C4Draw::DEFAULT_MESSAGE_COLOR, C4Facet::Draw(), C4GraphicsResource::FontRegular, CStdFont::GetTextExtent(), GraphicsResource, C4Facet::Hgt, pDraw, C4Facet::Set(), sprintf, C4Facet::Surface, C4Draw::TextOut(), C4Facet::Wdt, C4Facet::X, and C4Facet::Y.

Referenced by C4Menu::DrawElement().

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

◆ DrawValue2()

void C4Facet::DrawValue2 ( C4Facet cgo,
int32_t  iValue1,
int32_t  iValue2,
int32_t  iPhaseX = 0,
int32_t  iPhaseY = 0,
int32_t  iAlign = C4FCT_Center,
int32_t *  piUsedWidth = nullptr 
)
inherited

Definition at line 332 of file C4Facet.cpp.

333 {
334  if (!pDraw) return;
335  char ostr[25]; sprintf(ostr,"%i/%i",iValue1,iValue2);
336  switch (iAlign)
337  {
338  case C4FCT_Center:
339  Draw(cgo, true, iSectionX, iSectionY);
340  pDraw->TextOut(ostr, ::GraphicsResource.FontRegular, 1.0, cgo.Surface,
341  cgo.X + cgo.Wdt - 1, cgo.Y + cgo.Hgt - 1, C4Draw::DEFAULT_MESSAGE_COLOR, ARight);
342  break;
343  case C4FCT_Right:
344  {
345  int32_t textwdt, texthgt;
346  ::GraphicsResource.FontRegular.GetTextExtent(ostr, textwdt, texthgt, false);
347  textwdt += Wdt + 3;
348  pDraw->TextOut(ostr, ::GraphicsResource.FontRegular, 1.0, cgo.Surface,
349  cgo.X + cgo.Wdt - 1, cgo.Y, C4Draw::DEFAULT_MESSAGE_COLOR, ARight);
350  cgo.Set(cgo.Surface, cgo.X + cgo.Wdt - textwdt, cgo.Y, 2 * cgo.Hgt, cgo.Hgt);
351  Draw(cgo, true, iSectionX, iSectionY);
352  if (piUsedWidth) *piUsedWidth = textwdt;
353  }
354  break;
355  }
356 }

References ARight, C4FCT_Center, C4FCT_Right, C4Draw::DEFAULT_MESSAGE_COLOR, C4Facet::Draw(), C4GraphicsResource::FontRegular, CStdFont::GetTextExtent(), GraphicsResource, C4Facet::Hgt, pDraw, C4Facet::Set(), sprintf, C4Facet::Surface, C4Draw::TextOut(), C4Facet::Wdt, C4Facet::X, and C4Facet::Y.

Referenced by C4Facet::DrawValue2Clr().

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

◆ DrawValue2Clr()

void C4Facet::DrawValue2Clr ( C4Facet cgo,
int32_t  iValue1,
int32_t  iValue2,
DWORD  dwClr 
)
inherited

Definition at line 230 of file C4Facet.cpp.

231 {
232  // set ColorByOwner-color
233  Surface->SetClr(dwClr);
234  // draw
235  DrawValue2(cgo, iValue1, iValue2);
236 }
void DrawValue2(C4Facet &cgo, int32_t iValue1, int32_t iValue2, int32_t iPhaseX=0, int32_t iPhaseY=0, int32_t iAlign=C4FCT_Center, int32_t *piUsedWidth=nullptr)
Definition: C4Facet.cpp:332

References C4Facet::DrawValue2(), C4Surface::SetClr(), and C4Facet::Surface.

Here is the call graph for this function:

◆ DrawX()

void C4Facet::DrawX ( C4Surface sfcTarget,
float  iX,
float  iY,
float  iWdt,
float  iHgt,
int32_t  iPhaseX = 0,
int32_t  iPhaseY = 0 
) const
inherited

Definition at line 358 of file C4Facet.cpp.

359 {
360  if (!pDraw || !Surface || !sfcTarget || !Wdt || !Hgt) return;
361  pDraw->Blit(Surface,
362  float(X+Wdt*iSectionX),float(Y+Hgt*iSectionY),float(Wdt),float(Hgt),
363  sfcTarget,
364  iX,iY,iWdt,iHgt,
365  true);
366 }

References C4Draw::Blit(), C4Facet::Hgt, pDraw, C4Facet::Surface, C4Facet::Wdt, C4Facet::X, and C4Facet::Y.

Referenced by C4LoaderScreen::Draw(), C4EditCursor::Draw(), C4SolidMask::Draw(), C4GUI::Element::DrawBar(), C4GUI::Tabular::Sheet::DrawCaption(), C4GUI::ProgressBar::DrawElement(), C4GUI::Button::DrawElement(), C4GUI::IconButton::DrawElement(), C4GUI::ArrowButton::DrawElement(), C4GUI::CheckBox::DrawElement(), C4GUI::Tabular::DrawElement(), C4GUI::ContextMenu::Entry::DrawElement(), C4GUI::ContextButton::DrawElement(), C4GUI::ComboBox::DrawElement(), C4StartupMainDlg::DrawElement(), C4RankSystem::DrawRankSymbol(), and C4Facet::DrawXClr().

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

◆ DrawXClr()

void C4Facet::DrawXClr ( C4Surface sfcTarget,
int32_t  iX,
int32_t  iY,
int32_t  iWdt,
int32_t  iHgt,
DWORD  dwClr 
)
inherited

Definition at line 222 of file C4Facet.cpp.

223 {
224  // set ColorByOwner-color
225  Surface->SetClr(dwClr);
226  // draw
227  DrawX(sfcTarget, iX, iY, iWdt, iHgt);
228 }
void DrawX(C4Surface *sfcTarget, float iX, float iY, float iWdt, float iHgt, int32_t iPhaseX=0, int32_t iPhaseY=0) const
Definition: C4Facet.cpp:358

References C4Facet::DrawX(), C4Surface::SetClr(), and C4Facet::Surface.

Here is the call graph for this function:

◆ DrawXFloat()

void C4Facet::DrawXFloat ( C4Surface sfcTarget,
float  fX,
float  fY,
float  fWdt,
float  fHgt 
) const
inherited

Definition at line 368 of file C4Facet.cpp.

369 {
370  if (!pDraw || !Surface || !sfcTarget || !Wdt || !Hgt || fWdt<=0 || fHgt<=0) return;
371  // Since only source coordinates are available as floats for blitting, go inwards into this facet to match blit
372  // for closest integer target coordinates
373  float zx = fWdt / float(Wdt), zy = fHgt / float(Hgt);
374  int32_t iX = (int32_t) ceilf(fX), iY = (int32_t) ceilf(fY), iX2 = (int32_t) floorf(fX+fWdt), iY2 = (int32_t) floorf(fY+fHgt);
375  float ox = (-fX+iX)/zx, oy = (-fY+iY)/zy;
376  float oxs = (+fX+fWdt-iX2)/zx, oys = (+fY+fHgt-iY2)/zy;
377  pDraw->Blit(Surface,
378  float(X)+ox, float(Y)+oy, float(Wdt)-ox-oxs, float(Hgt)-oy-oys,
379  sfcTarget,
380  iX,iY,iX2-iX,iY2-iY,
381  true);
382  zx=(iX2-iX)/(float(Wdt)-ox-oxs);
383  zy=(iY2-iY)/(float(Hgt)-oy-oys);
384  /* int32_t iX = floorf(fX+0.5)-1, iY = floorf(fY+0.5)-1, iX2 = floorf(fX+fWdt+0.5)-1, iY2 = floorf(fY+fHgt+0.5)-1;
385  pDraw->Blit(Surface,
386  X, Y, Wdt, Hgt,
387  sfcTarget,
388  iX,iY,iX2-iX+1,iY2-iY+1,
389  true);*/
390 }

References C4Draw::Blit(), C4Facet::Hgt, pDraw, C4Facet::Surface, C4Facet::Wdt, C4Facet::X, and C4Facet::Y.

Referenced by C4GUI::FacetButton::DrawElement().

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

◆ DrawXR()

void C4Facet::DrawXR ( C4Surface sfcTarget,
int32_t  iX,
int32_t  iY,
int32_t  iWdt,
int32_t  iHgt,
int32_t  iPhaseX = 0,
int32_t  iPhaseY = 0,
int32_t  r = 0 
)
inherited

Definition at line 238 of file C4Facet.cpp.

239 {
240  if (!pDraw || !Surface || !sfcTarget || !Wdt || !Hgt) return;
241  C4BltTransform rot;
242  rot.SetRotate(r / 100.0f, (float) (iX+iX+iWdt)/2, (float) (iY+iY+iHgt)/2);
243  pDraw->Blit(Surface,
244  float(X+Wdt*iSectionX),float(Y+Hgt*iSectionY),float(Wdt),float(Hgt),
245  sfcTarget,
246  iX,iY,iWdt,iHgt,
247  true,&rot);
248 }
void SetRotate(float iAngle, float fOffX, float fOffY)

References C4Draw::Blit(), C4Facet::Hgt, pDraw, C4BltTransform::SetRotate(), C4Facet::Surface, C4Facet::Wdt, C4Facet::X, and C4Facet::Y.

Referenced by C4SolidMask::Draw().

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

◆ DrawXT()

void C4Facet::DrawXT ( C4Surface sfcTarget,
float  iX,
float  iY,
int32_t  iWdt,
int32_t  iHgt,
int32_t  iPhaseX,
int32_t  iPhaseY,
C4DrawTransform pTransform 
)
inherited

Definition at line 392 of file C4Facet.cpp.

393 {
394  if (!pDraw || !Surface || !sfcTarget || !Wdt || !Hgt) return;
395  pDraw->Blit(Surface,
396  float(X+Wdt*iPhaseX),float(Y+Hgt*iPhaseY),float(Wdt),float(Hgt),
397  sfcTarget,
398  iX,iY,iWdt,iHgt,
399  true, pTransform);
400 }

References C4Draw::Blit(), C4Facet::Hgt, pDraw, C4Facet::Surface, C4Facet::Wdt, C4Facet::X, and C4Facet::Y.

Referenced by C4Game::DrawTextSpecImage().

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

◆ Expand()

void C4Facet::Expand ( int32_t  iLeft = 0,
int32_t  iRight = 0,
int32_t  iTop = 0,
int32_t  iBottom = 0 
)
inherited

Definition at line 464 of file C4Facet.cpp.

465 {
466  X-=iLeft; Wdt+=iLeft;
467  Wdt+=iRight;
468  Y-=iTop; Hgt+=iTop;
469  Hgt+=iBottom;
470 }

References C4Facet::Hgt, C4Facet::Wdt, C4Facet::X, and C4Facet::Y.

◆ GetFraction()

C4Facet C4Facet::GetFraction ( int32_t  percentWdt,
int32_t  percentHgt = 0,
int32_t  alignX = C4FCT_Left,
int32_t  alignY = C4FCT_Top 
)
inherited

Definition at line 555 of file C4Facet.cpp.

556 {
557  C4Facet rval;
558  // Simple spec for square fractions
559  if (percentHgt == 0) percentHgt = percentWdt;
560  // Alignment
561  int iX = X, iY = Y, iWdt = std::max(Wdt*percentWdt/100, 1.0f), iHgt = std::max(Hgt*percentHgt/100, 1.0f);
562  if (alignX & C4FCT_Right) iX += Wdt - iWdt;
563  if (alignX & C4FCT_Center) iX += Wdt/2 - iWdt/2;
564  if (alignY & C4FCT_Bottom) iY += Hgt - iHgt;
565  if (alignY & C4FCT_Center) iY += Hgt/2 - iHgt/2;
566  // Set resulting facet
567  rval.Set(Surface, iX, iY, iWdt, iHgt);
568  return rval;
569 }
const int32_t C4FCT_Bottom
Definition: C4Facet.h:30

References C4FCT_Bottom, C4FCT_Center, C4FCT_Right, C4Facet::Hgt, C4Facet::Set(), C4Facet::Surface, C4Facet::Wdt, C4Facet::X, and C4Facet::Y.

Here is the call graph for this function:

◆ GetHeightByWidth()

int32_t C4Facet::GetHeightByWidth ( int32_t  iWidth)
inlineinherited

Definition at line 155 of file C4Facet.h.

156  { return iWidth * Hgt / (Wdt ? Wdt : 1); }

References C4Facet::Hgt, and C4Facet::Wdt.

◆ GetPhase()

C4Facet C4Facet::GetPhase ( int  iPhaseX = 0,
int  iPhaseY = 0 
)
inherited

Definition at line 59 of file C4Facet.cpp.

60 {
61  C4Facet fctResult;
62  fctResult.Set(Surface,X+Wdt*iPhaseX,Y+Hgt*iPhaseY,Wdt,Hgt);
63  return fctResult;
64 }

References C4Facet::Hgt, C4Facet::Set(), C4Facet::Surface, C4Facet::Wdt, C4Facet::X, and C4Facet::Y.

Referenced by C4StartupPlrPropertiesDlg::C4StartupPlrPropertiesDlg(), C4GUI::Picture::DrawElement(), C4GUI::ArrowButton::DrawElement(), C4GUI::CheckBox::DrawElement(), C4GUI::ContextMenu::Entry::DrawElement(), C4Player::DrawHostility(), C4RankSystem::DrawRankSymbol(), C4GUI::Icon::GetIconFacet(), C4PlayerControlAssignmentSet::GetPicture(), and C4ScenarioListLoader::Entry::Load().

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

◆ GetPhaseNum()

bool C4Facet::GetPhaseNum ( int32_t &  rX,
int32_t &  rY 
)
inherited

Definition at line 472 of file C4Facet.cpp.

473 {
474  // safety
475  if (!Surface) return false;
476  // newgfx: use locally stored size
477  rX=Surface->Wdt/Wdt; rY=Surface->Hgt/Hgt;
478  // success
479  return true;
480 }
int Wdt
Definition: C4Surface.h:65
int Hgt
Definition: C4Surface.h:65

References C4Facet::Hgt, C4Surface::Hgt, C4Facet::Surface, C4Facet::Wdt, and C4Surface::Wdt.

Referenced by C4PXSSystem::Draw(), C4GUI::Picture::DrawElement(), C4GUI::ContextMenu::Entry::DrawElement(), C4RankSystem::DrawRankSymbol(), C4GUI::Icon::GetIconFacet(), C4GraphicsResource::Init(), and C4ParticleDef::Load().

Here is the caller graph for this function:

◆ GetSection()

C4Facet C4Facet::GetSection ( int32_t  iSection)
inherited

Definition at line 52 of file C4Facet.cpp.

53 {
54  C4Facet rval;
55  rval.Set(Surface,X+Hgt*iSection,Y,Hgt,Hgt);
56  return rval;
57 }

References C4Facet::Hgt, C4Facet::Set(), C4Facet::Surface, C4Facet::X, and C4Facet::Y.

Here is the call graph for this function:

◆ GetSectionCount()

int32_t C4Facet::GetSectionCount ( )
inherited

Definition at line 46 of file C4Facet.cpp.

47 {
48  if (Hgt==0) return 0;
49  return Wdt/Hgt;
50 }

References C4Facet::Hgt, and C4Facet::Wdt.

Referenced by C4IDList::Draw().

Here is the caller graph for this function:

◆ GetWidthByHeight()

int32_t C4Facet::GetWidthByHeight ( int32_t  iHeight)
inlineinherited

Definition at line 153 of file C4Facet.h.

154  { return iHeight * Wdt / (Hgt ? Hgt : 1); }

References C4Facet::Hgt, and C4Facet::Wdt.

Referenced by C4StartupPlrPropertiesDlg::C4StartupPlrPropertiesDlg().

Here is the caller graph for this function:

◆ operator=()

C4TargetFacet& C4TargetFacet::operator= ( const C4Facet rhs)
inline

Definition at line 189 of file C4Facet.h.

190  {
191  Set(rhs.Surface,rhs.X,rhs.Y,rhs.Wdt,rhs.Hgt);
192  return *this;
193  }
void Set(const C4Facet &cpy)
Definition: C4Facet.h:182

References C4Facet::Hgt, Set(), C4Facet::Surface, C4Facet::Wdt, C4Facet::X, and C4Facet::Y.

Here is the call graph for this function:

◆ Set() [1/7]

◆ Set() [2/7]

void C4Facet::Set ( C4Surface nsfc,
float  nx,
float  ny,
float  nwdt,
float  nhgt 
)
inherited

Definition at line 36 of file C4Facet.cpp.

37 {
38  Surface=nsfc; X=nx; Y=ny; Wdt=nwdt; Hgt=nhgt;
39 }

References C4Facet::Hgt, C4Facet::Surface, C4Facet::Wdt, C4Facet::X, and C4Facet::Y.

◆ Set() [3/7]

void C4TargetFacet::Set ( class C4Surface nsfc,
const C4Rect r,
float  ntx = 0,
float  nty = 0,
float  Zoom = 1 
)

Definition at line 39 of file C4FacetEx.cpp.

40 {
41  Set(nsfc, r.x, r.y, r.Wdt, r.Hgt, ntx, nty, Zoom);
42 }
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 C4Rect::Hgt, Set(), C4Rect::Wdt, C4Rect::x, C4Rect::y, and Zoom.

Here is the call graph for this function:

◆ Set() [4/7]

void C4TargetFacet::Set ( class C4Surface nsfc,
float  nx,
float  ny,
float  nwdt,
float  nhgt,
float  ntx,
float  nty,
float  Zoom,
float  prx,
float  pry 
)

Definition at line 32 of file C4FacetEx.cpp.

33 {
34  C4Facet::Set(nsfc, nx, ny, nwdt, nhgt);
35  TargetX = ntx; TargetY = nty; this->Zoom = Zoom;
36  ParRefX = prx; ParRefY = pry;
37 }

References ParRefX, ParRefY, C4Facet::Set(), TargetX, TargetY, and Zoom.

Here is the call graph for this function:

◆ Set() [5/7]

void C4TargetFacet::Set ( class C4Surface nsfc,
float  nx,
float  ny,
float  nwdt,
float  nhgt,
float  ntx = 0,
float  nty = 0,
float  Zoom = 1 
)

Definition at line 27 of file C4FacetEx.cpp.

28 {
29  Set(nsfc, nx, ny, nwdt, nhgt, ntx, nty, Zoom, ntx, nty);
30 }

References Set(), and Zoom.

Here is the call graph for this function:

◆ Set() [6/7]

void C4TargetFacet::Set ( const C4Facet cpy)
inline

Definition at line 182 of file C4Facet.h.

182 { TargetX=TargetY=0; Zoom=1; ParRefX=ParRefY=0; C4Facet::Set(cpy); }

References ParRefX, ParRefY, C4Facet::Set(), TargetX, TargetY, and Zoom.

Referenced by C4GraphicsSystem::DoSaveScreenshot(), C4EditCursor::Draw(), C4GUI::Dialog::Draw(), C4Viewport::Draw(), C4GraphicsOverlay::Draw(), C4MouseControl::Draw(), C4GUI::CMouse::Draw(), C4Viewport::DrawMenu(), C4Viewport::Execute(), operator=(), C4GUI::DialogWindow::PerformUpdate(), C4GUI::Screen::Render(), Set(), and C4GraphicsOverlay::UpdateFacet().

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

◆ Set() [7/7]

void C4TargetFacet::Set ( const C4TargetFacet cpy)
inline

Definition at line 183 of file C4Facet.h.

183 { *this = cpy; }

◆ SetRect()

void C4TargetFacet::SetRect ( C4TargetRect rSrc)

Definition at line 44 of file C4FacetEx.cpp.

45 {
46  X=rSrc.x; Y=rSrc.y; Wdt=rSrc.Wdt; Hgt=rSrc.Hgt;
47  TargetX=rSrc.tx; TargetY=rSrc.ty;
48  ParRefX=rSrc.tx; TargetY=rSrc.ty;
49 }
int32_t tx
Definition: C4Rect.h:79
int32_t ty
Definition: C4Rect.h:79

References C4Facet::Hgt, C4Rect::Hgt, ParRefX, TargetX, TargetY, C4TargetRect::tx, C4TargetRect::ty, C4Facet::Wdt, C4Rect::Wdt, C4Facet::X, C4Rect::x, C4Facet::Y, and C4Rect::y.

◆ Truncate()

C4Facet C4Facet::Truncate ( int32_t  iAlign,
int32_t  iSize 
)
inherited

Definition at line 284 of file C4Facet.cpp.

285 {
286  C4Facet fctResult; fctResult.Set(Surface,0,0,0,0);
287  // Calculate section size
288  int32_t iWdt=Wdt,iHgt=Hgt;
289  switch (iAlign)
290  {
291  case C4FCT_Left: case C4FCT_Right: iWdt=iSize; break;
292  case C4FCT_Top: case C4FCT_Bottom: iHgt=iSize; break;
293  }
294  // Size safety
295  if ((iWdt>Wdt) || (iHgt>Hgt)) return fctResult;
296  // Truncate
297  switch (iAlign)
298  {
299  case C4FCT_Left: fctResult.Set(Surface,X,Y,iWdt,iHgt); X+=iWdt; Wdt-=iWdt; break;
300  case C4FCT_Right: fctResult.Set(Surface,X+Wdt-iWdt,Y,iWdt,iHgt); Wdt-=iWdt; break;
301  case C4FCT_Top: fctResult.Set(Surface,X,Y,iWdt,iHgt); Y+=iHgt; Hgt-=iHgt; break;
302  case C4FCT_Bottom: fctResult.Set(Surface,X,Y+Hgt-iHgt,iWdt,iHgt); Hgt-=iHgt; break;
303  }
304  // Done
305  return fctResult;
306 }
const int32_t C4FCT_Left
Definition: C4Facet.h:27
const int32_t C4FCT_Top
Definition: C4Facet.h:29
int iSize
Definition: TstC4NetIO.cpp:32

References C4FCT_Bottom, C4FCT_Left, C4FCT_Right, C4FCT_Top, C4Facet::Hgt, iSize, C4Facet::Set(), C4Facet::Surface, C4Facet::Wdt, C4Facet::X, and C4Facet::Y.

Referenced by C4MenuItem::DrawElement().

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

◆ TruncateSection()

C4Facet C4Facet::TruncateSection ( int32_t  iAlign = C4FCT_Left)
inherited

Definition at line 250 of file C4Facet.cpp.

251 {
252  C4Facet fctResult; fctResult.Set(Surface,0,0,0,0);
253  // Calculate section size
254  int32_t iWdt=Wdt,iHgt=Hgt;
255  switch (iAlign & C4FCT_Alignment)
256  {
257  case C4FCT_Left: case C4FCT_Right:
258  iWdt=Hgt;
259  if (iAlign & C4FCT_Triple) iWdt*=3;
260  if (iAlign & C4FCT_Double) iWdt*=2;
261  if (iAlign & C4FCT_Half) iWdt/=2;
262  break;
263  case C4FCT_Top: case C4FCT_Bottom:
264  iHgt=Wdt;
265  if (iAlign & C4FCT_Triple) iHgt*=3;
266  if (iAlign & C4FCT_Double) iHgt*=2;
267  if (iAlign & C4FCT_Half) iHgt/=2;
268  break;
269  }
270  // Size safety
271  if ((iWdt>Wdt) || (iHgt>Hgt)) return fctResult;
272  // Truncate
273  switch (iAlign & C4FCT_Alignment)
274  {
275  case C4FCT_Left: fctResult.Set(Surface,X,Y,iWdt,iHgt); X+=iWdt; Wdt-=iWdt; break;
276  case C4FCT_Right: fctResult.Set(Surface,X+Wdt-iWdt,Y,iWdt,iHgt); Wdt-=iWdt; break;
277  case C4FCT_Top: fctResult.Set(Surface,X,Y,iWdt,iHgt); Y+=iHgt; Hgt-=iHgt; break;
278  case C4FCT_Bottom: fctResult.Set(Surface,X,Y+Hgt-iHgt,iWdt,iHgt); Hgt-=iHgt; break;
279  }
280  // Done
281  return fctResult;
282 }
const int32_t C4FCT_Double
Definition: C4Facet.h:36
const int32_t C4FCT_Half
Definition: C4Facet.h:35
const int32_t C4FCT_Triple
Definition: C4Facet.h:37
const int32_t C4FCT_Alignment
Definition: C4Facet.h:33

References C4FCT_Alignment, C4FCT_Bottom, C4FCT_Double, C4FCT_Half, C4FCT_Left, C4FCT_Right, C4FCT_Top, C4FCT_Triple, C4Facet::Hgt, C4Facet::Set(), C4Facet::Surface, C4Facet::Wdt, C4Facet::X, and C4Facet::Y.

Referenced by C4IDList::Draw().

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

Member Data Documentation

◆ Hgt

float C4Facet::Hgt
inherited

Definition at line 118 of file C4Facet.h.

Referenced by C4MainMenu::ActivateGoals(), C4FacetSurface::CopyFromSfcMaxSize(), C4MessageBoard::Draw(), C4UpperBoard::Draw(), C4Def::Draw(), C4DefGraphics::Draw(), C4LoaderScreen::Draw(), C4IDList::Draw(), C4Facet::Draw(), C4EditCursor::Draw(), C4PXSSystem::Draw(), C4Sky::Draw(), C4SolidMask::Draw(), C4GUI::Dialog::Draw(), C4Viewport::Draw(), C4GUI::Screen::Draw(), C4GraphicsOverlay::Draw(), C4GUI::FrameDecoration::Draw(), C4Landscape::Draw(), C4Object::Draw(), C4GameMessage::Draw(), C4GUI::CMouse::Draw(), C4LandscapeRenderGL::Draw(), C4Object::DrawActionFace(), C4GUI::Element::DrawBar(), C4GUI::Tabular::Sheet::DrawCaption(), C4ScriptGuiWindow::DrawChildren(), C4GUI::Picture::DrawElement(), C4GUI::OverlayPicture::DrawElement(), C4GUI::ContextMenu::Entry::DrawElement(), C4GUI::ComboBox::DrawElement(), C4GUI::FullscreenDialog::DrawElement(), C4MenuItem::DrawElement(), C4Menu::DrawElement(), C4StartupMainDlg::DrawElement(), C4Facet::DrawEnergyLevelEx(), C4Facet::DrawFullScreen(), C4GUI::Element::DrawHVBar(), C4Viewport::DrawMenu(), C4EditCursor::DrawObject(), C4GraphicsOverlay::DrawPicture(), C4Viewport::DrawPlayerStartup(), C4EditCursor::DrawSelectMark(), C4Object::DrawSelectMark(), C4Facet::DrawT(), CStdFont::DrawText(), C4Game::DrawTextSpecImage(), C4GUI::Screen::DrawToolTip(), C4Object::DrawTopFace(), C4Facet::DrawTUnscaled(), C4Facet::DrawValue(), C4Facet::DrawValue2(), C4Facet::DrawX(), C4Facet::DrawXFloat(), C4Facet::DrawXR(), C4Facet::DrawXT(), C4FacetSurface::EnsureOwnSurface(), C4GUI::Picture::EnsureOwnSurface(), C4RoundResultsPlayer::EvaluatePlayer(), C4Facet::Expand(), C4GUI::Tabular::Sheet::GetCaptionSize(), C4GUI::ArrowButton::GetDefaultHeight(), C4Object::GetDrawPosition(), C4Facet::GetFraction(), C4Facet::GetHeightByWidth(), C4Facet::GetPhase(), C4Facet::GetPhaseNum(), C4Facet::GetSection(), C4Facet::GetSectionCount(), C4Game::GetTextSpecImageAspect(), C4Object::GetViewPosPar(), C4Facet::GetWidthByHeight(), C4FacetSurface::GrabFrom(), C4FacetSurface::Grayscale(), C4EditCursor::HasTransformMarker(), C4GraphicsResource::Init(), C4StartupGraphics::Init(), C4UpperBoard::Init(), C4Menu::InitLocation(), C4EditCursor::IsHoveringTransformMarker(), C4ParticleDef::Load(), C4MapFolderData::Load(), C4ScenarioListLoader::Entry::Load(), operator=(), C4Object::Picture2Facet(), C4ViewportList::RecalculateViewports(), C4Facet::Set(), C4TargetRect::Set(), C4Object::SetAudibilityAt(), C4GUI::FrameDecoration::SetByDef(), C4GUI::Tabular::SetGfx(), C4GUI::DynBarFacet::SetHorizontal(), SetRect(), C4Facet::Truncate(), C4Facet::TruncateSection(), C4Menu::UpdateElementPositions(), and C4ScriptGuiWindow::UpdateLayout().

◆ ParRefX

float C4TargetFacet::ParRefX

Definition at line 177 of file C4Facet.h.

Referenced by Default(), C4Object::GetDrawPosition(), Set(), and SetRect().

◆ ParRefY

float C4TargetFacet::ParRefY

Definition at line 177 of file C4Facet.h.

Referenced by Default(), C4Object::GetDrawPosition(), and Set().

◆ Surface

C4Surface* C4Facet::Surface
inherited

Definition at line 117 of file C4Facet.h.

Referenced by C4MainMenu::ActivateGoals(), Clear(), C4ObjectMenu::DoRefillInternal(), C4MessageBoard::Draw(), C4UpperBoard::Draw(), C4Def::Draw(), C4DefGraphics::Draw(), C4LoaderScreen::Draw(), C4IDList::Draw(), C4Facet::Draw(), C4EditCursor::Draw(), C4PathFinderRay::Draw(), C4PXSSystem::Draw(), C4Sky::Draw(), C4SolidMask::Draw(), C4GUI::ContextMenu::Draw(), C4GUI::Dialog::Draw(), C4Viewport::Draw(), C4GUI::Screen::Draw(), C4TransferZone::Draw(), C4GraphicsOverlay::Draw(), C4GUI::FrameDecoration::Draw(), C4Landscape::Draw(), C4MouseControl::Draw(), C4Object::Draw(), C4GameMessage::Draw(), C4ScriptGuiWindow::Draw(), C4GUI::CMouse::Draw(), C4LandscapeRenderGL::Draw(), C4GUI::Element::Draw3DFrame(), C4GUI::Element::DrawBar(), C4GUI::Tabular::Sheet::DrawCaption(), C4Facet::DrawClr(), C4Game::DrawCrewOverheadText(), C4GUI::Label::DrawElement(), C4GUI::WoodenLabel::DrawElement(), C4GUI::MultilineLabel::DrawElement(), C4GUI::ProgressBar::DrawElement(), C4GUI::HorizontalLine::DrawElement(), C4GUI::ScrollBar::DrawElement(), C4GUI::GroupBox::DrawElement(), C4GUI::PaintBox::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(), C4GUI::FullscreenDialog::DrawElement(), C4MenuItem::DrawElement(), C4Menu::DrawElement(), C4ScoreboardDlg::DrawElement(), C4StartupMainDlg::DrawElement(), C4StartupNetListEntry::DrawElement(), C4StartupPlrPropertiesDlg::DrawElement(), C4Chart::DrawElement(), C4Facet::DrawEnergyLevelEx(), C4Object::DrawFaceImpl(), C4Facet::DrawFullScreen(), C4ViewportList::DrawFullscreenBackground(), C4GUI::Element::DrawHVBar(), C4Object::DrawLine(), C4Viewport::DrawMenu(), C4EditCursor::DrawObject(), C4Viewport::DrawPlayerStartup(), C4RankSystem::DrawRankSymbol(), C4EditCursor::DrawSelectMark(), C4Object::DrawSelectMark(), C4Network2::DrawStatus(), C4Facet::DrawT(), CStdFont::DrawText(), C4Game::DrawTextSpecImage(), C4GUI::Screen::DrawToolTip(), C4Object::DrawTopFace(), C4Facet::DrawTUnscaled(), C4Facet::DrawValue(), C4Facet::DrawValue2(), C4Facet::DrawValue2Clr(), C4Facet::DrawX(), C4Facet::DrawXClr(), C4Facet::DrawXFloat(), C4Facet::DrawXR(), C4Facet::DrawXT(), C4FacetSurface::EnsureOwnSurface(), C4GUI::Picture::EnsureOwnSurface(), C4RoundResultsPlayer::EvaluatePlayer(), C4Facet::GetFraction(), C4GUI::WoodenLabel::GetLeftIndent(), C4Def::GetMainFace(), C4Facet::GetPhase(), C4Facet::GetPhaseNum(), C4Facet::GetSection(), CStdFont::GetUnicodeCharacterFacet(), C4StartupPlrSelDlg::PlayerListItem::GrabCustomIcon(), C4FacetSurface::GrabFrom(), C4MenuItem::GrabSymbol(), C4FacetSurface::Grayscale(), C4GraphicsResource::Init(), C4StartupGraphics::Init(), C4UpperBoard::Init(), C4GraphicsOverlay::IsValid(), C4ParticleDef::Load(), C4MapFolderData::Load(), C4ScenarioListLoader::Entry::Load(), C4StartupPlrPropertiesDlg::OnClosed(), operator=(), C4MenuItem::RefSymbol(), C4Facet::Set(), C4GUI::ScrollBarFacets::Set(), C4GUI::DynBarFacet::SetHorizontal(), C4GUI::WoodenLabel::SetIcon(), C4GUI::IconButton::SetIcon(), C4GUI::TextWindow::SetPicture(), C4Facet::Truncate(), and C4Facet::TruncateSection().

◆ TargetX

float C4TargetFacet::TargetX

Definition at line 165 of file C4Facet.h.

Referenced by Default(), C4EditCursor::Draw(), C4PathFinderRay::Draw(), C4PXSSystem::Draw(), C4Sky::Draw(), C4SolidMask::Draw(), C4GUI::Window::Draw(), C4Viewport::Draw(), C4TransferZone::Draw(), C4GraphicsOverlay::Draw(), C4GUI::FrameDecoration::Draw(), C4Landscape::Draw(), C4GameMessage::Draw(), C4ScriptGuiWindow::Draw(), C4ParticleList::Draw(), C4LandscapeRenderGL::Draw(), C4GUI::Element::Draw3DFrame(), C4ScriptGuiWindow::DrawAll(), C4GUI::Element::DrawBar(), C4ScriptGuiWindow::DrawChildren(), 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::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(), C4ScoreboardDlg::DrawElement(), C4StartupNetListEntry::DrawElement(), C4StartupPlrPropertiesDlg::DrawElement(), C4Chart::DrawElement(), C4GUI::Element::DrawHBarByVGfx(), C4GUI::Element::DrawHVBar(), C4Object::DrawLine(), C4Viewport::DrawMenu(), C4GUI::Screen::DrawToolTip(), C4Object::GetDrawPosition(), Set(), C4TargetRect::Set(), C4GUI::FrameDecoration::SetByDef(), and SetRect().

◆ TargetY

float C4TargetFacet::TargetY

Definition at line 165 of file C4Facet.h.

Referenced by Default(), C4EditCursor::Draw(), C4PathFinderRay::Draw(), C4PXSSystem::Draw(), C4Sky::Draw(), C4SolidMask::Draw(), C4GUI::Window::Draw(), C4Viewport::Draw(), C4TransferZone::Draw(), C4GraphicsOverlay::Draw(), C4GUI::FrameDecoration::Draw(), C4Landscape::Draw(), C4GameMessage::Draw(), C4ScriptGuiWindow::Draw(), C4ParticleList::Draw(), C4LandscapeRenderGL::Draw(), C4GUI::Element::Draw3DFrame(), C4ScriptGuiWindow::DrawAll(), C4GUI::Element::DrawBar(), C4ScriptGuiWindow::DrawChildren(), 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::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(), C4ScoreboardDlg::DrawElement(), C4StartupNetListEntry::DrawElement(), C4StartupPlrPropertiesDlg::DrawElement(), C4Chart::DrawElement(), C4GUI::Element::DrawHBarByVGfx(), C4GUI::Element::DrawHVBar(), C4Object::DrawLine(), C4Viewport::DrawMenu(), C4GUI::Screen::DrawToolTip(), C4Object::GetDrawPosition(), Set(), C4TargetRect::Set(), C4GUI::FrameDecoration::SetByDef(), and SetRect().

◆ Wdt

float C4Facet::Wdt
inherited

Definition at line 118 of file C4Facet.h.

Referenced by C4MainMenu::ActivateGoals(), CStdFont::AddRenderedChar(), C4FacetSurface::CopyFromSfcMaxSize(), C4MessageBoard::Draw(), C4UpperBoard::Draw(), C4Def::Draw(), C4DefGraphics::Draw(), C4LoaderScreen::Draw(), C4IDList::Draw(), C4Facet::Draw(), C4EditCursor::Draw(), C4PXSSystem::Draw(), C4Sky::Draw(), C4SolidMask::Draw(), C4GUI::Dialog::Draw(), C4Viewport::Draw(), C4GUI::Screen::Draw(), C4GraphicsOverlay::Draw(), C4GUI::FrameDecoration::Draw(), C4Landscape::Draw(), C4Object::Draw(), C4GameMessage::Draw(), C4GUI::CMouse::Draw(), C4LandscapeRenderGL::Draw(), C4Object::DrawActionFace(), C4GUI::Element::DrawBar(), C4GUI::Tabular::Sheet::DrawCaption(), C4ScriptGuiWindow::DrawChildren(), C4Game::DrawCrewOverheadText(), C4GUI::Picture::DrawElement(), C4GUI::OverlayPicture::DrawElement(), C4GUI::ContextMenu::Entry::DrawElement(), C4GUI::ComboBox::DrawElement(), C4GUI::FullscreenDialog::DrawElement(), C4MenuItem::DrawElement(), C4Menu::DrawElement(), C4StartupMainDlg::DrawElement(), C4Facet::DrawFullScreen(), C4Viewport::DrawMenu(), C4GraphicsOverlay::DrawPicture(), C4Viewport::DrawPlayerStartup(), C4RankSystem::DrawRankSymbol(), C4EditCursor::DrawSelectMark(), C4Object::DrawSelectMark(), C4Facet::DrawT(), CStdFont::DrawText(), C4Game::DrawTextSpecImage(), C4GUI::Screen::DrawToolTip(), C4Object::DrawTopFace(), C4Facet::DrawTUnscaled(), C4Facet::DrawValue(), C4Facet::DrawValue2(), C4Facet::DrawX(), C4Facet::DrawXFloat(), C4Facet::DrawXR(), C4Facet::DrawXT(), C4FacetSurface::EnsureOwnSurface(), C4GUI::Picture::EnsureOwnSurface(), C4GUI::ContextMenu::Entry::Entry(), C4RoundResultsPlayer::EvaluatePlayer(), C4Facet::Expand(), C4GUI::ArrowButton::GetDefaultWidth(), C4Object::GetDrawPosition(), C4Facet::GetFraction(), C4Facet::GetHeightByWidth(), C4GUI::Tabular::GetLeftClipSize(), C4Facet::GetPhase(), C4Facet::GetPhaseNum(), C4Facet::GetSectionCount(), CStdFont::GetTextExtent(), C4Game::GetTextSpecImageAspect(), C4Object::GetViewPosPar(), C4Facet::GetWidthByHeight(), C4FacetSurface::GrabFrom(), C4FacetSurface::Grayscale(), C4GraphicsResource::Init(), C4StartupGraphics::Init(), C4MessageBoard::Init(), C4Menu::InitLocation(), C4ParticleDef::Load(), C4MapFolderData::Load(), C4ScenarioListLoader::Entry::Load(), operator=(), C4Object::Picture2Facet(), C4ViewportList::RecalculateViewports(), C4Facet::Set(), C4TargetRect::Set(), C4Object::SetAudibilityAt(), C4GUI::FrameDecoration::SetByDef(), C4GUI::Tabular::SetGfx(), C4GUI::DynBarFacet::SetHorizontal(), SetRect(), C4Facet::Truncate(), C4Facet::TruncateSection(), C4Menu::UpdateElementPositions(), and C4ScriptGuiWindow::UpdateLayout().

◆ X

float C4Facet::X
inherited

Definition at line 118 of file C4Facet.h.

Referenced by C4MessageBoard::Draw(), C4Def::Draw(), C4DefGraphics::Draw(), C4IDList::Draw(), C4Facet::Draw(), C4EditCursor::Draw(), C4PathFinderRay::Draw(), C4PXSSystem::Draw(), C4Sky::Draw(), C4SolidMask::Draw(), C4GUI::Dialog::Draw(), C4Viewport::Draw(), C4TransferZone::Draw(), C4GraphicsOverlay::Draw(), C4Landscape::Draw(), C4MouseControl::Draw(), C4Object::Draw(), C4GameMessage::Draw(), C4ScriptGuiWindow::Draw(), C4GUI::CMouse::Draw(), C4ParticleList::Draw(), C4LandscapeRenderGL::Draw(), C4Object::DrawActionFace(), C4ScriptGuiWindow::DrawAll(), C4GUI::Element::DrawBar(), C4GUI::Tabular::Sheet::DrawCaption(), C4ScriptGuiWindow::DrawChildren(), C4Game::DrawCrewOverheadText(), C4GUI::Picture::DrawElement(), C4GUI::OverlayPicture::DrawElement(), C4MenuItem::DrawElement(), C4Menu::DrawElement(), C4StartupNetListEntry::DrawElement(), C4Facet::DrawEnergyLevelEx(), C4Facet::DrawFullScreen(), C4Object::DrawLine(), C4Viewport::DrawMenu(), C4EditCursor::DrawObject(), C4GraphicsOverlay::DrawPicture(), C4Viewport::DrawPlayerStartup(), C4RankSystem::DrawRankSymbol(), C4Object::DrawSelectMark(), C4Network2::DrawStatus(), C4Facet::DrawT(), CStdFont::DrawText(), C4Game::DrawTextSpecImage(), C4GUI::Screen::DrawToolTip(), C4Object::DrawTopFace(), C4Facet::DrawTUnscaled(), C4Facet::DrawValue(), C4Facet::DrawValue2(), C4Facet::DrawX(), C4Facet::DrawXFloat(), C4Facet::DrawXR(), C4Facet::DrawXT(), C4Facet::Expand(), C4Game::FindVisObject(), C4Object::GetDrawPosition(), C4Facet::GetFraction(), C4Facet::GetPhase(), C4Facet::GetSection(), C4MouseControl::GetTargetObject(), C4FacetSurface::GrabFrom(), operator=(), C4ViewportList::RecalculateViewports(), C4Facet::Set(), C4TargetRect::Set(), C4Object::SetAudibilityAt(), C4GUI::DynBarFacet::SetHorizontal(), SetRect(), C4Facet::Truncate(), C4Facet::TruncateSection(), C4MouseControl::UpdateCursorTarget(), and C4ScriptGuiWindow::UpdateLayout().

◆ Y

float C4Facet::Y
inherited

Definition at line 118 of file C4Facet.h.

Referenced by C4MessageBoard::Draw(), C4Def::Draw(), C4DefGraphics::Draw(), C4IDList::Draw(), C4Facet::Draw(), C4EditCursor::Draw(), C4PathFinderRay::Draw(), C4PXSSystem::Draw(), C4Sky::Draw(), C4SolidMask::Draw(), C4GUI::Dialog::Draw(), C4Viewport::Draw(), C4TransferZone::Draw(), C4GraphicsOverlay::Draw(), C4Landscape::Draw(), C4MouseControl::Draw(), C4Object::Draw(), C4GameMessage::Draw(), C4ScriptGuiWindow::Draw(), C4GUI::CMouse::Draw(), C4ParticleList::Draw(), C4LandscapeRenderGL::Draw(), C4Object::DrawActionFace(), C4ScriptGuiWindow::DrawAll(), C4ScriptGuiWindow::DrawChildren(), C4Game::DrawCrewOverheadText(), C4GUI::Picture::DrawElement(), C4GUI::OverlayPicture::DrawElement(), C4MenuItem::DrawElement(), C4Menu::DrawElement(), C4StartupNetListEntry::DrawElement(), C4Facet::DrawEnergyLevelEx(), C4Facet::DrawFullScreen(), C4Object::DrawLine(), C4Viewport::DrawMenu(), C4EditCursor::DrawObject(), C4GraphicsOverlay::DrawPicture(), C4Viewport::DrawPlayerStartup(), C4RankSystem::DrawRankSymbol(), C4Object::DrawSelectMark(), C4Network2::DrawStatus(), C4Facet::DrawT(), CStdFont::DrawText(), C4Game::DrawTextSpecImage(), C4GUI::Screen::DrawToolTip(), C4Object::DrawTopFace(), C4Facet::DrawTUnscaled(), C4Facet::DrawValue(), C4Facet::DrawValue2(), C4Facet::DrawX(), C4Facet::DrawXFloat(), C4Facet::DrawXR(), C4Facet::DrawXT(), C4Facet::Expand(), C4Game::FindVisObject(), C4Object::GetDrawPosition(), C4Facet::GetFraction(), C4Facet::GetPhase(), C4Facet::GetSection(), C4MouseControl::GetTargetObject(), C4FacetSurface::GrabFrom(), operator=(), C4ViewportList::RecalculateViewports(), C4Facet::Set(), C4TargetRect::Set(), C4Object::SetAudibilityAt(), C4GUI::DynBarFacet::SetHorizontal(), SetRect(), C4Facet::Truncate(), C4Facet::TruncateSection(), C4MouseControl::UpdateCursorTarget(), and C4ScriptGuiWindow::UpdateLayout().

◆ Zoom


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