Use QImage span for corner masks.
This commit is contained in:
parent
e62d92f655
commit
40fc5b35f0
2 changed files with 4 additions and 4 deletions
|
|
@ -893,7 +893,7 @@ void prepareCircle(QImage &img) {
|
||||||
|
|
||||||
void prepareRound(
|
void prepareRound(
|
||||||
QImage &image,
|
QImage &image,
|
||||||
QImage *cornerMasks,
|
gsl::span<const QImage, 4> cornerMasks,
|
||||||
RectParts corners,
|
RectParts corners,
|
||||||
QRect target) {
|
QRect target) {
|
||||||
if (target.isNull()) {
|
if (target.isNull()) {
|
||||||
|
|
@ -970,8 +970,8 @@ void prepareRound(
|
||||||
QImage::Format_ARGB32_Premultiplied);
|
QImage::Format_ARGB32_Premultiplied);
|
||||||
Assert(!image.isNull());
|
Assert(!image.isNull());
|
||||||
|
|
||||||
auto masks = CornersMask(radius);
|
const auto masks = CornersMask(radius);
|
||||||
prepareRound(image, masks.data(), corners, target);
|
prepareRound(image, masks, corners, target);
|
||||||
}
|
}
|
||||||
|
|
||||||
QImage prepareColored(style::color add, QImage image) {
|
QImage prepareColored(style::color add, QImage image) {
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ void prepareRound(
|
||||||
QRect target = QRect());
|
QRect target = QRect());
|
||||||
void prepareRound(
|
void prepareRound(
|
||||||
QImage &image,
|
QImage &image,
|
||||||
QImage *cornerMasks,
|
gsl::span<const QImage, 4> cornerMasks,
|
||||||
RectParts corners = RectPart::AllCorners,
|
RectParts corners = RectPart::AllCorners,
|
||||||
QRect target = QRect());
|
QRect target = QRect());
|
||||||
void prepareCircle(QImage &image);
|
void prepareCircle(QImage &image);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue