1、原理
2、代码
void calcVertexes(double start_x, double start_y, double end_x, double end_y, double& x1, double& y1, double& x2, double& y2){
double angle = atan2 (end_y - start_y, end_x - start_x) + M_PI;
x1 = end_x + arrow_lenght_ * cos(angle - arrow_degrees_);
y1 = end_y + arrow_lenght_ * sin(angle - arrow_degrees_);
x2 = end_x + arrow_lenght_ * cos(angle + arrow_degrees_);
y2 = end_y + arrow_lenght_ * sin(angle + arrow_degrees_);
}