Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /randovania_randovania /randovania /gui /lib /pixmap_lib.py
| from __future__ import annotations | |
| from PySide6.QtCore import Qt | |
| from PySide6.QtGui import QImage, QPainter, QPixmap | |
| def paint_with_opacity(pixmap: QPixmap, opacity: float) -> QPixmap: | |
| transparent_image = QImage(pixmap.size(), QImage.Format.Format_ARGB32_Premultiplied) | |
| transparent_image.fill(Qt.GlobalColor.transparent) | |
| painter = QPainter(transparent_image) | |
| painter.setOpacity(opacity) | |
| painter.drawPixmap(0, 0, pixmap) | |
| painter.end() | |
| return QPixmap.fromImage(transparent_image) | |
Xet Storage Details
- Size:
- 509 Bytes
- Xet hash:
- f87a21bbefae40eaa742df5eb55a94d6934e9d5e9affefd7abaff3a1cf7e3691
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.