OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef BoxPainter_h |
| 6 #define BoxPainter_h |
| 7 |
| 8 #include "core/rendering/RenderBoxModelObject.h" |
| 9 |
| 10 namespace blink { |
| 11 |
| 12 class LayoutPoint; |
| 13 struct PaintInfo; |
| 14 class RenderBox; |
| 15 class RenderObject; |
| 16 |
| 17 class BoxPainter { |
| 18 public: |
| 19 BoxPainter(RenderBox& renderBox) : m_renderBox(renderBox) { } |
| 20 void paint(PaintInfo&, const LayoutPoint&); |
| 21 |
| 22 void paintBoxDecorationBackground(PaintInfo&, const LayoutPoint&); |
| 23 void paintMask(PaintInfo&, const LayoutPoint&); |
| 24 void paintClippingMask(PaintInfo&, const LayoutPoint&); |
| 25 void paintFillLayers(const PaintInfo&, const Color&, const FillLayer&, const
LayoutRect&, BackgroundBleedAvoidance = BackgroundBleedNone, CompositeOperator
= CompositeSourceOver, RenderObject* backgroundObject = 0); |
| 26 void paintMaskImages(const PaintInfo&, const LayoutRect&); |
| 27 void paintBoxDecorationBackgroundWithRect(PaintInfo&, const LayoutPoint&, co
nst LayoutRect&); |
| 28 |
| 29 private: |
| 30 void paintBackground(const PaintInfo&, const LayoutRect&, const Color& backg
roundColor, BackgroundBleedAvoidance = BackgroundBleedNone); |
| 31 void paintRootBoxFillLayers(const PaintInfo&); |
| 32 void paintFillLayer(const PaintInfo&, const Color&, const FillLayer&, const
LayoutRect&, BackgroundBleedAvoidance, CompositeOperator, RenderObject* backgrou
ndObject, bool skipBaseColor = false); |
| 33 |
| 34 // FIXME: this should be const. |
| 35 RenderBox& m_renderBox; |
| 36 }; |
| 37 |
| 38 } // namespace blink |
| 39 |
| 40 #endif |
OLD | NEW |