示例#1
0
        /// <include file="../../../docs/Microsoft.Maui.Controls.Shapes/LineGeometry.xml" path="//Member[@MemberName='AppendPath']/Docs" />
        public override void AppendPath(PathF path)
        {
            float startPointX = (float)StartPoint.X;
            float startPointY = (float)StartPoint.Y;

            float endPointX = (float)EndPoint.X;
            float endPointY = (float)EndPoint.Y;

            path.Move(startPointX, startPointY);
            path.LineTo(endPointX, endPointY);
        }
示例#2
0
        /// <include file="../../../docs/Microsoft.Maui.Controls.Shapes/LineGeometry.xml" path="//Member[@MemberName='AppendPath']/Docs" />
        public override void AppendPath(PathF path)
        {
            double density = 1.0d;

#if ANDROID
            density = DeviceDisplay.MainDisplayInfo.Density;
#endif

            float startPointX = (float)(density * StartPoint.X);
            float startPointY = (float)(density * StartPoint.Y);

            float endPointX = (float)(density * EndPoint.X);
            float endPointY = (float)(density * EndPoint.Y);

            path.Move(startPointX, startPointY);
            path.LineTo(endPointX, endPointY);
        }
示例#3
0
 public override void AppendPath(PathF path)
 {
     path.Move((float)StartPoint.X, (float)StartPoint.Y);
     path.LineTo((float)EndPoint.X, (float)EndPoint.Y);
 }