Use alpha channel of the fill color as opacity of the image.
(self)
| 297 | return self.doc.context.imagePixelColor(self.path, p) |
| 298 | |
| 299 | def _getAlpha(self): |
| 300 | """Use alpha channel of the fill color as opacity of the image.""" |
| 301 | sFill = self.css('fill', noColor) |
| 302 | if isinstance(sFill, (tuple, list)) and len(sFill) == 4: |
| 303 | _, _, _, alpha = sFill |
| 304 | else: |
| 305 | alpha = 1 |
| 306 | return alpha |
| 307 | |
| 308 | def _scaleImage(self, view): |
| 309 | """If the self.saveScaled is True and the reduction scale is inside the |
no test coverage detected