diff --git a/SDLWrapper/Renderer.cpp b/SDLWrapper/Renderer.cpp index 3c2c9c9..89a25d7 100644 --- a/SDLWrapper/Renderer.cpp +++ b/SDLWrapper/Renderer.cpp @@ -141,6 +141,47 @@ int Renderer::drawLines(const std::vector& pointvec) return drawLines(pointvec.data(),pointvec.size()); } +int Renderer::fillRects(const std::vector& rectvec) +{ + std::vector thisvec; + for(auto& rectref:rectvec) + { + thisvec.push_back(rectref.toSDLRect()); + } + return fillRects(thisvec); +} + +int Renderer::drawRects(const std::vector& rectvec) +{ + std::vector thisvec; + for(auto& rectref:rectvec) + { + thisvec.push_back(rectref.toSDLRect()); + } + return drawRects(thisvec); +} + +int Renderer::drawPoints(const std::vector& pointvec) +{ + std::vector thisvec; + for(auto& pointref:pointvec) + { + thisvec.push_back(pointref.toSDLPoint()); + } + return drawPoints(thisvec); +} + +int Renderer::drawLines(const std::vector& pointvec) +{ + std::vector thisvec; + for(auto& pointref:pointvec) + { + thisvec.push_back(pointref.toSDLPoint()); + } + return drawLines(thisvec); +} + + int Renderer::setScale(float scaleX, float scaleY) { return SDL_RenderSetScale(_get(),scaleX,scaleY); diff --git a/SDLWrapper/Renderer.h b/SDLWrapper/Renderer.h index 93ac6ba..6faa64e 100644 --- a/SDLWrapper/Renderer.h +++ b/SDLWrapper/Renderer.h @@ -56,6 +56,12 @@ public: int drawPoints(const std::vector& pointvec); int drawLines(const std::vector& pointvec); + /// Slower Functions (Need Convert First, then call Experimental Functions.) + int fillRects(const std::vector& rectvec); + int drawRects(const std::vector& rectvec); + int drawPoints(const std::vector& pointvec); + int drawLines(const std::vector& pointvec); + int setScale(float scaleX,float scaleY); std::tuple getScale() const;