1612 // NOTE! iScaledBitmapRefs, iScaledBitmaps, iScaledMasks and |
1612 // NOTE! iScaledBitmapRefs, iScaledBitmaps, iScaledMasks and |
1613 // iScaledMasksInverted must always have the same number of entries. |
1613 // iScaledMasksInverted must always have the same number of entries. |
1614 // NOTE! iScaledMasksInverted entries are valid only if |
1614 // NOTE! iScaledMasksInverted entries are valid only if |
1615 // the main mask is monochrome. Otherwise they are NULL |
1615 // the main mask is monochrome. Otherwise they are NULL |
1616 // and iScaledMasks entries should be used instead. |
1616 // and iScaledMasks entries should be used instead. |
1617 TInt err = KErrNone; |
1617 iScaledBitmapRefs.Append(0); |
1618 TInt appendCount = 0; |
1618 iScaledBitmaps.Append(bmp); |
1619 err = iScaledBitmapRefs.Append(0); |
1619 iScaledMasks.Append(mask); |
1620 if (err == KErrNone) |
1620 iScaledMasksInverted.Append(maski); |
1621 { |
1621 } |
1622 ++appendCount; |
1622 else |
1623 err = iScaledBitmaps.Append(bmp); |
|
1624 } |
|
1625 if (err == KErrNone) |
|
1626 { |
|
1627 ++appendCount; |
|
1628 err = iScaledMasks.Append(mask); |
|
1629 } |
|
1630 if (err == KErrNone) |
|
1631 { |
|
1632 ++appendCount; |
|
1633 err = iScaledMasksInverted.Append(maski); |
|
1634 } |
|
1635 |
|
1636 if (err) |
|
1637 { |
|
1638 if (appendCount > 0) |
|
1639 { |
|
1640 iScaledBitmapRefs.Remove(iScaledBitmapRefs.Count() - 1); |
|
1641 } |
|
1642 if (appendCount > 1) |
|
1643 { |
|
1644 iScaledBitmaps.Remove(iScaledBitmaps.Count() - 1); |
|
1645 } |
|
1646 if (appendCount > 2) |
|
1647 { |
|
1648 iScaledMasks.Remove(iScaledMasks.Count() - 1); |
|
1649 } |
|
1650 |
|
1651 delete bmp; |
|
1652 bmp = NULL; |
|
1653 delete mask; |
|
1654 mask = NULL; |
|
1655 delete maski; |
|
1656 maski = NULL; |
|
1657 } |
|
1658 } |
|
1659 |
|
1660 if (!bmp) |
|
1661 { |
1623 { |
1662 // In the case of no memory or whatever |
1624 // In the case of no memory or whatever |
1663 ASSERT(EFalse); |
1625 ASSERT(EFalse); |
1664 bmp = &GetBitmap(); |
1626 bmp = &GetBitmap(); |
1665 } |
1627 } |