[Enhancement] Modify The Code In GeometryExtensions.cs File To Add Support For Right To Left to CLIP Property #12674
Description
Summary
Hi.currently the CLIP property doesn't support RightToLeft layout (both Android and iOS) and this causes the View doesn't render correctly when a Geometry is applied to it and the Flowdirection is RifgtToLeft (both Android and iOS).(please refer to Issue #11536 )
I think the problem can be solved by modifying the ToAPath and ToCGPath extension methods in GeometryExtensions.cs (Android and iOS)
API Changes
in ToAPath and ToCGPath extension method in GeometryExtensions.cs , the XF Geometry (LineGeometry , RectangleGeometry ,...) is converted to Path Object in Android and iOS.
to make it possible to support RightToLeft for Clip property ,it is necessary:
1-check if the FlowDirection is RightToLeft
2- if the FlowDirection is RightToLeft , this must be considered in calculation of Path points by positioning them toward Top-Right Coordinate like somewhat in following code:
native Path Left Point = (Element.Bounds.Right-Element.Margin.Left -Geometry.Left- Geometry.Width);
Intended Use Case
enabling RightToLeft support for CLIP property , makes it possible to use this feature in Multilingual/Right to left countries.