void UpdateNativeGeometry() { var updatedGeometry = new Rect(ComputeAbsolutePoint(Element), new Size(Element.Width, Element.Height)).ToEFLPixel(); if (NativeView.Geometry != updatedGeometry) { NativeView.Geometry = updatedGeometry; ApplyTransformation(); } }
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); }
/// <include file="../../../docs/Microsoft.Maui.Controls.Shapes/RectangleGeometry.xml" path="//Member[@MemberName='.ctor'][2]/Docs" /> public RectangleGeometry(Rect rect) { Rect = rect; }