Skip to content

Improper Drawing Layout in MAUI GraphicsView Due to Extra dirtyRect Size #33110

@ShanmuganSekar-SF4698

Description

@ShanmuganSekar-SF4698

Description

In a simple layout where a parent ContentView sets fixed size (Height=50, Width=100) and hosts a custom GraphicsView with an IDrawable implementation, the Draw(ICanvas canvas, RectF dirtyRect) method receives fractional dimensions (e.g., 50.28 x 100.19) instead of the expected 50 x 100.
This leads to improper drawing, such as thinner lines, off-by-one strokes, and visible border breaks due to the sub-pixel canvas size.

Image

Steps to Reproduce

MauiApp1.zip

  1. Download and open the attached sample in Visual Studio.
  2. Restore NuGet packages and build the solution.
  3. Deploy the app to an Android emulator or device.
  4. Run the app and wait for the main page to load.
  5. Open the Output window in Visual Studio (set to Debug).
  6. Check the logged dirtyRect width and height values from Draw method.
  7. Compare expected size (100 × 50) with actual fractional values (e.g., 100.19 × 50.28).

Link to public reproduction project repository

No response

Version with bug

10.0.11

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

No response

Affected platforms

Android

Affected platform versions

Android 16.0 API 36

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-drawingShapes, Borders, Shadows, Graphics, BoxView, custom drawingpartner/syncfusionIssues / PR's with Syncfusion collaborationplatform/androids/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions