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

Side by Side Diff: sky/sdk/lib/framework/components2/radio.dart

Issue 1171543002: Use an enum for Dart bindings for Skia Paint style (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « sky/engine/core/painting/PaintingStyle.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 import 'package:sky/framework/theme2/colors.dart' as colors; 5 import 'package:sky/framework/theme2/colors.dart' as colors;
6 6
7 import 'dart:sky' as sky; 7 import 'dart:sky' as sky;
8 import '../fn2.dart'; 8 import '../fn2.dart';
9 import '../rendering/box.dart'; 9 import '../rendering/box.dart';
10 import '../rendering/object.dart'; 10 import '../rendering/object.dart';
(...skipping 23 matching lines...) Expand all
34 return new EventListenerNode( 34 return new EventListenerNode(
35 new Container( 35 new Container(
36 margin: const EdgeDims.symmetric(horizontal: 5.0), 36 margin: const EdgeDims.symmetric(horizontal: 5.0),
37 desiredSize: new sky.Size(diameter, diameter), 37 desiredSize: new sky.Size(diameter, diameter),
38 child: new CustomPaint( 38 child: new CustomPaint(
39 callback: (RenderObjectDisplayList canvas) { 39 callback: (RenderObjectDisplayList canvas) {
40 40
41 sky.Paint paint = new sky.Paint()..color = color; 41 sky.Paint paint = new sky.Paint()..color = color;
42 42
43 // Draw the outer circle 43 // Draw the outer circle
44 paint.style = 1; // SkPaint::STROKE_STYLE; 44 paint.setStyle(sky.PaintingStyle.stroke);
45 paint.strokeWidth = 2.0; 45 paint.strokeWidth = 2.0;
46 canvas.drawCircle(outerRadius, outerRadius, outerRadius, paint); 46 canvas.drawCircle(outerRadius, outerRadius, outerRadius, paint);
47 47
48 // Draw the inner circle 48 // Draw the inner circle
49 if (value == groupValue) { 49 if (value == groupValue) {
50 paint.style = 0; // SkPaint::FILL_STYLE; 50 paint.setStyle(sky.PaintingStyle.fill);
51 canvas.drawCircle(outerRadius, outerRadius, innerRadius, paint); 51 canvas.drawCircle(outerRadius, outerRadius, innerRadius, paint);
52 } 52 }
53 } 53 }
54 ) 54 )
55 ), 55 ),
56 onGestureTap: _handleClick 56 onGestureTap: _handleClick
57 ); 57 );
58 } 58 }
59 59
60 void _handleClick(_) { 60 void _handleClick(_) {
61 onChanged(value); 61 onChanged(value);
62 } 62 }
63 } 63 }
OLDNEW
« no previous file with comments | « sky/engine/core/painting/PaintingStyle.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698