SDLPP: CircleRenderer can be rendered
This commit is contained in:
@@ -11,21 +11,41 @@ class SDLPPSCOPE CircleRender : public RenderObject {
|
||||
public:
|
||||
CircleRender() = delete;
|
||||
virtual ~CircleRender(){};
|
||||
CircleRender( int x, int y, int rad, std::shared_ptr< Renderer > &r );
|
||||
CircleRender( int x, int y, int rad, std::shared_ptr< Renderer > &r,
|
||||
CircleRender( double x, double y, double rad, std::shared_ptr< Renderer > &r );
|
||||
CircleRender( double x, double y, double rad, std::shared_ptr< Renderer > &r,
|
||||
std::shared_ptr< Texture > &t );
|
||||
CircleRender( int x, int y, int rad, std::shared_ptr< Renderer > &r,
|
||||
const std::string &img_path );
|
||||
virtual void render();
|
||||
virtual int leftmost();
|
||||
virtual int topmost();
|
||||
virtual int collisionPushX();
|
||||
virtual int collisionPushY();
|
||||
CircleRender( double x, double y, double rad, std::shared_ptr< Renderer > &r,
|
||||
const std::string &img_or_color, bool is_polygon = false );
|
||||
virtual void setColor( const std::string &color ) override;
|
||||
virtual void setOutlineColor( const std::string &color ) override;
|
||||
virtual void specialAction( int /*UNUSED*/ ) override{}
|
||||
virtual void render() override;
|
||||
virtual void custom_move( int /*UNUSED*/ ) override{}
|
||||
virtual std::pair< std::pair< double, double >,
|
||||
std::pair< double, double > >
|
||||
getDoubleRect() const override;
|
||||
virtual int leftmost() override;
|
||||
virtual int topmost() override;
|
||||
virtual int rightmost() override;
|
||||
virtual int bottommost() override;
|
||||
virtual int collisionPushX() override;
|
||||
virtual int collisionPushY() override;
|
||||
virtual int collisionWidth() override;
|
||||
virtual int collisionHeight() override;
|
||||
virtual void updateSizeAndPosition() override;
|
||||
virtual SDL_Rect getRect() override;
|
||||
virtual void centerX() override;
|
||||
virtual std::shared_ptr< RenderObject > copySelf() override;
|
||||
std::string getColor() const;
|
||||
|
||||
private:
|
||||
int x_;
|
||||
int y_;
|
||||
int rad_;
|
||||
virtual void copyTo(std::shared_ptr<RenderObject> other) override;
|
||||
void updateXY();
|
||||
double og_r;
|
||||
double r_;
|
||||
bool centerx = false;
|
||||
SDL_Rect rect;
|
||||
std::string color = "";
|
||||
};
|
||||
} // end of namespace SDLPP
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user