• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2006-2008 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_UI_VIEWS_THEME_HELPERS_H__
6 #define CHROME_BROWSER_UI_VIEWS_THEME_HELPERS_H__
7 #pragma once
8 
9 #include <windows.h>
10 
11 #include "third_party/skia/include/core/SkColor.h"
12 
13 // Get the colors at two points on a Rebar background gradient. This is for
14 // drawing Rebar like backgrounds in Views. The reason not to just use
15 // DrawThemeBackground is that it only draws horizontally, but by extracting
16 // the colors at two points on the X axis of a background drawn
17 // by DrawThemeBackground, we can construct a LinearGradientBrush and draw
18 // such a gradient in any direction.
19 //
20 // The width parameter is the width of horizontal gradient that will be
21 // created to calculate the two colors. x1 and x2 are the two pixel positions
22 // along the X axis.
23 void GetRebarGradientColors(int width, int x1, int x2,
24                             SkColor* c1, SkColor* c2);
25 
26 
27 // Gets the color used to draw dark (inset beveled) lines.
28 void GetDarkLineColor(SkColor* dark_color);
29 
30 #endif  // CHROME_BROWSER_UI_VIEWS_THEME_HELPERS_H__
31