Skip to content

DrawNode V2 #1579

Closed
Closed
@aismann

Description

@aismann

Update:
Reopen for DrawNodeEx v1.0

FIRST:
Because of possible side effects with class DrawNode the extension DrawNodeEx aka DrawNode v2 is still in the experimental phase and may encounter bugs or stability or compatibility issues when used.

DrawNodeEx is not only a class for drawing primitives, it's more:

  • It's DrawNode v2
  • It's a kind of sprite created from drawing primitives!
    • Using primitive draw objects mostly free of copyrights (ideal for indie programmer)
    • Smaller apps

Features:

  • Individual line width
    setDNLineWidth();
    getDNLineWidth();

    Default value: `1.0f`
  • Scale/Rotation/Position
Scale:
    setDNScale()
    setDNScaleX()
    setDNScaleY()
Rotation:
    setDNRotation()
    getDNRotation()
    setDNCenter()
    getDNCenter()
Position:
    setDNPosition()
    getDNPosition()
  • general
ensureDNValues()
restoreDNValues()
resetDNValues()
  • Planed APIs:
enableDNTransform()
getDNObj()
explodeDNObj()
transformDNObj()
morphDNObj()
createAnimDNObj()

New drawMethods:

drawStar()
drawSolidStar()
  • Add initial DrawNode v2 as extension DrawNodeEx to axmol as experimental
  • DrawNode API compatible
  • Add individual line width for drawing primitives
  • Scale drawing primitives without changing the individual line width.
  • Rotate drawing primitives around a customized center
  • Useful tests
    • funktional
    • performance/robustness
    • compare DrawNode vs DrawNode v2
  • Code Cleanup
    • Remove/Add some comments
    • Reduce compiler warnings
  • Documentation, Uncyclo
    • Info about AX_TRANSPARENT

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions