OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4FacetSurface Class Reference

#include <C4FacetEx.h>

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

Public Member Functions

 C4FacetSurface ()
 
 ~C4FacetSurface ()
 
void Default ()
 
void Clear ()
 
void Set (const C4Facet &cpy)
 
void Set (C4Surface *nsfc, int nx, int ny, int nwdt, int nhgt)
 
void Grayscale (int32_t iOffset=0)
 
bool Create (int iWdt, int iHgt, int iWdt2=C4FCT_Full, int iHgt2=C4FCT_Full)
 
C4SurfaceGetFace ()
 
bool CreateClrByOwner (C4Surface *pBySurface)
 
bool EnsureOwnSurface ()
 
bool Load (C4Group &hGroup, const char *szName, int iWdt, int iHgt, bool fNoErrIfNotFound, int iFlags)
 
bool Save (C4Group &hGroup, const char *szName)
 
void GrabFrom (C4FacetSurface &rSource)
 
bool CopyFromSfcMaxSize (C4Surface &srcSfc, int32_t iMaxSize, uint32_t dwColor=0u)
 
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

C4SurfaceSurface
 
float X
 
float Y
 
float Wdt
 
float Hgt
 

Detailed Description

Definition at line 31 of file C4FacetEx.h.

Constructor & Destructor Documentation

C4FacetSurface::C4FacetSurface ( )
inline

Definition at line 40 of file C4FacetEx.h.

References Default().

40 { Default(); }
void Default()
Definition: C4FacetEx.h:43

Here is the call graph for this function:

C4FacetSurface::~C4FacetSurface ( )
inline

Definition at line 41 of file C4FacetEx.h.

References Clear().

41 { Clear(); }
void Clear()
Definition: C4FacetEx.h:44

Here is the call graph for this function:

Member Function Documentation

void C4FacetSurface::Clear ( )
inline

Definition at line 44 of file C4FacetEx.h.

References C4Surface::Clear().

Referenced by C4FacetID::Clear(), C4Menu::Clear(), C4MapFolderData::Clear(), CopyFromSfcMaxSize(), Create(), CreateClrByOwner(), C4RoundResultsPlayer::EvaluatePlayer(), GrabFrom(), Load(), C4ScenarioListLoader::Entry::Load(), Set(), C4GUI::Picture::SetFacet(), ~C4FacetSurface(), and C4MenuItem::~C4MenuItem().

44 { Face.Clear(); }
void Clear()
Definition: C4Surface.cpp:126

Here is the call graph for this function:

Here is the caller graph for this function:

bool C4FacetSurface::CopyFromSfcMaxSize ( C4Surface srcSfc,
int32_t  iMaxSize,
uint32_t  dwColor = 0u 
)

Definition at line 105 of file C4FacetEx.cpp.

References C4Draw::Blit(), Clear(), C4Surface::Copy(), Create(), C4Surface::Hgt, C4Facet::Hgt, pDraw, Set(), C4Facet::Set(), C4Surface::SetClr(), C4Surface::Wdt, and C4Facet::Wdt.

106 {
107  // safety
108  if (!srcSfc.Wdt || !srcSfc.Hgt) return false;
109  Clear();
110  // no scale?
111  bool fNeedsScale = !(srcSfc.Wdt <= iMaxSize && srcSfc.Hgt <= iMaxSize);
112  if (!fNeedsScale && !dwColor)
113  {
114  // no change necessary; just copy then
115  Face.Copy(srcSfc);
116  }
117  else
118  {
119  // must scale down or colorize. Just blit.
120  C4Facet fctSource;
121  fctSource.Set(&srcSfc, 0,0,srcSfc.Wdt,srcSfc.Hgt);
122  int32_t iTargetWdt, iTargetHgt;
123  if (fNeedsScale)
124  {
125  if (fctSource.Wdt > fctSource.Hgt)
126  {
127  iTargetWdt = iMaxSize;
128  iTargetHgt = fctSource.Hgt * iTargetWdt / fctSource.Wdt;
129  }
130  else
131  {
132  iTargetHgt = iMaxSize;
133  iTargetWdt = fctSource.Wdt * iTargetHgt / fctSource.Hgt;
134  }
135  }
136  else
137  {
138  iTargetWdt = fctSource.Wdt;
139  iTargetHgt = fctSource.Hgt;
140  }
141  if (dwColor) srcSfc.SetClr(dwColor);
142  Create(iTargetWdt, iTargetHgt);
143  pDraw->Blit(&srcSfc, 0.0f,0.0f,float(fctSource.Wdt),float(fctSource.Hgt),
144  &Face, 0,0,iTargetWdt,iTargetHgt);
145  }
146  Set(&Face, 0,0, Face.Wdt, Face.Hgt);
147  return true;
148 }
int Wdt
Definition: C4Surface.h:65
void Set(C4Surface &rSfc)
Definition: C4Facet.cpp:459
int Hgt
Definition: C4Surface.h:65
void Set(const C4Facet &cpy)
Definition: C4FacetEx.h:46
void SetClr(DWORD toClr)
Definition: C4Surface.h:132
C4Draw * pDraw
Definition: C4Draw.cpp:42
bool Copy(C4Surface &fromSfc)
Definition: C4Surface.cpp:184
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
bool Create(int iWdt, int iHgt, int iWdt2=C4FCT_Full, int iHgt2=C4FCT_Full)
Definition: C4FacetEx.cpp:54
float Wdt
Definition: C4Facet.h:118
void Clear()
Definition: C4FacetEx.h:44

Here is the call graph for this function:

bool C4FacetSurface::Create ( int  iWdt,
int  iHgt,
int  iWdt2 = C4FCT_Full,
int  iHgt2 = C4FCT_Full 
)

Definition at line 54 of file C4FacetEx.cpp.

References C4FCT_Full, C4FCT_Height, C4FCT_Width, Clear(), C4Surface::Create(), C4Surface::Default(), C4Surface::Hgt, Set(), and C4Surface::Wdt.

Referenced by C4MainMenu::ActivateClient(), C4MainMenu::ActivateGoals(), C4MainMenu::ActivateHostility(), C4MainMenu::ActivateMain(), C4Object::ActivateMenu(), C4MainMenu::ActivateRules(), C4MainMenu::ActivateSurrender(), CopyFromSfcMaxSize(), C4MainMenu::DoRefillInternal(), C4RankSystem::DrawRankSymbol(), EnsureOwnSurface(), C4GUI::Picture::EnsureOwnSurface(), C4RoundResultsPlayer::EvaluatePlayer(), C4StartupPlrSelDlg::PlayerListItem::Load(), C4MapFolderData::Load(), C4GUI::PaintBox::PaintBox(), C4Object::Picture2Facet(), and C4StartupPlrSelDlg::PlayerListItem::UpdateCore().

55 {
56  Clear();
57  // Create surface
58  Face.Default();
59  if (!Face.Create(iWdt,iHgt)) return false;
60  // Set facet
61  if (iWdt2==C4FCT_Full) iWdt2=Face.Wdt; if (iWdt2==C4FCT_Height) iWdt2=Face.Hgt; if (iWdt2==C4FCT_Width) iWdt2=Face.Wdt;
62  if (iHgt2==C4FCT_Full) iHgt2=Face.Hgt; if (iHgt2==C4FCT_Height) iHgt2=Face.Hgt; if (iHgt2==C4FCT_Width) iHgt2=Face.Wdt;
63  Set(&Face,0,0,iWdt2,iHgt2);
64  return true;
65 }
int Wdt
Definition: C4Surface.h:65
void Default()
Definition: C4Surface.cpp:71
const int C4FCT_Height
Definition: C4FacetEx.h:27
int Hgt
Definition: C4Surface.h:65
void Set(const C4Facet &cpy)
Definition: C4FacetEx.h:46
const int C4FCT_Width
Definition: C4FacetEx.h:28
bool Create(int iWdt, int iHgt, int iFlags=0)
Definition: C4Surface.cpp:161
const int C4FCT_Full
Definition: C4FacetEx.h:26
void Clear()
Definition: C4FacetEx.h:44

Here is the call graph for this function:

Here is the caller graph for this function:

bool C4FacetSurface::CreateClrByOwner ( C4Surface pBySurface)

Definition at line 67 of file C4FacetEx.cpp.

References Clear(), C4Surface::CreateColorByOwner(), C4Surface::Hgt, Set(), and C4Surface::Wdt.

Referenced by C4GraphicsResource::Init().

68 {
69  Clear();
70  // create surface
71  if (!Face.CreateColorByOwner(pBySurface)) return false;
72  // set facet
73  Set(&Face,0,0,Face.Wdt,Face.Hgt);
74  // success
75  return true;
76 }
int Wdt
Definition: C4Surface.h:65
bool CreateColorByOwner(C4Surface *pBySurface)
Definition: C4Surface.cpp:255
int Hgt
Definition: C4Surface.h:65
void Set(const C4Facet &cpy)
Definition: C4FacetEx.h:46
void Clear()
Definition: C4FacetEx.h:44

Here is the call graph for this function:

Here is the caller graph for this function:

void C4FacetSurface::Default ( )
inline

Definition at line 43 of file C4FacetEx.h.

References C4Surface::Default(), and C4Facet::Default().

Referenced by C4Object::ActivateMenu(), C4MainMenu::ActivateNewPlayer(), C4FacetSurface(), C4MenuItem::C4MenuItem(), C4ParticleDef::C4ParticleDef(), C4Player::C4Player(), C4FacetID::Default(), C4Menu::Default(), C4MainMenu::DoRefillInternal(), C4ObjectMenu::DoRefillInternal(), and GrabFrom().

43 { Face.Default(); C4Facet::Default(); }
void Default()
Definition: C4Surface.cpp:71
void Default()
Definition: C4Facet.cpp:31

Here is the call graph for this function:

Here is the caller graph for this function:

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.

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(), C4StartupAboutDlg::DrawElement(), C4StartupPlrPropertiesDlg::DrawElement(), C4GUI::WoodenLabel::DrawElement(), C4GUI::Picture::DrawElement(), C4GUI::OverlayPicture::DrawElement(), C4GUI::ScrollBar::DrawElement(), C4GUI::PaintBox::DrawElement(), C4GUI::ContextMenu::Entry::DrawElement(), C4GUI::ContextButton::DrawElement(), C4Facet::DrawEnergyLevelEx(), C4Player::DrawHostility(), C4EditCursor::DrawObject(), C4Viewport::DrawPlayerStartup(), C4RankSystem::DrawRankSymbol(), C4Facet::DrawValue(), C4Facet::DrawValue2(), EnsureOwnSurface(), C4GUI::Picture::EnsureOwnSurface(), C4RoundResultsPlayer::EvaluatePlayer(), C4ScenarioListLoader::Entry::Load(), and C4Object::Picture2Facet().

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 }
float Y
Definition: C4Facet.h:118
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
C4Surface * Surface
Definition: C4Facet.h:117
float Wdt
Definition: C4Facet.h:118
float X
Definition: C4Facet.h:118

Here is the call graph for this function:

