Exemplo n.º 1
0
        public PathF PathForBounds(Rect rect)
        {
            var path = new PathF();

            Data?.AppendToPath(path);

            return(path.AsScaledPath((float)Width / (float)rect.Width));
        }
Exemplo n.º 2
0
        public PathF PathForBounds(Rect rect)
        {
            var path = new PathF();

            path.AppendEllipse(0f, 0f, (float)Width, (float)Height);

            return(path.AsScaledPath((float)Width / (float)rect.Width));
        }
Exemplo n.º 3
0
        public PathF PathForBounds(Rectangle rect)
        {
            var path = new PathF();

            path.MoveTo((float)X1, (float)Y1);
            path.LineTo((float)X2, (float)Y2);

            return(path.AsScaledPath((float)Width / (float)rect.Width));
        }
Exemplo n.º 4
0
        public PathF PathForBounds(Rect rect)
        {
            var path = new PathF();

            if (Points?.Count > 0)
            {
                path.MoveTo((float)Points[0].X, (float)Points[0].Y);

                for (int index = 1; index < Points.Count; index++)
                {
                    path.LineTo((float)Points[index].X, (float)Points[index].Y);
                }
            }

            return(path.AsScaledPath((float)Width / (float)rect.Width));
        }