31
31
#include < spine/Extension.h>
32
32
#include < spine/spine-axmol.h>
33
33
34
- USING_NS_AX ;
34
+ using namespace ax ;
35
35
36
36
namespace spine {
37
37
@@ -528,21 +528,19 @@ namespace spine {
528
528
529
529
// Draw bounding rectangle
530
530
if (_debugBoundingRect) {
531
- drawNode->setLineWidth (2 .0f );
532
531
const axmol::Rect brect = getBoundingBox ();
533
532
const Vec2 points[4 ] =
534
533
{
535
534
brect.origin ,
536
535
{brect.origin .x + brect.size .width , brect.origin .y },
537
536
{brect.origin .x + brect.size .width , brect.origin .y + brect.size .height },
538
537
{brect.origin .x , brect.origin .y + brect.size .height }};
539
- drawNode->drawPoly (points, 4 , true , Color4F ::GREEN);
538
+ drawNode->drawPoly (points, 4 , true , Color4B ::GREEN, 2 . 0f );
540
539
}
541
540
542
541
if (_debugSlots) {
543
542
// Slots.
544
543
// DrawPrimitives::setDrawColor4B(0, 0, 255, 255);
545
- drawNode->setLineWidth (2 .0f );
546
544
V3F_C4B_T2F_Quad quad;
547
545
for (int i = 0 , n = (int )_skeleton->getSlots ().size (); i < n; i++) {
548
546
Slot *slot = _skeleton->getDrawOrder ()[i];
@@ -563,33 +561,31 @@ namespace spine {
563
561
{worldVertices[2 ], worldVertices[3 ]},
564
562
{worldVertices[4 ], worldVertices[5 ]},
565
563
{worldVertices[6 ], worldVertices[7 ]}};
566
- drawNode->drawPoly (points, 4 , true , Color4F ::BLUE);
564
+ drawNode->drawPoly (points, 4 , true , Color4B ::BLUE, 2 . 0f );
567
565
}
568
566
}
569
567
570
568
if (_debugBones) {
571
569
// Bone lengths.
572
- drawNode->setLineWidth (2 .0f );
573
570
for (int i = 0 , n = (int )_skeleton->getBones ().size (); i < n; i++) {
574
571
Bone *bone = _skeleton->getBones ()[i];
575
572
if (!bone->isActive ()) continue ;
576
573
float x = bone->getData ().getLength () * bone->getA () + bone->getWorldX ();
577
574
float y = bone->getData ().getLength () * bone->getC () + bone->getWorldY ();
578
- drawNode->drawLine (Vec2 (bone->getWorldX (), bone->getWorldY ()), Vec2 (x, y), Color4F ::RED);
575
+ drawNode->drawLine (Vec2 (bone->getWorldX (), bone->getWorldY ()), Vec2 (x, y), Color4B ::RED, 2 . 0f );
579
576
}
580
577
// Bone origins.
581
- auto color = Color4F ::BLUE;// Root bone is blue.
578
+ auto color = Color4B ::BLUE;// Root bone is blue.
582
579
for (int i = 0 , n = (int )_skeleton->getBones ().size (); i < n; i++) {
583
580
Bone *bone = _skeleton->getBones ()[i];
584
581
if (!bone->isActive ()) continue ;
585
582
drawNode->drawPoint (Vec2 (bone->getWorldX (), bone->getWorldY ()), 4 , color);
586
- if (i == 0 ) color = Color4F ::GREEN;
583
+ if (i == 0 ) color = Color4B ::GREEN;
587
584
}
588
585
}
589
586
590
587
if (_debugMeshes) {
591
588
// Meshes.
592
- drawNode->setLineWidth (2 .0f );
593
589
for (int i = 0 , n = (int )_skeleton->getSlots ().size (); i < n; ++i) {
594
590
Slot *slot = _skeleton->getDrawOrder ()[i];
595
591
if (!slot->getBone ().isActive ()) continue ;
@@ -607,7 +603,7 @@ namespace spine {
607
603
worldCoord + (idx0 * 2 ),
608
604
worldCoord + (idx1 * 2 ),
609
605
worldCoord + (idx2 * 2 )};
610
- drawNode->drawPoly (v, 3 , true , Color4F ::YELLOW);
606
+ drawNode->drawPoly (v, 3 , true , Color4B ::YELLOW, 2 . 0f );
611
607
}
612
608
VLA_FREE (worldCoord);
613
609
}
0 commit comments