Here is the caller graph for this function:

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.

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

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 }
float Y
Definition: C4Facet.h:118
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
C4Surface * Surface
Definition: C4Facet.h:117
float Wdt
Definition: C4Facet.h:118
float X
Definition: C4Facet.h:118

Here is the call graph for this function:

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

Definition at line 213 of file C4Facet.cpp.

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

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

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

Here is the call graph for this function:

Here is the caller graph for this function:

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.

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

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 }
float Y
Definition: C4Facet.h:118
void Draw(C4Facet &cgo, bool fAspect=true, int32_t iPhaseX=0, int32_t iPhaseY=0, bool fTransparent=true)
Definition: C4Facet.cpp:154
C4Draw * pDraw
Definition: C4Draw.cpp:42
float Hgt
Definition: C4Facet.h:118
C4Surface * Surface
Definition: C4Facet.h:117
float X
Definition: C4Facet.h:118

Here is the call graph for this function:

void C4Facet::DrawFullScreen ( C4Facet cgo)
inherited

Definition at line 184 of file C4Facet.cpp.

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

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

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 }
float Y
Definition: C4Facet.h:118
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
C4Surface * Surface
Definition: C4Facet.h:117
float Wdt
Definition: C4Facet.h:118
float X
Definition: C4Facet.h:118

Here is the call graph for this function:

Here is the caller graph for this function:

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.

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

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

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 }
float Y
Definition: C4Facet.h:118
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
C4Surface * Surface
Definition: C4Facet.h:117
float Wdt
Definition: C4Facet.h:118
float X
Definition: C4Facet.h:118

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 86 of file C4Facet.cpp.

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

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 }
float Y
Definition: C4Facet.h:118
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
C4Surface * Surface
Definition: C4Facet.h:117
float Wdt
Definition: C4Facet.h:118
float X
Definition: C4Facet.h:118

Here is the call graph for this function:

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.

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

Referenced by C4DefGraphics::Draw().

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 }
float Y
Definition: C4Facet.h:118
C4Draw * pDraw
Definition: C4Draw.cpp:42
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
float Hgt
Definition: C4Facet.h:118
C4Surface * Surface
Definition: C4Facet.h:117
float Wdt
Definition: C4Facet.h:118
float X
Definition: C4Facet.h:118

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 125 of file C4Facet.cpp.

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

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 }
float Y
Definition: C4Facet.h:118
C4Draw * pDraw
Definition: C4Draw.cpp:42
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
float Hgt
Definition: C4Facet.h:118
C4Surface * Surface
Definition: C4Facet.h:117
float Wdt
Definition: C4Facet.h:118
float X
Definition: C4Facet.h:118

Here is the call graph for this function:

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.

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().

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 }
float Y
Definition: C4Facet.h:118
#define sprintf
Definition: Standard.h:164
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:567
const int ARight
Definition: C4Surface.h:41
bool GetTextExtent(const char *szText, int32_t &rsx, int32_t &rsy, bool fCheckMarkup=true)
const int32_t C4FCT_Right
Definition: C4Facet.h:28
void Set(C4Surface &rSfc)
Definition: C4Facet.cpp:459
C4GraphicsResource GraphicsResource
void Draw(C4Facet &cgo, bool fAspect=true, int32_t iPhaseX=0, int32_t iPhaseY=0, bool fTransparent=true)
Definition: C4Facet.cpp:154
C4Draw * pDraw
Definition: C4Draw.cpp:42
float Hgt
Definition: C4Facet.h:118
const int32_t C4FCT_Center
Definition: C4Facet.h:31
C4Surface * Surface
Definition: C4Facet.h:117
float Wdt
Definition: C4Facet.h:118
float X
Definition: C4Facet.h:118

Here is the call graph for this function:

Here is the caller graph for this function:

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.

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().

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 }
float Y
Definition: C4Facet.h:118
#define sprintf
Definition: Standard.h:164
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:567
const int ARight
Definition: C4Surface.h:41
bool GetTextExtent(const char *szText, int32_t &rsx, int32_t &rsy, bool fCheckMarkup=true)
const int32_t C4FCT_Right
Definition: C4Facet.h:28
void Set(C4Surface &rSfc)
Definition: C4Facet.cpp:459
C4GraphicsResource GraphicsResource
void Draw(C4Facet &cgo, bool fAspect=true, int32_t iPhaseX=0, int32_t iPhaseY=0, bool fTransparent=true)
Definition: C4Facet.cpp:154
C4Draw * pDraw
Definition: C4Draw.cpp:42
float Hgt
Definition: C4Facet.h:118
const int32_t C4FCT_Center
Definition: C4Facet.h:31
C4Surface * Surface
Definition: C4Facet.h:117
float Wdt
Definition: C4Facet.h:118
float X
Definition: C4Facet.h:118

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 230 of file C4Facet.cpp.

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

231 {
232  // set ColorByOwner-color
233  Surface->SetClr(dwClr);
234  // draw
235  DrawValue2(cgo, iValue1, iValue2);
236 }
void SetClr(DWORD toClr)
Definition: C4Surface.h:132
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
C4Surface * Surface
Definition: C4Facet.h:117

Here is the call graph for this function:

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.

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

Referenced by C4LoaderScreen::Draw(), C4SolidMask::Draw(), C4EditCursor::Draw(), C4GUI::Element::DrawBar(), C4GUI::Tabular::Sheet::DrawCaption(), C4StartupMainDlg::DrawElement(), 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(), C4RankSystem::DrawRankSymbol(), and C4Facet::DrawXClr().

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 }
float Y
Definition: C4Facet.h:118
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
C4Surface * Surface
Definition: C4Facet.h:117
float Wdt
Definition: C4Facet.h:118
float X
Definition: C4Facet.h:118

Here is the call graph for this function:

Here is the caller graph for this function:

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.

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

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
void SetClr(DWORD toClr)
Definition: C4Surface.h:132
C4Surface * Surface
Definition: C4Facet.h:117

Here is the call graph for this function:

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

Definition at line 368 of file C4Facet.cpp.

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

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

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 }
float Y
Definition: C4Facet.h:118
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
C4Surface * Surface
Definition: C4Facet.h:117
float Wdt
Definition: C4Facet.h:118
float X
Definition: C4Facet.h:118

Here is the call graph for this function:

Here is the caller graph for this function:

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.

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

Referenced by C4SolidMask::Draw().

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 }
float Y
Definition: C4Facet.h:118
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
void SetRotate(float iAngle, float fOffX, float fOffY)
C4Surface * Surface
Definition: C4Facet.h:117
float Wdt
Definition: C4Facet.h:118
float X
Definition: C4Facet.h:118

Here is the call graph for this function:

Here is the caller graph for this function:

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.

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

Referenced by C4Game::DrawTextSpecImage().

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 }
float Y
Definition: C4Facet.h:118
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
C4Surface * Surface
Definition: C4Facet.h:117
float Wdt
Definition: C4Facet.h:118
float X
Definition: C4Facet.h:118

Here is the call graph for this function:

Here is the caller graph for this function:

bool C4FacetSurface::EnsureOwnSurface ( )

Definition at line 156 of file C4FacetEx.cpp.

References Create(), C4Facet::Draw(), C4Facet::Hgt, C4Facet::Surface, and C4Facet::Wdt.

157 {
158  // is it a link?
159  if (Surface != &Face)
160  {
161  // then recreate in same size
162  C4Facet fctOld = *this;
163  if (!Create(fctOld.Wdt, fctOld.Hgt)) return false;
164  fctOld.Draw(*this);
165  }
166  return true;
167 }
void Draw(C4Facet &cgo, bool fAspect=true, int32_t iPhaseX=0, int32_t iPhaseY=0, bool fTransparent=true)
Definition: C4Facet.cpp:154
float Hgt
Definition: C4Facet.h:118
bool Create(int iWdt, int iHgt, int iWdt2=C4FCT_Full, int iHgt2=C4FCT_Full)
Definition: C4FacetEx.cpp:54
C4Surface * Surface
Definition: C4Facet.h:117
float Wdt
Definition: C4Facet.h:118

Here is the call graph for this function:

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.

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

465 {
466  X-=iLeft; Wdt+=iLeft;
467  Wdt+=iRight;
468  Y-=iTop; Hgt+=iTop;
469  Hgt+=iBottom;
470 }
float Y
Definition: C4Facet.h:118
float Hgt
Definition: C4Facet.h:118
float Wdt
Definition: C4Facet.h:118
float X
Definition: C4Facet.h:118
C4Surface& C4FacetSurface::GetFace ( )
inline

Definition at line 52 of file C4FacetEx.h.

Referenced by C4GUI::Picture::EnsureOwnSurface(), C4LoaderScreen::Init(), C4StartupGraphics::Init(), C4StartupPlrPropertiesDlg::OnClosed(), and C4ObjectInfo::Save().

52 { return Face; } // get internal face

Here is the caller graph for this function:

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.

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

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 }
float Y
Definition: C4Facet.h:118
const int32_t C4FCT_Right
Definition: C4Facet.h:28
void Set(C4Surface &rSfc)
Definition: C4Facet.cpp:459
const int32_t C4FCT_Bottom
Definition: C4Facet.h:30
float Hgt
Definition: C4Facet.h:118
const int32_t C4FCT_Center
Definition: C4Facet.h:31
C4Surface * Surface
Definition: C4Facet.h:117
float Wdt
Definition: C4Facet.h:118
float X
Definition: C4Facet.h:118

Here is the call graph for this function:

int32_t C4Facet::GetHeightByWidth ( int32_t  iWidth)
inlineinherited

Definition at line 155 of file C4Facet.h.

156  { return iWidth * Hgt / (Wdt ? Wdt : 1); }
float Hgt
Definition: C4Facet.h:118
float Wdt
Definition: C4Facet.h:118
C4Facet C4Facet::GetPhase ( int  iPhaseX = 0,
int  iPhaseY = 0 
)
inherited

Definition at line 59 of file C4Facet.cpp.

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().

60 {
61  C4Facet fctResult;
62  fctResult.Set(Surface,X+Wdt*iPhaseX,Y+Hgt*iPhaseY,Wdt,Hgt);
63  return fctResult;
64 }
float Y
Definition: C4Facet.h:118
void Set(C4Surface &rSfc)
Definition: C4Facet.cpp:459
float Hgt
Definition: C4Facet.h:118
C4Surface * Surface
Definition: C4Facet.h:117
float Wdt
Definition: C4Facet.h:118
float X
Definition: C4Facet.h:118

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 472 of file C4Facet.cpp.

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

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

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
float Hgt
Definition: C4Facet.h:118
C4Surface * Surface
Definition: C4Facet.h:117
float Wdt
Definition: C4Facet.h:118

Here is the caller graph for this function:

C4Facet C4Facet::GetSection ( int32_t  iSection)
inherited

Definition at line 52 of file C4Facet.cpp.

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

53 {
54  C4Facet rval;
55  rval.Set(Surface,X+Hgt*iSection,Y,Hgt,Hgt);
56  return rval;
57 }
float Y
Definition: C4Facet.h:118
void Set(C4Surface &rSfc)
Definition: C4Facet.cpp:459
float Hgt
Definition: C4Facet.h:118
C4Surface * Surface
Definition: C4Facet.h:117
float X
Definition: C4Facet.h:118

