OLD | NEW |
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 "views/desktop/desktop_background.h" | 5 #include "views/desktop/desktop_background.h" |
6 | 6 |
7 #include "ui/gfx/canvas_skia.h" | 7 #include "ui/gfx/canvas_skia.h" |
8 #include "ui/gfx/path.h" | 8 #include "ui/gfx/path.h" |
9 #include "views/view.h" | 9 #include "views/view.h" |
10 | 10 |
(...skipping 19 matching lines...) Expand all Loading... |
30 gfx::Path path; | 30 gfx::Path path; |
31 path.moveTo(0, view->height() / 2); | 31 path.moveTo(0, view->height() / 2); |
32 path.cubicTo(view->height() / 4, view->height() / 4, | 32 path.cubicTo(view->height() / 4, view->height() / 4, |
33 view->height() / 2, view->height() / 2, | 33 view->height() / 2, view->height() / 2, |
34 SkIntToScalar(view->width()), view->height() / 2); | 34 SkIntToScalar(view->width()), view->height() / 2); |
35 path.lineTo(SkIntToScalar(view->width()), SkIntToScalar(view->height())); | 35 path.lineTo(SkIntToScalar(view->width()), SkIntToScalar(view->height())); |
36 path.lineTo(0, SkIntToScalar(view->height())); | 36 path.lineTo(0, SkIntToScalar(view->height())); |
37 path.close(); | 37 path.close(); |
38 | 38 |
39 paint.setColor(SK_ColorGREEN); | 39 paint.setColor(SK_ColorGREEN); |
40 canvas->AsCanvasSkia()->drawPath(path, paint); | 40 canvas->GetSkCanvas()->drawPath(path, paint); |
41 } | 41 } |
42 | 42 |
43 // Paint the shining sun. | 43 // Paint the shining sun. |
44 { | 44 { |
45 gfx::Path path; | 45 gfx::Path path; |
46 path.addCircle(view->height() / 4, view->height() / 8, view->height() / 16); | 46 path.addCircle(view->height() / 4, view->height() / 8, view->height() / 16); |
47 path.close(); | 47 path.close(); |
48 | 48 |
49 paint.setColor(SK_ColorYELLOW); | 49 paint.setColor(SK_ColorYELLOW); |
50 canvas->AsCanvasSkia()->drawPath(path, paint); | 50 canvas->GetSkCanvas()->drawPath(path, paint); |
51 } | 51 } |
52 } | 52 } |
53 | 53 |
54 } // namespace desktop | 54 } // namespace desktop |
55 } // namespace views | 55 } // namespace views |
OLD | NEW |