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(); }
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); }
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); }
static RectContent() { paint.SetStyle(Paint.Style.Stroke); paint.Color = ColorBank.GetColor(ColorBank.Red); paint.StrokeWidth = 6 * GameView.scaleFactor; }
static HLineSwitch() { paint = new Paint(); paint.Color = ColorBank.GetColor(ColorBank.Red); paint.StrokeWidth = 6 * GameView.scaleFactor; }
protected override void Draw(Canvas canvas) { paint.Color = ColorBank.GetColor(colorID); paint.TextSize = size; canvas.DrawText(text, originX, originY, paint); }