Here is the call graph for this function:

int32_t C4Facet::GetSectionCount ( )
inherited

Definition at line 46 of file C4Facet.cpp.

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

Referenced by C4IDList::Draw().

47 {
48  if (Hgt==0) return 0;
49  return Wdt/Hgt;
50 }
float Hgt
Definition: C4Facet.h:118
float Wdt
Definition: C4Facet.h:118

Here is the caller graph for this function:

int32_t C4Facet::GetWidthByHeight ( int32_t  iHeight)
inlineinherited

Definition at line 153 of file C4Facet.h.

Referenced by C4StartupPlrPropertiesDlg::C4StartupPlrPropertiesDlg().

154  { return iHeight * Wdt / (Hgt ? Hgt : 1); }
float Hgt
Definition: C4Facet.h:118
float Wdt
Definition: C4Facet.h:118

Here is the caller graph for this function:

void C4FacetSurface::GrabFrom ( C4FacetSurface rSource)
inline

Definition at line 57 of file C4FacetEx.h.

References Clear(), Default(), C4Facet::Hgt, C4Surface::MoveFrom(), Set(), C4Facet::Surface, C4Facet::Wdt, C4Facet::X, and C4Facet::Y.

Referenced by C4Menu::DoInit(), and C4MenuItem::GrabSymbol().

58  {
59  Clear(); Default();
60  Face.MoveFrom(&rSource.Face);
61  Set(rSource.Surface == &rSource.Face ? &Face : rSource.Surface, rSource.X, rSource.Y, rSource.Wdt, rSource.Hgt);
62  rSource.Default();
63  }
float Y
Definition: C4Facet.h:118
void MoveFrom(C4Surface *psfcFrom)
Definition: C4Surface.cpp:94
void Set(const C4Facet &cpy)
Definition: C4FacetEx.h:46
void Default()
Definition: C4FacetEx.h:43
float Hgt
Definition: C4Facet.h:118
C4Surface * Surface
Definition: C4Facet.h:117
float Wdt
Definition: C4Facet.h:118
float X
Definition: C4Facet.h:118
void Clear()
Definition: C4FacetEx.h:44

Here is the call graph for this function:

Here is the caller graph for this function:

void C4FacetSurface::Grayscale ( int32_t  iOffset = 0)

Definition at line 150 of file C4FacetEx.cpp.

References C4Draw::Grayscale(), C4Facet::Hgt, pDraw, C4Facet::Surface, and C4Facet::Wdt.

151 {
152  if (!pDraw || !Surface || !Wdt || !Hgt) return;
153  pDraw->Grayscale(Surface, iOffset);
154 }
void Grayscale(C4Surface *sfcSfc, int32_t iOffset=0)
Definition: C4Draw.cpp:701
C4Draw * pDraw
Definition: C4Draw.cpp:42
float Hgt
Definition: C4Facet.h:118
C4Surface * Surface
Definition: C4Facet.h:117
float Wdt
Definition: C4Facet.h:118

Here is the call graph for this function:

bool C4FacetSurface::Load ( C4Group hGroup,
const char *  szName,
int  iWdt,
int  iHgt,
bool  fNoErrIfNotFound,
int  iFlags 
)

Definition at line 78 of file C4FacetEx.cpp.

References _MAX_FNAME, C4FCT_Full, C4FCT_Height, C4FCT_Width, Clear(), EnforceExtension(), C4Group::FindEntry(), GetExtension(), C4Surface::Hgt, C4Surface::Load(), SCopy(), Set(), and C4Surface::Wdt.

Referenced by C4AchievementGraphics::Init(), C4LoaderScreen::Init(), C4ScenarioListLoader::Entry::Load(), C4ParticleDef::Load(), C4StartupPlrSelDlg::PlayerListItem::Load(), C4Player::Load(), C4MapFolderData::Load(), C4PlayerInfo::LoadBigIcon(), and C4GraphicsResource::LoadFile().

79 {
80  Clear();
81  // Entry name
82  char szFilename[_MAX_FNAME+1];
83  SCopy(szName,szFilename,_MAX_FNAME);
84  char *szExt = GetExtension(szFilename);
85  if (!*szExt)
86  {
87  // no extension: Default to extension that is found as file in group
88  const char * const extensions[] = { "png", "bmp", "jpeg", "jpg", nullptr };
89  int i = 0; const char *szExt;
90  while ((szExt = extensions[i++]))
91  {
92  EnforceExtension(szFilename, szExt);
93  if (hGroup.FindEntry(szFilename)) break;
94  }
95  }
96  // Load surface
97  if (!Face.Load(hGroup,szFilename,false,fNoErrIfNotFound, iFlags)) return false;
98  // Set facet
99  if (iWdt==C4FCT_Full) iWdt=Face.Wdt; if (iWdt==C4FCT_Height) iWdt=Face.Hgt; if (iWdt==C4FCT_Width) iWdt=Face.Wdt;
100  if (iHgt==C4FCT_Full) iHgt=Face.Hgt; if (iHgt==C4FCT_Height) iHgt=Face.Hgt; if (iHgt==C4FCT_Width) iHgt=Face.Wdt;
101  Set(&Face,0,0,iWdt,iHgt);
102  return true;
103 }
bool FindEntry(const char *szWildCard, StdStrBuf *sFileName=nullptr, size_t *iSize=nullptr)
Definition: C4Group.cpp:1774
void SCopy(const char *szSource, char *sTarget, size_t iMaxL)
Definition: Standard.cpp:152
int Wdt
Definition: C4Surface.h:65
const int C4FCT_Height
Definition: C4FacetEx.h:27
int Hgt
Definition: C4Surface.h:65
void Set(const C4Facet &cpy)
Definition: C4FacetEx.h:46
const int C4FCT_Width
Definition: C4FacetEx.h:28
#define _MAX_FNAME
char * GetExtension(char *szFilename)
Definition: StdFile.cpp:121
bool Load(C4Group &hGroup, const char *szFilename, bool fOwnPal, bool fNoErrIfNotFound, int iFlags)
void EnforceExtension(char *szFilename, const char *szExtension)
Definition: StdFile.cpp:289
const int C4FCT_Full
Definition: C4FacetEx.h:26
void Clear()
Definition: C4FacetEx.h:44

