OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/gfx/nine_image_painter.h" | 5 #include "ui/gfx/nine_image_painter.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "third_party/skia/include/core/SkPaint.h" | 9 #include "third_party/skia/include/core/SkPaint.h" |
10 #include "third_party/skia/include/core/SkRect.h" | 10 #include "third_party/skia/include/core/SkRect.h" |
11 #include "third_party/skia/include/core/SkScalar.h" | 11 #include "third_party/skia/include/core/SkScalar.h" |
12 #include "ui/gfx/canvas.h" | 12 #include "ui/gfx/canvas.h" |
| 13 #include "ui/gfx/geometry/insets.h" |
13 #include "ui/gfx/geometry/rect_conversions.h" | 14 #include "ui/gfx/geometry/rect_conversions.h" |
14 #include "ui/gfx/geometry/safe_integer_conversions.h" | 15 #include "ui/gfx/geometry/safe_integer_conversions.h" |
15 #include "ui/gfx/image/image_skia_operations.h" | 16 #include "ui/gfx/image/image_skia_operations.h" |
16 #include "ui/gfx/insets.h" | |
17 #include "ui/gfx/rect.h" | 17 #include "ui/gfx/rect.h" |
18 #include "ui/gfx/scoped_canvas.h" | 18 #include "ui/gfx/scoped_canvas.h" |
19 #include "ui/gfx/skia_util.h" | 19 #include "ui/gfx/skia_util.h" |
20 | 20 |
21 namespace gfx { | 21 namespace gfx { |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 // The following functions width and height of the image in pixels for the | 25 // The following functions width and height of the image in pixels for the |
26 // scale factor in the Canvas. | 26 // scale factor in the Canvas. |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 Fill(canvas, images_[6], 0, height_in_pixels - i6h, i6w, i6h, paint); | 169 Fill(canvas, images_[6], 0, height_in_pixels - i6h, i6w, i6h, paint); |
170 | 170 |
171 Fill(canvas, images_[7], i6w, height_in_pixels - i7h, | 171 Fill(canvas, images_[7], i6w, height_in_pixels - i7h, |
172 width_in_pixels - i6w - i8w, i7h, paint); | 172 width_in_pixels - i6w - i8w, i7h, paint); |
173 | 173 |
174 Fill(canvas, images_[8], width_in_pixels - i8w, height_in_pixels - i8h, i8w, | 174 Fill(canvas, images_[8], width_in_pixels - i8w, height_in_pixels - i8h, i8w, |
175 i8h, paint); | 175 i8h, paint); |
176 } | 176 } |
177 | 177 |
178 } // namespace gfx | 178 } // namespace gfx |
OLD | NEW |