Exemple #1
0
 protected override void OnDraw(Canvas canvas)
 {
     canvas.DrawColor(ColorBank.GetColor(ColorBank.Background));
     canvas.Save();
     canvas.Translate(rootPivot.X, rootPivot.Y);
     DrawEvent?.Invoke(canvas);
     canvas.Restore();
 }
Exemple #2
0
        protected override void Draw(Canvas canvas)
        {
            paint.Color = ColorBank.GetColor(colorID);
            float ax = 0.5f * HeadX * (1 - VisiblePart);
            float ay = 0.5f * HeadY * (1 - VisiblePart);
            float bx = 0.5f * HeadX * (1 + VisiblePart);
            float by = 0.5f * HeadY * (1 + VisiblePart);
            Path  p  = new Path();

            p.MoveTo(ax, ay);
            p.LineTo(bx, by);
            canvas.DrawPath(p, paint);
        }
Exemple #3
0
        protected override void Draw(Canvas canvas)
        {
            float factor = GameView.scaleFactor * scaleFactor * BirthScaleFactor;

            paint.Color = ColorBank.GetColor(ColorBank.Red);
            canvas.DrawCircle(0, 0, OutRadius * factor, paint);
            paint.Color = ColorBank.GetColor(ColorBank.Background);
            canvas.DrawCircle(0, 0, InRadius * factor, paint);
            if (State == PointState.Selected || State == PointState.UsedByPlayer)
            {
                paint.Color = ColorBank.GetColor(ColorBank.Yellow);
            }
            if (State == PointState.UsedByCompetitor)
            {
                paint.Color = ColorBank.GetColor(ColorBank.Blue);
            }
            canvas.DrawCircle(0, 0, CoreRadius * factor, paint);
        }
 static LoadingIndicator()
 {
     paint       = new Paint(PaintFlags.AntiAlias);
     paint.Color = ColorBank.GetColor(ColorBank.Red);
 }
Exemple #5
0
 static RectContent()
 {
     paint.SetStyle(Paint.Style.Stroke);
     paint.Color       = ColorBank.GetColor(ColorBank.Red);
     paint.StrokeWidth = 6 * GameView.scaleFactor;
 }
Exemple #6
0
 static HLineSwitch()
 {
     paint             = new Paint();
     paint.Color       = ColorBank.GetColor(ColorBank.Red);
     paint.StrokeWidth = 6 * GameView.scaleFactor;
 }
Exemple #7
0
 protected override void Draw(Canvas canvas)
 {
     paint.Color    = ColorBank.GetColor(colorID);
     paint.TextSize = size;
     canvas.DrawText(text, originX, originY, paint);
 }