Example #1
0
        public override void Draw(Canvas canvas)
        {
            base.Draw(canvas);

            var circleX = canvas.Width / 2 - CircleShape.MinimumWidth / 4;
            var circleY = canvas.Height / 2 - CircleShape.MinimumHeight;

            CircleShape.SetBounds(circleX, circleY, circleX + CircleShape.MinimumWidth, circleY + CircleShape.MinimumHeight);
            CircleShape.Draw(canvas);

            LabelPaint.GetTextBounds(BubbleText, 0, BubbleText.Length, textBoundsRect);
            canvas.DrawText(BubbleText,
                            circleX + CircleShape.MinimumWidth / 2 - textBoundsRect.Width() / 2,
                            (canvas.Height - textBoundsRect.Height()) / 2, LabelPaint);
        }