Fixed ScaleX and ScaleY to handle identity matrix, based on O'Callahan patch.

This commit is contained in:
dcone%netscape.com 2000-05-15 14:06:18 +00:00
Родитель 7e64f95392
Коммит c28c1ca34e
1 изменённых файлов: 12 добавлений и 6 удалений

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

@ -308,10 +308,13 @@ void nsTransform2D :: ScaleXCoords(const nscoord* aSrc,
PRUint32 aNumCoords,
PRIntn* aDst)
{
const nscoord* end = aSrc + aNumCoords;
if (type != MG_2DIDENTITY)
{
const nscoord* end = aSrc + aNumCoords;
if (type == MG_2DIDENTITY){
while (aSrc < end ) {
*aDst++ = PRIntn(*aSrc++);
}
} else {
float scale = m00;
while (aSrc < end) {
nscoord c = *aSrc++;
@ -324,10 +327,13 @@ void nsTransform2D :: ScaleYCoords(const nscoord* aSrc,
PRUint32 aNumCoords,
PRIntn* aDst)
{
const nscoord* end = aSrc + aNumCoords;
if (type != MG_2DIDENTITY)
{
const nscoord* end = aSrc + aNumCoords;
if (type == MG_2DIDENTITY){
while (aSrc < end ) {
*aDst++ = PRIntn(*aSrc++);
}
} else {
float scale = m11;
while (aSrc < end) {
nscoord c = *aSrc++;