/*--------------------------------------------------------------------------*/ void PegFiniteDial::Draw() { BeginDraw(); if((mwStyle & AF_TRANSPARENT) && Parent()) { StandardBorder(Parent()->muColors[PCI_NORMAL]); } else { StandardBorder(muColors[PCI_NORMAL]); } // If this is set, we've already calculated the needle pos if(!mbValueSet) { CalcNeedlePos(); } DrawDial(); if(mwStyle & DS_TICMARKS) { DrawTicMarks(); } DrawChildren(); DrawNeedle(); DrawAnchor(); EndDraw(); }
void PrismaticJoint::Draw(DrawType type) const { const sm::vec2 anchorA = GetWorldAnchorA(), anchorB = GetWorldAnchorB(); if (type == e_selected || type == e_mouseOn) { s2::RVG::SetColor(pt2::Color(255, 0, 0)); s2::RVG::DashLine(anchorA, anchorB); s2::RVG::SetColor(pt2::Color(102, 204, 102)); s2::RVG::DashLine(anchorA, m_body_a->m_spr->GetPosition()); s2::RVG::SetColor(pt2::Color(102, 102, 204)); s2::RVG::DashLine(anchorB, m_body_b->m_spr->GetPosition()); DrawBodyFlag(); } DrawAnchor(anchorA, type); DrawAnchor(anchorB, type); }
void MotorJoint::Draw(DrawType type) const { const sm::vec2 center = (m_body_a->m_spr->GetPosition() + m_body_b->m_spr->GetPosition()) * 0.5f; if (type == e_selected || type == e_mouseOn) { s2::RVG::SetColor(pt2::Color(102, 204, 102)); s2::RVG::DashLine(center, m_body_a->m_spr->GetPosition()); s2::RVG::SetColor(pt2::Color(102, 102, 204)); s2::RVG::DashLine(center, m_body_b->m_spr->GetPosition()); DrawBodyFlag(); } DrawAnchor(center, type); }