#include "line.h" #include Line::Line(const QPair& fromTo, ACLineSegment* ac, QObject *parent):Branch(fromTo.first,fromTo.second,parent) { this->ratio=1; this->ac=ac; this->extract(); } void Line::extract() { //用YJV22-3x240 ACLineSegment *ac=this->ac; double length=ac->getLength(); if((int)length==0) { std::cout<<"line length zeros "<getID().toStdString()<r=r0*length; this->x=x0*length; this->g1=g0*length; this->g2=g0*length; this->b1=b0*length; this->b2=b0*length; this->length=length; }