Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1103)

Side by Side Diff: Source/core/paint/NinePieceImagePainter.h

Issue 1164573003: Move NinePieceImage painting to a separate class (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address review comments Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/paint/BoxPainter.cpp ('k') | Source/core/paint/NinePieceImagePainter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 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 NinePieceImagePainter_h
6 #define NinePieceImagePainter_h
7
8 #include "platform/LayoutUnit.h"
9 #include "platform/heap/Heap.h"
10 #include "third_party/skia/include/core/SkXfermode.h"
11
12 namespace blink {
13
14 class ComputedStyle;
15 class GraphicsContext;
16 class LayoutBoxModelObject;
17 class LayoutRect;
18 class NinePieceImage;
19 class BorderImageLength;
20
21 class NinePieceImagePainter {
22 STACK_ALLOCATED();
23 public:
24 NinePieceImagePainter(LayoutBoxModelObject&);
25
26 bool paint(GraphicsContext*, const LayoutRect&, const ComputedStyle&, const NinePieceImage&, SkXfermode::Mode) const;
27
28 private:
29 static LayoutUnit computeBorderImageSide(const BorderImageLength& borderSlic e, LayoutUnit borderSide, LayoutUnit imageSide, LayoutUnit boxExtent);
30
31 LayoutBoxModelObject& m_layoutObject;
32 };
33
34 } // namespace blink
35
36 #endif // NinePieceImagePainter_h
OLDNEW
« no previous file with comments | « Source/core/paint/BoxPainter.cpp ('k') | Source/core/paint/NinePieceImagePainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698