Changeset View
Changeset View
Standalone View
Standalone View
layers/selections/image/kpRectangularImageSelection.cpp
Show First 20 Lines • Show All 110 Lines • ▼ Show 20 Line(s) | |||||
111 | } | 111 | } | ||
112 | 112 | | |||
113 | 113 | | |||
114 | // public virtual [base kpAbstractImageSelection] | 114 | // public virtual [base kpAbstractImageSelection] | ||
115 | QBitmap kpRectangularImageSelection::shapeBitmap (bool nullForRectangular) const | 115 | QBitmap kpRectangularImageSelection::shapeBitmap (bool nullForRectangular) const | ||
116 | { | 116 | { | ||
117 | Q_ASSERT (boundingRect ().isValid ()); | 117 | Q_ASSERT (boundingRect ().isValid ()); | ||
118 | 118 | | |||
119 | if (nullForRectangular) | 119 | if (nullForRectangular) { | ||
120 | return QBitmap (); | 120 | return {}; | ||
121 | } | ||||
121 | 122 | | |||
122 | QBitmap maskBitmap (width (), height ()); | 123 | QBitmap maskBitmap (width (), height ()); | ||
123 | maskBitmap.fill (Qt::color1/*opaque*/); | 124 | maskBitmap.fill (Qt::color1/*opaque*/); | ||
124 | return maskBitmap; | 125 | return maskBitmap; | ||
125 | } | 126 | } | ||
126 | 127 | | |||
127 | // public virtual [kpAbstractImageSelection] | 128 | // public virtual [kpAbstractImageSelection] | ||
128 | QRegion kpRectangularImageSelection::shapeRegion () const | 129 | QRegion kpRectangularImageSelection::shapeRegion () const | ||
Show All 20 Lines |