(self, width, height)
| 93 | painter.drawImage(x, y, self.CachedImage) |
| 94 | |
| 95 | def SetImageSize(self, width, height): |
| 96 | resizeWidth = 0 |
| 97 | resizeHeight = 0 |
| 98 | for i in range(len(self.ResizeDistancesX)): |
| 99 | resizeWidth += self.ResizeDistancesX[i][1] |
| 100 | |
| 101 | for i in range(len(self.ResizeDistancesY)): |
| 102 | resizeHeight += self.ResizeDistancesY[i][1] |
| 103 | |
| 104 | if (width < (self.Image.width() - 2 - resizeWidth) and height < ( |
| 105 | self.Image.height() - 2 - resizeHeight)): |
| 106 | raise ExceptionIncorrectWidthAndHeight( |
| 107 | self.Image.width() - 2, self.Image.height() - 2) |
| 108 | |
| 109 | if (width < (self.Image.width() - 2 - resizeWidth)): |
| 110 | raise ExceptionIncorrectWidth( |
| 111 | self.Image.width() - 2, self.Image.height() - 2) |
| 112 | |
| 113 | if (height < (self.Image.height() - 2 - resizeHeight)): |
| 114 | raise ExceptionIncorrectHeight( |
| 115 | self.Image.width() - 2, self.Image.height() - 2) |
| 116 | |
| 117 | if (width != self.OldWidth or height != self.OldHeight): |
| 118 | self.OldWidth = width |
| 119 | self.OldHeight = height |
| 120 | self.UpdateCachedImage(width, height) |
| 121 | |
| 122 | @classmethod |
| 123 | def GetContentAreaRect(self, width, height): |
no test coverage detected