Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implicit cast from Microsoft.Maui.Graphics.RectF to Android.Graphics.RectF returns wrong result #8165

Closed
softlion opened this issue Jun 19, 2022 · 1 comment · Fixed by #13225
Assignees
Labels
area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing fixed-in-8.0.0-preview.1.7762 Look for this fix in 8.0.0-preview.1.7762! good first issue Good for newcomers platform/android 🤖 t/bug Something isn't working
Milestone

Comments

@softlion
Copy link
Contributor

Description

image

Steps to Reproduce

Code:

float x=70,y=5,width=10,height=10;
var rect = new Microsoft.Maui.Graphics.RectF(x, y, width, height);
using var rectF_Correct = new Android.Graphics.RectF(x, y, x + width, y + height);
using var rectF_Incorrect = (Android.Graphics.RectF)rect; //Implicit cast, compiles ok, but resulting Rect is incorrect !

Version with bug

Unknown/Other (please specify)

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android API 29; .net 6.0.400-preview.22301.10

Did you find any workaround?

Yes: do not use this cast, manually create the Rect instead.

VS 17.3.0 Preview 2.0
.net 6.0.400-preview.22301.10

Relevant log output

Microsoft Visual Studio Enterprise 2022
Version 17.3.0 Preview 2.0
VisualStudio.17.Preview/17.3.0-pre.2.0+32611.2
Microsoft .NET Framework
Version 4.8.04161

Installed Version: Enterprise

Visual C++ 2022   
Microsoft Visual C++ 2022

ADL Tools Service Provider   1.0
This package contains services used by Data Lake tools

ASA Service Provider   1.0

ASP.NET and Web Tools   17.3.252.56319
ASP.NET and Web Tools

Azure App Service Tools v3.0.0   17.3.252.56319
Azure App Service Tools v3.0.0

Azure Data Lake Tools for Visual Studio   2.6.5000.0
Microsoft Azure Data Lake Tools for Visual Studio

Azure Functions and Web Jobs Tools   17.3.252.56319
Azure Functions and Web Jobs Tools

Azure Stream Analytics Tools for Visual Studio   2.6.5000.0
Microsoft Azure Stream Analytics Tools for Visual Studio

C# Tools   4.3.0-2.22307.7+069a85a786acae3be2c7b49e330b7f968a624c88
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Extensibility Message Bus   1.2.6 (master@34d6af2)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

Microsoft Azure Hive Query Language Service   2.6.5000.0
Language service for Hive query

Microsoft Azure Stream Analytics Language Service   2.6.5000.0
Language service for Azure Stream Analytics

Microsoft Azure Tools for Visual Studio   2.9
Support for Azure Cloud Services projects

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Mono Debugging for Visual Studio   17.3.11 (4f73250)
Support for debugging Mono processes with Visual Studio.

Node.js Tools   1.5.40603.1 Commit Hash:99428bfeee19fbf587bb6cb9ac2613328b013b7a
Adds support for developing and debugging Node.js apps in Visual Studio

NuGet Package Manager   6.3.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

Razor (ASP.NET Core)   17.0.0.2226702+6ac021dcee9db30337fdfc99f710c685002e5dc6
Provides languages services for ASP.NET Core Razor.

SQL Server Data Tools   17.0.62206.01190
Microsoft SQL Server Data Tools

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript Tools   17.0.10601.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools   4.3.0-2.22307.7+069a85a786acae3be2c7b49e330b7f968a624c88
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual C++ for Cross Platform Mobile Development (Android)   17.0.32610.340
Visual C++ for Cross Platform Mobile Development (Android)

Visual C++ for Cross Platform Mobile Development (iOS)   17.0.32610.340
Visual C++ for Cross Platform Mobile Development (iOS)

Visual F# Tools   17.1.0-beta.22281.4+2b8fcc0c0a1cf1d69380159c7d03be993bba4016
Microsoft Visual F# Tools

Visual Studio IntelliCode   2.2
AI-assisted development for Visual Studio.

VisualStudio.DeviceLog   1.0
Information about my package

VisualStudio.Mac   1.0
Mac Extension for Visual Studio

VSPackage Extension   1.0
VSPackage Visual Studio Extension Detailed Info

Xamarin   17.3.0.220 (main@1d7b676)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer   17.3.0.102 (remotes/origin/d17-3@9d1ed6d99)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin Templates   17.2.15 (2e3b60e)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

Xamarin.Android SDK   12.3.99.95 (main/5432886)
Xamarin.Android Reference Assemblies and MSBuild support.
    Mono: dffa5ab
    Java.Interop: xamarin/java.interop/main@1f27ab55
    SQLite: xamarin/sqlite/3.38.5@df4deab
    Xamarin.Android Tools: xamarin/xamarin-android-tools/main@fc3c2ac


Xamarin.iOS and Xamarin.Mac SDK   15.11.0.308 (7ad9f8893)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
@softlion softlion added s/needs-verification Indicates that this issue needs initial verification before further triage will happen t/bug Something isn't working labels Jun 19, 2022
@jsuarezruiz jsuarezruiz added the area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing label Jun 20, 2022
@jsuarezruiz jsuarezruiz self-assigned this Jun 20, 2022
@jfversluis jfversluis removed the s/needs-verification Indicates that this issue needs initial verification before further triage will happen label Jun 20, 2022
@jsuarezruiz jsuarezruiz removed their assignment Aug 31, 2022
@mattleibow mattleibow added this to the Backlog milestone Feb 4, 2023
@ghost
Copy link

ghost commented Feb 4, 2023

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@mattleibow mattleibow added the good first issue Good for newcomers label Feb 4, 2023
@jsuarezruiz jsuarezruiz self-assigned this Feb 9, 2023
@jsuarezruiz jsuarezruiz moved this from Todo to In Progress in MAUI SDK Ongoing Feb 9, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in MAUI SDK Ongoing Feb 9, 2023
@samhouts samhouts added the fixed-in-8.0.0-preview.1.7762 Look for this fix in 8.0.0-preview.1.7762! label Feb 22, 2023
@samhouts samhouts modified the milestones: Backlog, 8.0-preview1 Feb 22, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Mar 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing fixed-in-8.0.0-preview.1.7762 Look for this fix in 8.0.0-preview.1.7762! good first issue Good for newcomers platform/android 🤖 t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants