Removed hardcoded thickness clamp in DrawNode#3068
Removed hardcoded thickness clamp in DrawNode#3068w1257 wants to merge 1 commit intoaxmolengine:devfrom
Conversation
- Removed if (thickness < 1.0f){thickness = 1.0f;} in _drawSegment
- Updated drawLine function comment documentation about thickness.
- Updated AUTHORS.md
Can you add a cpp-test which "shows/check" for future changes/checks too? scale: >1.0f, ==1.0f, <1.0f You know there is a methode setting the scale too? |
|
I will add the cpp-test for it using DrawNode::DrawLine. I did not know about properties.setScale until now but it doesn't seem to be actually relevant to the drawLine (checked the code and the game with it, it seems to just apply scale on top of node scale but differently), I was referring to the node scale which is quite relevant when for example in 1 tile : 1 unit in grid based setup where the parent node is scaled up to achieve that. I also did not know about properties.setFactor which is relevant here which can achieve same results. I will also update the DrawNode class comment documentation to point at the properties. |
Thanks. Please add also
Thank you. That's really helpful. |
Thanks for investigating. @w1257 |
|
I will make the test testing both scales, factor and thickness. I am planning to make a hard test that will make sure that maths checks out when making changes. I will use images and drawing on each other which should be visually clear state of the test and potentially it can be fully automated in the future. There will be also free form test included. If you want, I can make the hard test image consistently generative (Not AI gen, custom gen code. It will take less space in the repo but will take more time to load). Or image file(s) (takes more space but faster to load.) Making the hard tests will most likely take more time due to my availability. I will make them last. |
Fine. I will improve the DrawNode performence tests (add sliders for factor and scale). |
or The formula is wrong I think. So the hardcoded factor (2) can be different on each drawing primitive (line, circle, polygon, etc) |
|
@w1257 HINT: Last but not least: |
|
@w1257 |
|
I will create a new PR for the documentation update and new tests. |



Describe your changes
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