Exemplo n.º 1
0
        void UpdateNativeGeometry()
        {
            var updatedGeometry = new Rect(ComputeAbsolutePoint(Element), new Size(Element.Width, Element.Height)).ToEFLPixel();

            if (NativeView.Geometry != updatedGeometry)
            {
                NativeView.Geometry = updatedGeometry;
                ApplyTransformation();
            }
        }
Exemplo n.º 2
0
        static SKPath MakePath(RectangleGeometry rectangleGeometry)
        {
            var  path = new SKPath();
            Rect rect = rectangleGeometry.Rect;

            path.AddRect(new SKRect(
                             Forms.ConvertToScaledPixel(rect.Left),
                             Forms.ConvertToScaledPixel(rect.Top),
                             Forms.ConvertToScaledPixel(rect.Right),
                             Forms.ConvertToScaledPixel(rect.Bottom)),
                         SKPathDirection.Clockwise);

            return(path);
        }
Exemplo n.º 3
0
 /// <include file="../../../docs/Microsoft.Maui.Controls.Shapes/RectangleGeometry.xml" path="//Member[@MemberName='.ctor'][2]/Docs" />
 public RectangleGeometry(Rect rect)
 {
     Rect = rect;
 }