• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2010 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 CHROME_BROWSER_CHROMEOS_LOGIN_ROUNDED_RECT_PAINTER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ROUNDED_RECT_PAINTER_H_
7 #pragma once
8 
9 #include "third_party/skia/include/core/SkColor.h"
10 
11 namespace views {
12 class Background;
13 class Border;
14 class Painter;
15 }  // namespace views
16 
17 namespace chromeos {
18 
19 struct BorderDefinition {
20   int padding;
21   SkColor padding_color;
22   int shadow;
23   SkColor shadow_color;
24   int corner_radius;
25   SkColor top_color;
26   SkColor bottom_color;
27 
28   static const BorderDefinition kScreenBorder;
29   static const BorderDefinition kUserBorder;
30 };
31 
32 // Creates painter to paint view background with parameters specified.
33 views::Painter* CreateWizardPainter(const BorderDefinition* const border);
34 // Creates border to provide insets. Should be used together with WizardPainter
35 // that actually draws both border and background.
36 views::Border* CreateWizardBorder(const BorderDefinition* const border);
37 
38 // Creates simple round background.
39 views::Background* CreateRoundedBackground(int corner_radius,
40                                            int stroke_width,
41                                            SkColor background_color,
42                                            SkColor stroke_color);
43 }  // namespace chromeos
44 
45 #endif  // CHROME_BROWSER_CHROMEOS_LOGIN_ROUNDED_RECT_PAINTER_H_
46