Pre-resize fillparent

This commit is contained in:
2018-08-13 22:22:10 -04:00
parent 58fa6f0503
commit 353dc21750
95 changed files with 478 additions and 437 deletions
@@ -13,15 +13,15 @@ using UtilityEngine::cUtility;
/*static*/ cGFX* cGFX::sp_inst = nullptr;
//private:
/// private:
cGFX::cGFX()
{}
cGFX::~cGFX()
{}
//public:
///Functions
/// public:
/// Functions
/*static*/ cGFX& cGFX::Inst()
{
if (sp_inst == nullptr)
@@ -48,13 +48,13 @@ void cGFX::StringDefault( const cString& text, const SDL_Rect& pos, const SDL_Co
cRenderer::Inst().ResetRenderTarget();
}
void cGFX::Box(const SDL_Rect& rect, const SDL_Colour& colour) const
void cGFX::Box( const SDL_Rect& rect, const SDL_Colour& colour ) const
{
if (boxRGBA(cRenderer::Inst().getRenderer(), (Sint16)rect.x, (Sint16)rect.y, (Sint16)rect.w, (Sint16)rect.h, colour.r, colour.g, colour.b, colour.a) < 0)
cUtility::Inst().Message("Unable to make Rounded Rectangle. boxRGBA():", __AT__, cUtility::eTypeSDL::GFX);
}
void cGFX::Box(const SDL_Rect& rect, const SDL_Colour& colour, SDL_Texture* texture) const
void cGFX::Box( const SDL_Rect& rect, const SDL_Colour& colour, SDL_Texture* texture ) const
{
cRenderer::Inst().SetRenderTarget(texture);
Box(rect, colour);
@@ -74,33 +74,33 @@ void cGFX::RoundedBox( const SDL_Rect& rect, const unsigned long int rad, const
cRenderer::Inst().ResetRenderTarget();
}
void cGFX::Pixel(const unsigned long int x, const unsigned long int y, const SDL_Colour& colour) const
void cGFX::Pixel( const unsigned long int x, const unsigned long int y, const SDL_Colour& colour ) const
{
if (pixelRGBA(cRenderer::Inst().getRenderer(), (Sint16)x, (Sint16)y, colour.r, colour.g, colour.b, colour.a) < 0)
cUtility::Inst().Message("Unable to make pixel. pixelRGBA():", __AT__, cUtility::eTypeSDL::GFX);
}
void cGFX::Pixel(const unsigned long int x, const unsigned long int y, const SDL_Colour& colour, SDL_Texture* texture) const
void cGFX::Pixel( const unsigned long int x, const unsigned long int y, const SDL_Colour& colour, SDL_Texture* texture ) const
{
cRenderer::Inst().SetRenderTarget(texture);
Pixel(x, y, colour);
cRenderer::Inst().ResetRenderTarget();
}
void cGFX::Rectangle(const SDL_Rect& rect, const SDL_Colour& colour) const
void cGFX::Rectangle( const SDL_Rect& rect, const SDL_Colour& colour ) const
{
if (rectangleRGBA(cRenderer::Inst().getRenderer(), (Sint16)rect.x, (Sint16)rect.y, (Sint16)rect.w, (Sint16)rect.h, colour.r, colour.g, colour.b, colour.a) < 0)
cUtility::Inst().Message("Unable to make pixel. rectangleRGBA():", __AT__, cUtility::eTypeSDL::GFX);
}
void cGFX::Rectangle(const SDL_Rect& rect, const SDL_Colour& colour, SDL_Texture* texture) const
void cGFX::Rectangle( const SDL_Rect& rect, const SDL_Colour& colour, SDL_Texture* texture ) const
{
cRenderer::Inst().SetRenderTarget(texture);
Rectangle(rect, colour);
cRenderer::Inst().ResetRenderTarget();
}
void cGFX::ZoomIn(SDL_Texture* texture, const double zoomx, const double zoomy, const unsigned long int smooth /*= SMOOTHING_ON*/) const
void cGFX::ZoomIn( SDL_Texture* texture, const double zoomx, const double zoomy, const unsigned long int smooth /*= SMOOTHING_ON*/ ) const
{
SDL_Surface* surface = cRenderer::Inst().TextureToSurface(texture);
@@ -43,7 +43,7 @@ namespace EXPORT_FROM_MYDLL FXEngine {
void ZoomIn( SDL_Texture* texture, const double zoomx, const double zoomy, const unsigned long int smooth = SMOOTHING_ON ) const;
private:
static cGFX* sp_inst;// = nullptr
static cGFX* sp_inst;/// = nullptr
};/// END CLASS DEFINITION cGFX
}/// END NAMESPACE DEFINITION FXEngine
#endif/// END IFNDEF _CGFX_HPP_