Bug 893484 - Set second last polygon marker type before appending last one. r=jwatt

This commit is contained in:
Cameron McCormack 2013-07-15 19:50:09 +10:00
Родитель bbb7ca8e58
Коммит b05fa0ae0b
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -48,6 +48,7 @@ SVGPolygonElement::GetMarkPoints(nsTArray<nsSVGMark> *aMarks)
nsSVGMark *startMark = &aMarks->ElementAt(0);
float angle = atan2(startMark->y - endMark->y, startMark->x - endMark->x);
endMark->type = nsSVGMark::eMid;
endMark->angle = SVGContentUtils::AngleBisect(angle, endMark->angle);
startMark->angle = SVGContentUtils::AngleBisect(angle, startMark->angle);
// for a polygon (as opposed to a polyline) there's an implicit extra point
@ -55,7 +56,6 @@ SVGPolygonElement::GetMarkPoints(nsTArray<nsSVGMark> *aMarks)
// doesn't return
aMarks->AppendElement(nsSVGMark(startMark->x, startMark->y, startMark->angle,
nsSVGMark::eEnd));
endMark->type = nsSVGMark::eMid;
}
void