提交 c9dd7125 编写于 作者: M Matt Perry

Fix up constructor naming style for MaskFilter and ColorFilter.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1179913002.
上级 b9738108
......@@ -8,6 +8,6 @@ part of dart.sky;
class ColorFilter extends _ColorFilter {
// This is the only ColorFilter type we need, but use a named constructor so
// we can add more in the future.
ColorFilter.Mode(Color color, TransferMode transferMode)
ColorFilter.mode(Color color, TransferMode transferMode)
: super(color, transferMode) {}
}
......@@ -14,7 +14,7 @@ enum BlurStyle {
// Extends the generated _MaskFilter interface via the PrivateDart attribute.
class MaskFilter extends _MaskFilter {
MaskFilter.Blur(BlurStyle style, double sigma,
MaskFilter.blur(BlurStyle style, double sigma,
{bool ignoreTransform: false, bool highQuality: false})
: super(style.index, sigma, _makeBlurFlags(ignoreTransform, highQuality));
......
......@@ -55,7 +55,7 @@ class Sprite extends NodeWithSize {
Paint paint = new Paint();
paint.setARGB((255.0*_opacity).toInt(), 255, 255, 255);
if (colorOverlay != null) {
paint.setColorFilter(new ColorFilter.Mode(colorOverlay, TransferMode.srcATopMode));
paint.setColorFilter(new ColorFilter.mode(colorOverlay, TransferMode.srcATopMode));
}
if (transferMode != null) {
paint.setTransferMode(transferMode);
......
......@@ -55,10 +55,10 @@ void main() {
(Paint layerPaint) {
layerPaint.color = const Color.fromARGB(128, 255, 255, 0);
layerPaint.setColorFilter(
new ColorFilter.Mode(const Color.fromARGB(128, 0, 0, 255),
new ColorFilter.mode(const Color.fromARGB(128, 0, 0, 255),
TransferMode.srcInMode));
layerPaint.setMaskFilter(
new MaskFilter.Blur(BlurStyle.normal, 3.0, highQuality: true));
new MaskFilter.blur(BlurStyle.normal, 3.0, highQuality: true));
})
..addLayerOnTop(
new DrawLooperLayerInfo()
......
......@@ -21,7 +21,7 @@ void beginFrame(double timeStamp) {
(Paint layerPaint) {
layerPaint.color = const Color.fromARGB(128, 55, 55, 55);
layerPaint.setMaskFilter(
new MaskFilter.Blur(BlurStyle.normal, 5.0, highQuality: true));
new MaskFilter.blur(BlurStyle.normal, 5.0, highQuality: true));
})
// Main layer.
..addLayerOnTop(new DrawLooperLayerInfo(), (Paint) {});
......
......@@ -18,7 +18,7 @@ class ShadowDrawLooperBuilder {
(sky.Paint layerPaint) {
layerPaint.color = color;
layerPaint.setMaskFilter(
new sky.MaskFilter.Blur(sky.BlurStyle.normal,
new sky.MaskFilter.blur(sky.BlurStyle.normal,
blur,
highQuality: true));
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册