Skip to content

[Impeller] Lines with stroke width < 1 physical pixel are too thick. #144313

@nadrolinux

Description

@nadrolinux

Steps to reproduce

It looks like there is a cap at strokeWidth with Impeller. I tested it on iOS 17 device and simulator. I see the same effects with:

_mPaint.strokeWidth = 0.05;
_mPaint.style = PaintingStyle.stroke;

like with:

_mPaint.strokeWidth = 0.01;
_mPaint.style = PaintingStyle.stroke;

For me it looks like a 0.05 is a minimum value, however in Skia I don't see this limitation and I can draw really thin lines. Thin lines are important for effects like a school's paper cards etc.

Expected results

Thin lines should be rendered without artificial cap, like with Skia.

Actual results

There is a IMHO high minimum limit for strokeWidth.

Code sample

_mPaint.strokeWidth = 0.05;
_mPaint.style = PaintingStyle.stroke;

Screenshots or Video

No response

Logs

No response

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.16.9, on macOS 14.3.1 23D60 darwin-x64, locale pl-PL)
    • Flutter version 3.16.9 on channel stable at /Users/patryk/Programowanie/sdk/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 41456452f2 (5 weeks ago), 2024-01-25 10:06:23 -0800
    • Engine revision f40e976bed
    • Dart version 3.2.6
    • DevTools version 2.28.5

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.


[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15C500b
    • CocoaPods version 1.15.2

[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).

[✓] VS Code (version 1.86.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.82.0

[✓] VS Code (version 1.86.1)
    • VS Code at /Users/patryk/Downloads/Visual Studio Code.app/Contents
    • Flutter extension version 3.82.0

[✓] Connected device (2 available)
    • iPhone SE (mobile) • 00008030-001254281AD2402E • ios        • iOS 17.3 21D50
    • macOS (desktop)    • macos                     • darwin-x64 • macOS 14.3.1 23D60 darwin-x64

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 3 categories.

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listc: renderingUI glitches reported at the engine/skia or impeller rendering levele: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.found in release: 3.19Found to occur in 3.19found in release: 3.20Found to occur in 3.20has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions