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

Side by Side Diff: ash/app_list/drop_shadow_label.h

Issue 9562038: ui/gfx: Make gfx::Canvas inherit from gfx::CanvasSkia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixes Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 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 #ifndef ASH_APP_LIST_DROP_SHADOW_LABEL_H_ 5 #ifndef ASH_APP_LIST_DROP_SHADOW_LABEL_H_
6 #define ASH_APP_LIST_DROP_SHADOW_LABEL_H_ 6 #define ASH_APP_LIST_DROP_SHADOW_LABEL_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ui/gfx/font.h" 9 #include "ui/gfx/font.h"
10 #include "ui/views/controls/label.h" 10 #include "ui/views/controls/label.h"
11 11
(...skipping 16 matching lines...) Expand all
28 // shadow -- it gets more expensive to draw the larger it gets, 28 // shadow -- it gets more expensive to draw the larger it gets,
29 // since it simply draws more copies of the string. For instance, 29 // since it simply draws more copies of the string. For instance,
30 // for a value of two, the string is draw seven times. In general, 30 // for a value of two, the string is draw seven times. In general,
31 // it is drawn three extra times for each increment of |size|. 31 // it is drawn three extra times for each increment of |size|.
32 void SetDropShadowSize(int size); 32 void SetDropShadowSize(int size);
33 33
34 // Return the size of the drop shadow in pixels. 34 // Return the size of the drop shadow in pixels.
35 int drop_shadow_size() const { return drop_shadow_size_; } 35 int drop_shadow_size() const { return drop_shadow_size_; }
36 36
37 // Overridden to paint the text differently from the base class. 37 // Overridden to paint the text differently from the base class.
38 virtual void PaintText(gfx::Canvas* canvas, 38 virtual void PaintText(gfx::CanvasSkia* canvas,
39 const string16& text, 39 const string16& text,
40 const gfx::Rect& text_bounds, 40 const gfx::Rect& text_bounds,
41 int flags) OVERRIDE; 41 int flags) OVERRIDE;
42 42
43 protected: 43 protected:
44 virtual gfx::Size GetTextSize() const OVERRIDE; 44 virtual gfx::Size GetTextSize() const OVERRIDE;
45 45
46 private: 46 private:
47 int drop_shadow_size_; 47 int drop_shadow_size_;
48 48
49 DISALLOW_COPY_AND_ASSIGN(DropShadowLabel); 49 DISALLOW_COPY_AND_ASSIGN(DropShadowLabel);
50 }; 50 };
51 51
52 } // namespace ash 52 } // namespace ash
53 53
54 #endif // ASH_APP_LIST_DROP_SHADOW_LABEL_H_ 54 #endif // ASH_APP_LIST_DROP_SHADOW_LABEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698