mirror of
https://github.com/HowestDAE/dae16-VerhulstBram.git
synced 2026-02-04 09:19:19 +01:00
Pre Point2f Nuke
Fixed drawing, Added general optimisations
This commit is contained in:
@@ -238,7 +238,7 @@ void Texture::Draw( const Point2f& dstBottomLeft, const Rectf& srcRect, bool fli
|
||||
dstRect.width = m_Width;
|
||||
dstRect.height = m_Height;
|
||||
}
|
||||
Draw( dstRect, srcRect );
|
||||
Draw( dstRect, srcRect, flip );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -341,6 +341,9 @@ bool Texture::IsCreationOk( ) const
|
||||
{
|
||||
return m_CreationOk;
|
||||
}
|
||||
Rectf Texture::getSrcRect() {
|
||||
return Rectf{0, 0, m_Width, m_Height};
|
||||
}
|
||||
|
||||
void Texture::DrawFilledRect(const Rectf& rect) const
|
||||
{
|
||||
|
||||
@@ -20,6 +20,8 @@ public:
|
||||
float GetHeight() const;
|
||||
bool IsCreationOk( ) const;
|
||||
|
||||
Rectf getSrcRect();
|
||||
|
||||
static int m_TextureCounter;
|
||||
|
||||
private:
|
||||
|
||||
@@ -724,3 +724,6 @@ bool utils::isMouseDown(int button) {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//utils::getScrollMovement()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user