I want to rotate an needl image, but it not looks smooth。How can I to improve it?The refresh of the gui is about 30fps。
the code is as follow:
`#include
static inline ImVec2 operator+(const ImVec2& lhs, const ImVec2& rhs)
{
return ImVec2(lhs.x + rhs.x, lhs.y + rhs.y);
}
static inline ImVec2 ImRotate(const ImVec2& v, float cos_a, float sin_a)
{
return ImVec2(v.x cos_a - v.y sin_a, v.x sin_a + v.y cos_a);
}
void ImageRotated(ImTextureID tex_id, ImVec2 center, ImVec2 size, float angle)
{
ImDrawList* draw_list = ImGui::GetWindowDrawList();
I want to rotate an needl image, but it not looks smooth。How can I to improve it?The refresh of the gui is about 30fps。 the code is as follow: `#include
static inline ImVec2 operator+(const ImVec2& lhs, const ImVec2& rhs)
{
return ImVec2(lhs.x + rhs.x, lhs.y + rhs.y);
}
static inline ImVec2 ImRotate(const ImVec2& v, float cos_a, float sin_a)
{
return ImVec2(v.x cos_a - v.y sin_a, v.x sin_a + v.y cos_a);
}
void ImageRotated(ImTextureID tex_id, ImVec2 center, ImVec2 size, float angle)
{
ImDrawList* draw_list = ImGui::GetWindowDrawList();
}`
It looks like as follow: