示例#1
0
        public void paint(Canvas canvas, Color color, _UiPathFactory uiPathFactory, float progress)
        {
            float opacity = AnimatedIconUtils._interpolate(opacities, progress);
            Paint paint   = new Paint();

            paint.style = PaintingStyle.fill;
            paint.color = color.withOpacity(color.opacity * opacity);
            Path path = uiPathFactory();

            foreach (_PathCommand command in commands)
            {
                command.apply(path, progress);
            }

            canvas.drawPath(path, paint);
        }
示例#2
0
 public _AnimatedIconPainter(
     _PathFrames[] paths        = null,
     Animation <float> progress = null,
     Color color                  = null,
     float?scale                  = null,
     bool?shouldMirror            = null,
     _UiPathFactory uiPathFactory = null
     ) : base(repaint: progress)
 {
     this.paths         = paths;
     this.progress      = progress;
     this.color         = color;
     this.scale         = scale;
     this.shouldMirror  = shouldMirror;
     this.uiPathFactory = uiPathFactory;
 }