Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quadratic Bezier Helpers #3664

Closed
wants to merge 2 commits into from
Closed

Quadratic Bezier Helpers #3664

wants to merge 2 commits into from

Conversation

aiekick
Copy link
Contributor

@aiekick aiekick commented Dec 20, 2020

3 functions added in imgui_draw.cpp :
add ImQuadBezierCalc
add PathQuadBezierToCasteljau
add PathQuadBezierCurveTo

the Cubic Version was not renamed, just a comment was added to explain the difference

add ImQuadBezierCalc
add PathQuadBezierToCasteljau
add PathQuadBezierCurveTo
@ocornut
Copy link
Owner

ocornut commented Dec 21, 2020

Merged.

@ocornut ocornut closed this Dec 21, 2020
ocornut added a commit that referenced this pull request Dec 21, 2020
… ImDrawList::PathBezierCurveTo() to ImDrawList::PathBezierCubicCurveTo(). (#3127, #3664, #3665)

Renamed corresponding internal functions as well.
ocornut added a commit that referenced this pull request Dec 21, 2020
… ImDrawList::PathBezierCurveTo() to ImDrawList::PathBezierCubicCurveTo(). (#3127, #3664, #3665)

Renamed corresponding internal functions as well.
@aiekick aiekick deleted the quadbezier branch December 21, 2020 19:33
@ice1000
Copy link
Contributor

ice1000 commented Jan 22, 2021

Hi all, I saw entry

ImDrawList: Added ImDrawList::AddQuadBezierCurve(), ImDrawList::PathQuadBezierCurveTo() quadratic bezier helpers. (#3127, #3664, #3665) [@aiekick]

On the release notes. However these methods seem to be missing. Instead I saw AddBezierQuadratic and PathBezierQuadraticCurveTo. Are they renamed? If so, I suggest updating the release notes.

@aiekick
Copy link
Contributor Author

aiekick commented Jan 22, 2021

In the code of the v1.80, you can see :

// cubic version
ImVec2 ImBezierCubicCalc(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, float t);
void PathBezierCubicCurveToCasteljau(ImVector<ImVec2>* path, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, float tess_tol, int level);
void ImDrawList::PathBezierCubicCurveTo(const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, int num_segments);

// quadratic versions
ImVec2 ImBezierQuadraticCalc(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, float t);
void PathBezierQuadraticCurveToCasteljau(ImVector<ImVec2>* path, float x1, float y1, float x2, float y2, float x3, float y3, float tess_tol, int level);
void ImDrawList::PathBezierQuadraticCurveTo(const ImVec2& p2, const ImVec2& p3, int num_segments);

yes they were renamed if few other ocmmit of Omar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants