DrawNode local properties full supported now, removed all hardcoded clamps; DrawNode cpp-tests switched to ImGUI ; #3076
Conversation
|
@w1257 please give feedback too (= optional reviewer) |
w1257
left a comment
There was a problem hiding this comment.
For the future PR(s), I suggest moving some of the sliders to the ImGUI inspector.
…full_support_remove_clamps
…full_support_remove_clamps
|
@halx99 |
…ed pragma push_macro("TRANSPARENT")
…s://github.com/aismann/axmol into DrawNode_properties_full_support_remove_clamps
ImGUI is not implemented for all platforms (such as iOS), so using ImGUI to control aspects of test cases would cause issues if running the cpp-tests project on such platforms. |
|
@halx99 |
Co-authored-by: halx99 <halx99@live.com>
|
/clang-format |
|
👋 @halx99 Command /clang-format received. Running code formatting, please wait... |
|
✅ Formatting completed and changes have been committed to the PR branch: |
640a443 to
3d98444
Compare
|
/clang-format |
|
👋 @halx99 Command /clang-format received. Running code formatting, please wait... |
|
✅ Formatting completed and changes have been committed to the PR branch: |
It looks good on my computer. As always, thank you very much. |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors the DrawNode class by replacing the properties struct with direct member variables for drawing parameters such as thickness scale, local scale, pivot, rotation, position, and draw order. The applyTransform method is renamed to applyLocalTransform, and redundant thickness and radius checks are removed from various drawing functions. The TRANSPARENT macro is replaced with Color(). Test cases in DrawNodeTest are updated to reflect these API changes and integrate with an ImGui-based UI. Review comments identify a memory leak in _drawColoredTriangle due to unmanaged dynamic allocation, an inconsistency in the polygon outline width calculation in _drawPolygon that halves the thickness, and an issue where pointSize is incorrectly used as thickness for polygon outlines in _drawPoints, leading to oversized borders.



Describe your changes
DrawNode::properties full_support + all hardcoded clamps removed
_drawTriangles removed (= part of _drawPoly or _drawPolygon)
=> Redesign: "flat Properties members"
constto all properties gettersDrawNode::properties.getScale()pragma push_macro("TRANSPARENT")sectionax::uitoax::extension::ImGUIcheck/adapt FairyGUI (extensions\fairygui\src\fairygui\GGraph.cpp)check/adapt Spine (extensions\spine\src\spine\SkeletonRenderer.cpp)check/adapt tests\live2d-tests\Source\SampleScene.cppsee also diffs
Issue ticket number and link
Checklist before requesting a review
For each PR
Add Copyright if it missed:
-
"Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md)."I have performed a self-review of my code.
Optional:
For core/new feature PR
Axmol 3.x ------------------------------------------------------------
For each 3.x PR