Here is the call graph for this function:

Here is the caller graph for this function:

bool C4FacetSurface::Save ( C4Group hGroup,
const char *  szName 
)
void C4FacetSurface::Set ( const C4Facet cpy)
inline

Definition at line 46 of file C4FacetEx.h.

References Clear(), and C4Facet::Set().

Referenced by CopyFromSfcMaxSize(), Create(), CreateClrByOwner(), C4Menu::DoInitRefSym(), C4ObjectMenu::DoRefillInternal(), C4RankSystem::DrawRankSymbol(), GrabFrom(), C4StartupGraphics::Init(), C4GraphicsResource::Init(), Load(), C4ParticleDef::Load(), C4ScenarioListLoader::Scenario::LoadCustomPre(), C4Object::Picture2Facet(), C4MenuItem::RefSymbol(), and C4GUI::Picture::SetFacet().

46 { Clear(); C4Facet::Set(cpy); }
void Set(C4Surface &rSfc)
Definition: C4Facet.cpp:459
void Clear()
Definition: C4FacetEx.h:44

Here is the call graph for this function:

Here is the caller graph for this function:

void C4FacetSurface::Set ( C4Surface nsfc,
int  nx,
int  ny,
int  nwdt,
int  nhgt 
)
inline

Definition at line 47 of file C4FacetEx.h.

References C4Facet::Set().

48  { C4Facet::Set(nsfc, nx,ny,nwdt,nhgt); }
void Set(C4Surface &rSfc)
Definition: C4Facet.cpp:459

Here is the call graph for this function:

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

Definition at line 36 of file C4Facet.cpp.

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

37 {
38  Surface=nsfc; X=nx; Y=ny; Wdt=nwdt; Hgt=nhgt;
39 }
float Y
Definition: C4Facet.h:118
float Hgt
Definition: C4Facet.h:118
C4Surface * Surface
Definition: C4Facet.h:117
float Wdt
Definition: C4Facet.h:118
float X
Definition: C4Facet.h:118
C4Facet C4Facet::Truncate ( int32_t  iAlign,
int32_t  iSize 
)
inherited

Definition at line 284 of file C4Facet.cpp.

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().

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 }
float Y
Definition: C4Facet.h:118
const int32_t C4FCT_Right
Definition: C4Facet.h:28
void Set(C4Surface &rSfc)
Definition: C4Facet.cpp:459
const int32_t C4FCT_Bottom
Definition: C4Facet.h:30
const int32_t C4FCT_Left
Definition: C4Facet.h:27
float Hgt
Definition: C4Facet.h:118
C4Surface * Surface
Definition: C4Facet.h:117
float Wdt
Definition: C4Facet.h:118
float X
Definition: C4Facet.h:118
int iSize
Definition: TstC4NetIO.cpp:32
const int32_t C4FCT_Top
Definition: C4Facet.h:29

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 250 of file C4Facet.cpp.

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().

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 }
float Y
Definition: C4Facet.h:118
const int32_t C4FCT_Alignment
Definition: C4Facet.h:33
const int32_t C4FCT_Right
Definition: C4Facet.h:28
const int32_t C4FCT_Double
Definition: C4Facet.h:36
const int32_t C4FCT_Half
Definition: C4Facet.h:35
void Set(C4Surface &rSfc)
Definition: C4Facet.cpp:459
const int32_t C4FCT_Bottom
Definition: C4Facet.h:30
const int32_t C4FCT_Left
Definition: C4Facet.h:27
float Hgt
Definition: C4Facet.h:118
const int32_t C4FCT_Triple
Definition: C4Facet.h:37
C4Surface * Surface
Definition: C4Facet.h:117
float Wdt
Definition: C4Facet.h:118
float X
Definition: C4Facet.h:118
const int32_t C4FCT_Top
Definition: C4Facet.h:29

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

float C4Facet::Hgt
inherited

Definition at line 118 of file C4Facet.h.

Referenced by C4MainMenu::ActivateGoals(), CopyFromSfcMaxSize(), C4UpperBoard::Draw(), C4LoaderScreen::Draw(), C4Sky::Draw(), C4PXSSystem::Draw(), C4MessageBoard::Draw(), C4GameMessage::Draw(), C4Landscape::Draw(), C4DefGraphics::Draw(), C4SolidMask::Draw(), C4EditCursor::Draw(), C4IDList::Draw(), C4Viewport::Draw(), C4Facet::Draw(), C4LandscapeRenderGL::Draw(), C4Def::Draw(), C4Object::Draw(), C4GraphicsOverlay::Draw(), C4GUI::FrameDecoration::Draw(), C4GUI::Dialog::Draw(), C4GUI::CMouse::Draw(), C4GUI::Screen::Draw(), C4Object::DrawActionFace(), C4GUI::Element::DrawBar(), C4GUI::Tabular::Sheet::DrawCaption(), C4ScriptGuiWindow::DrawChildren(), C4StartupMainDlg::DrawElement(), C4MenuItem::DrawElement(), C4Menu::DrawElement(), C4GUI::Picture::DrawElement(), C4GUI::OverlayPicture::DrawElement(), C4GUI::ContextMenu::Entry::DrawElement(), C4GUI::ComboBox::DrawElement(), C4GUI::FullscreenDialog::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(), EnsureOwnSurface(), C4GUI::Picture::EnsureOwnSurface(), C4RoundResultsPlayer::EvaluatePlayer(), C4Facet::Expand(), C4GUI::Tabular::Sheet::GetCaptionSize(), C4GUI::ArrowButton::GetDefaultHeight(), C4Object::GetDrawPosition(), C4Facet::GetFraction(), C4Facet::GetPhase(), C4Facet::GetPhaseNum(), C4Facet::GetSection(), C4Facet::GetSectionCount(), C4Game::GetTextSpecImageAspect(), C4Object::GetViewPosPar(), GrabFrom(), Grayscale(), C4EditCursor::HasTransformMarker(), C4UpperBoard::Init(), C4StartupGraphics::Init(), C4GraphicsResource::Init(), C4Menu::InitLocation(), C4EditCursor::IsHoveringTransformMarker(), C4ScenarioListLoader::Entry::Load(), C4ParticleDef::Load(), C4MapFolderData::Load(), C4TargetFacet::operator=(), C4Object::Picture2Facet(), C4ViewportList::RecalculateViewports(), C4TargetRect::Set(), C4Facet::Set(), C4Object::SetAudibilityAt(), C4GUI::FrameDecoration::SetByDef(), C4GUI::Tabular::SetGfx(), C4GUI::DynBarFacet::SetHorizontal(), C4TargetFacet::SetRect(), C4Facet::Truncate(), C4Facet::TruncateSection(), C4Menu::UpdateElementPositions(), and C4ScriptGuiWindow::UpdateLayout().

C4Surface* C4Facet::Surface
inherited

Definition at line 117 of file C4Facet.h.

Referenced by C4MainMenu::ActivateGoals(), C4TargetFacet::Clear(), C4ObjectMenu::DoRefillInternal(), C4UpperBoard::Draw(), C4TransferZone::Draw(), C4LoaderScreen::Draw(), C4Sky::Draw(), C4PXSSystem::Draw(), C4MessageBoard::Draw(), C4GameMessage::Draw(), C4Landscape::Draw(), C4DefGraphics::Draw(), C4SolidMask::Draw(), C4IDList::Draw(), C4EditCursor::Draw(), C4PathFinderRay::Draw(), C4Viewport::Draw(), C4MouseControl::Draw(), C4Facet::Draw(), C4LandscapeRenderGL::Draw(), C4Def::Draw(), C4Object::Draw(), C4GraphicsOverlay::Draw(), C4ScriptGuiWindow::Draw(), C4GUI::ContextMenu::Draw(), C4GUI::FrameDecoration::Draw(), C4GUI::Dialog::Draw(), C4GUI::CMouse::Draw(), C4GUI::Screen::Draw(), C4GUI::Element::Draw3DFrame(), C4GUI::Element::DrawBar(), C4GUI::Tabular::Sheet::DrawCaption(), C4Facet::DrawClr(), C4Game::DrawCrewOverheadText(), C4StartupMainDlg::DrawElement(), C4ScoreboardDlg::DrawElement(), C4MenuItem::DrawElement(), C4StartupNetListEntry::DrawElement(), C4Chart::DrawElement(), C4StartupPlrPropertiesDlg::DrawElement(), C4Menu::DrawElement(), 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(), 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(), EnsureOwnSurface(), C4GUI::Picture::EnsureOwnSurface(), C4RoundResultsPlayer::EvaluatePlayer(), C4Facet::GetFraction(), C4GUI::WoodenLabel::GetLeftIndent(), C4Def::GetMainFace(), C4Facet::GetPhase(), C4Facet::GetPhaseNum(), C4Facet::GetSection(), CStdFont::GetUnicodeCharacterFacet(), C4StartupPlrSelDlg::PlayerListItem::GrabCustomIcon(), GrabFrom(), C4MenuItem::GrabSymbol(), Grayscale(), C4UpperBoard::Init(), C4StartupGraphics::Init(), C4GraphicsResource::Init(), C4GraphicsOverlay::IsValid(), C4ScenarioListLoader::Entry::Load(), C4ParticleDef::Load(), C4MapFolderData::Load(), C4StartupPlrPropertiesDlg::OnClosed(), C4TargetFacet::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().

float C4Facet::Wdt
inherited

Definition at line 118 of file C4Facet.h.

