OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/canvas.h" | 5 #include "ui/gfx/canvas.h" |
6 | 6 |
7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "ui/gfx/font_list.h" | 10 #include "ui/gfx/font_list.h" |
11 #include "ui/gfx/geometry/insets.h" | 11 #include "ui/gfx/geometry/insets.h" |
| 12 #include "ui/gfx/geometry/rect.h" |
12 #include "ui/gfx/geometry/safe_integer_conversions.h" | 13 #include "ui/gfx/geometry/safe_integer_conversions.h" |
13 #include "ui/gfx/range/range.h" | 14 #include "ui/gfx/range/range.h" |
14 #include "ui/gfx/rect.h" | |
15 #include "ui/gfx/render_text.h" | 15 #include "ui/gfx/render_text.h" |
16 #include "ui/gfx/shadow_value.h" | 16 #include "ui/gfx/shadow_value.h" |
17 #include "ui/gfx/text_elider.h" | 17 #include "ui/gfx/text_elider.h" |
18 #include "ui/gfx/text_utils.h" | 18 #include "ui/gfx/text_utils.h" |
19 | 19 |
20 namespace gfx { | 20 namespace gfx { |
21 | 21 |
22 namespace { | 22 namespace { |
23 | 23 |
24 #if defined(OS_WIN) | 24 #if defined(OS_WIN) |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 UpdateRenderText(rect, text, font_list, flags, color, render_text.get()); | 395 UpdateRenderText(rect, text, font_list, flags, color, render_text.get()); |
396 render_text->SetElideBehavior(FADE_TAIL); | 396 render_text->SetElideBehavior(FADE_TAIL); |
397 | 397 |
398 canvas_->save(); | 398 canvas_->save(); |
399 ClipRect(display_rect); | 399 ClipRect(display_rect); |
400 render_text->Draw(this); | 400 render_text->Draw(this); |
401 canvas_->restore(); | 401 canvas_->restore(); |
402 } | 402 } |
403 | 403 |
404 } // namespace gfx | 404 } // namespace gfx |
OLD | NEW |