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

Side by Side Diff: ui/gfx/render_text_win.cc

Issue 8476019: ui/gfx: Convert Canvas::DrawRectInt() to use gfx::Rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address Peter's review Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/render_text_win.h" 5 #include "ui/gfx/render_text_win.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "third_party/skia/include/core/SkTypeface.h" 10 #include "third_party/skia/include/core/SkTypeface.h"
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 SkIntToScalar(bounds.y()), 645 SkIntToScalar(bounds.y()),
646 strike); 646 strike);
647 } 647 }
648 offset.Offset(run->width, 0); 648 offset.Offset(run->width, 0);
649 } 649 }
650 } 650 }
651 651
652 void RenderTextWin::DrawCursor(Canvas* canvas) { 652 void RenderTextWin::DrawCursor(Canvas* canvas) {
653 // Paint cursor. Replace cursor is drawn as rectangle for now. 653 // Paint cursor. Replace cursor is drawn as rectangle for now.
654 // TODO(msw): Draw a better cursor with a better indication of association. 654 // TODO(msw): Draw a better cursor with a better indication of association.
655 if (cursor_visible() && focused()) { 655 if (cursor_visible() && focused())
656 Rect r(GetUpdatedCursorBounds()); 656 canvas->DrawRect(GetUpdatedCursorBounds(), kCursorColor);
657 canvas->DrawRectInt(kCursorColor, r.x(), r.y(), r.width(), r.height());
658 }
659 } 657 }
660 658
661 RenderText* RenderText::CreateRenderText() { 659 RenderText* RenderText::CreateRenderText() {
662 return new RenderTextWin; 660 return new RenderTextWin;
663 } 661 }
664 662
665 } // namespace gfx 663 } // namespace gfx
OLDNEW
« ui/gfx/canvas_skia.h ('K') | « ui/gfx/render_text_linux.cc ('k') | ui/gfx/skia_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698