Referenced by C4MainMenu::ActivateGoals(), CStdFont::AddRenderedChar(), CopyFromSfcMaxSize(), C4UpperBoard::Draw(), C4LoaderScreen::Draw(), C4Sky::Draw(), C4PXSSystem::Draw(), C4MessageBoard::Draw(), C4GameMessage::Draw(), C4Landscape::Draw(), C4DefGraphics::Draw(), C4SolidMask::Draw(), C4EditCursor::Draw(), C4IDList::Draw(), C4Viewport::Draw(), C4Facet::Draw(), C4LandscapeRenderGL::Draw(), C4Def::Draw(), C4Object::Draw(), C4GraphicsOverlay::Draw(), C4GUI::FrameDecoration::Draw(), C4GUI::Dialog::Draw(), C4GUI::CMouse::Draw(), C4GUI::Screen::Draw(), C4Object::DrawActionFace(), C4GUI::Element::DrawBar(), C4GUI::Tabular::Sheet::DrawCaption(), C4ScriptGuiWindow::DrawChildren(), C4Game::DrawCrewOverheadText(), C4StartupMainDlg::DrawElement(), C4MenuItem::DrawElement(), C4Menu::DrawElement(), C4GUI::Picture::DrawElement(), C4GUI::OverlayPicture::DrawElement(), C4GUI::ContextMenu::Entry::DrawElement(), C4GUI::ComboBox::DrawElement(), C4GUI::FullscreenDialog::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(), EnsureOwnSurface(), C4GUI::Picture::EnsureOwnSurface(), C4GUI::ContextMenu::Entry::Entry(), C4RoundResultsPlayer::EvaluatePlayer(), C4Facet::Expand(), C4GUI::ArrowButton::GetDefaultWidth(), C4Object::GetDrawPosition(), C4Facet::GetFraction(), C4GUI::Tabular::GetLeftClipSize(), C4Facet::GetPhase(), C4Facet::GetPhaseNum(), C4Facet::GetSectionCount(), CStdFont::GetTextExtent(), C4Game::GetTextSpecImageAspect(), C4Object::GetViewPosPar(), GrabFrom(), Grayscale(), C4MessageBoard::Init(), C4StartupGraphics::Init(), C4GraphicsResource::Init(), C4Menu::InitLocation(), C4ScenarioListLoader::Entry::Load(), C4ParticleDef::Load(), C4MapFolderData::Load(), C4TargetFacet::operator=(), C4Object::Picture2Facet(), C4ViewportList::RecalculateViewports(), C4TargetRect::Set(), C4Facet::Set(), C4Object::SetAudibilityAt(), C4GUI::FrameDecoration::SetByDef(), C4GUI::Tabular::SetGfx(), C4GUI::DynBarFacet::SetHorizontal(), C4TargetFacet::SetRect(), C4Facet::Truncate(), C4Facet::TruncateSection(), C4Menu::UpdateElementPositions(), and C4ScriptGuiWindow::UpdateLayout().

float C4Facet::X
inherited

Definition at line 118 of file C4Facet.h.

Referenced by C4TransferZone::Draw(), C4Sky::Draw(), C4PXSSystem::Draw(), C4MessageBoard::Draw(), C4GameMessage::Draw(), C4Landscape::Draw(), C4DefGraphics::Draw(), C4SolidMask::Draw(), C4IDList::Draw(), C4EditCursor::Draw(), C4PathFinderRay::Draw(), C4Viewport::Draw(), C4MouseControl::Draw(), C4Facet::Draw(), C4LandscapeRenderGL::Draw(), C4Def::Draw(), C4Object::Draw(), C4GraphicsOverlay::Draw(), C4ScriptGuiWindow::Draw(), C4ParticleList::Draw(), C4GUI::Dialog::Draw(), C4GUI::CMouse::Draw(), C4Object::DrawActionFace(), C4ScriptGuiWindow::DrawAll(), C4GUI::Element::DrawBar(), C4GUI::Tabular::Sheet::DrawCaption(), C4ScriptGuiWindow::DrawChildren(), C4Game::DrawCrewOverheadText(), C4MenuItem::DrawElement(), C4StartupNetListEntry::DrawElement(), C4Menu::DrawElement(), C4GUI::Picture::DrawElement(), C4GUI::OverlayPicture::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(), GrabFrom(), C4TargetFacet::operator=(), C4ViewportList::RecalculateViewports(), C4TargetRect::Set(), C4Facet::Set(), C4Object::SetAudibilityAt(), C4GUI::DynBarFacet::SetHorizontal(), C4TargetFacet::SetRect(), C4Facet::Truncate(), C4Facet::TruncateSection(), C4MouseControl::UpdateCursorTarget(), and C4ScriptGuiWindow::UpdateLayout().

float C4Facet::Y
inherited

Definition at line 118 of file C4Facet.h.

Referenced by C4TransferZone::Draw(), C4Sky::Draw(), C4PXSSystem::Draw(), C4MessageBoard::Draw(), C4GameMessage::Draw(), C4Landscape::Draw(), C4DefGraphics::Draw(), C4SolidMask::Draw(), C4IDList::Draw(), C4EditCursor::Draw(), C4PathFinderRay::Draw(), C4Viewport::Draw(), C4MouseControl::Draw(), C4Facet::Draw(), C4LandscapeRenderGL::Draw(), C4Def::Draw(), C4Object::Draw(), C4GraphicsOverlay::Draw(), C4ScriptGuiWindow::Draw(), C4ParticleList::Draw(), C4GUI::Dialog::Draw(), C4GUI::CMouse::Draw(), C4Object::DrawActionFace(), C4ScriptGuiWindow::DrawAll(), C4ScriptGuiWindow::DrawChildren(), C4Game::DrawCrewOverheadText(), C4MenuItem::DrawElement(), C4StartupNetListEntry::DrawElement(), C4Menu::DrawElement(), C4GUI::Picture::DrawElement(), C4GUI::OverlayPicture::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(), GrabFrom(), C4TargetFacet::operator=(), C4ViewportList::RecalculateViewports(), C4TargetRect::Set(), C4Facet::Set(), C4Object::SetAudibilityAt(), C4GUI::DynBarFacet::SetHorizontal(), C4TargetFacet::SetRect(), C4Facet::Truncate(), C4Facet::TruncateSection(), C4MouseControl::UpdateCursorTarget(), and C4ScriptGuiWindow::UpdateLayout().


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