| 168 | } |
| 169 | |
| 170 | void Layer::drawBackground(Scalar width, Scalar height) { |
| 171 | DrawingContext drawingContext(width, height); |
| 172 | |
| 173 | if (_boxShadow != nullptr) { |
| 174 | _boxShadow->draw(drawingContext, _borderRadius); |
| 175 | } |
| 176 | |
| 177 | if (_gradientWrapper.hasGradient()) { |
| 178 | _gradientWrapper.draw(drawingContext, _borderRadius); |
| 179 | } else if (_backgroundColor != Color::transparent()) { |
| 180 | Paint paint; |
| 181 | paint.setColor(_backgroundColor); |
| 182 | paint.setAntiAlias(true); |
| 183 | |
| 184 | drawingContext.drawPaint(paint, _borderRadius, _lazyPath); |
| 185 | } |
| 186 | |
| 187 | _cachedBackground = drawingContext.finish(); |
| 188 | } |
| 189 | |
| 190 | void Layer::drawForeground(Scalar width, Scalar height) { |
| 191 | DrawingContext drawingContext(width, height); |
nothing calls this directly
no test coverage detected