Exemplo n.º 1
0
        protected override void Draw()
        {
            _floatingParticule.Update();
            var starX = _floatingParticule.X;
            var starY = _floatingParticule.Y;

            var branches   = (int)_fluidSize + 1;
            var reduction  = 0.5f;
            var starRadius = (float)(_radius * Math.Min(1, reduction + 0.3));

            var colorReduction = reduction * reduction;
            var starRed        = (byte)(255 - (255 - _finalColor.Red) * colorReduction);
            var starGreen      = (byte)(255 - (255 - _finalColor.Green) * colorReduction);
            var starBlue       = (byte)(255 - (255 - _finalColor.Blue) * colorReduction);
            var startColor     = CreateColor(starRed, starGreen, starBlue, (byte)(255 * _opacity));

            _angle += 0.001f / (_size * 0.5f);
            var outerRadius = starRadius * 1.0f;
            var innerRadius = outerRadius * .4f;


            _spriteHalo.X      = starX;
            _spriteHalo.Y      = starY;
            _spriteHalo.Width  = starRadius * 8;
            _spriteHalo.Height = starRadius * 8;


            _spriteStar.X      = starX;
            _spriteStar.Y      = starY;
            _spriteStar.Width  = starRadius * 2;
            _spriteStar.Height = starRadius * 2;
        }
Exemplo n.º 2
0
 protected override void Draw()
 {
     FloatingParticule.Update();
     using (var paint = new SKPaint())
     {
         paint.IsAntialias = true;
         paint.StrokeWidth = 2;
         paint.Color       = CreateColor(255, 200, 36);
         //Canvas.DrawCircle(X + Radius + FloatingParticule.X, Y + Radius + FloatingParticule.Y, Radius, paint);
     }
 }