rounded_rect_painter.h revision 3345a6884c488ff3a535c2c9acdd33d74b37e311
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
11namespace views {
12class Background;
13class Border;
14class Painter;
15}  // namespace views
16
17namespace chromeos {
18
19struct 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.
33views::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.
36views::Border* CreateWizardBorder(const BorderDefinition* const border);
37
38// Creates simple round background.
39views::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