Added proper hit test with rotation and pivoting
This commit is contained in:
@@ -320,11 +320,11 @@ public:
|
||||
uint64_t create_text(uint64_t font_id, const char *text, uint32_t length, Color color);
|
||||
Vec2<float> get_text_size(uint64_t text_id);
|
||||
|
||||
bool write(uint64_t text_id, Vec2<float> position, float z, float angle, Vec2<float> scale, float alpha);
|
||||
bool write(uint64_t text_id, Vec2<float> position, float z, float angle, Vec2<float> pivot, Vec2<float> scale, float alpha);
|
||||
|
||||
bool draw(uint64_t image_id, Vec2<float> position, float z, float angle, Vec2<float> scale, float alpha);
|
||||
bool draw(uint64_t image_id, Vec2<float> position, float z, float angle, Vec2<float> pivot, Vec2<float> scale, float alpha);
|
||||
|
||||
bool draw_rect(Rect rect, Color color, float z, float angle, Vec2<float> scale, float alpha);
|
||||
bool draw_rect(Rect rect, Color color, float z, float angle, Vec2<float> pivot, Vec2<float> scale, float alpha);
|
||||
|
||||
void render(); // the rest of the calls only build the instruction list, this actually renders everything added to the screen (following z order)
|
||||
|
||||
@@ -366,6 +366,7 @@ private:
|
||||
|
||||
float z;
|
||||
float angle;
|
||||
Vec2<float> pivot;
|
||||
Vec2<float> scale;
|
||||
float alpha;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user