Skip to content

stroke_dash_pattern is not applied to all canvas shapes #1791

@zrr1999

Description

@zrr1999

Description
stroke_dash_pattern is not effective

Code example to reproduce the issue:

import flet as ft
import math 

def main(page: ft.Page):
    page.add(
        ft.canvas.Canvas(
            [
                ft.canvas.Circle(
                    150,
                    150,
                    130,
                    ft.Paint(
                        color=ft.colors.BLUE,
                        stroke_width=4,
                        stroke_dash_pattern=[0.5, 0.5],
                        style=ft.PaintingStyle.STROKE,
                    ),
                ),
                ft.canvas.Arc(
                    10,
                    10,
                    240,
                    240,
                    0,
                    math.pi,
                    paint=ft.Paint(
                        color=ft.colors.BLUE,
                        stroke_width=4,
                        stroke_dash_pattern=[100, 100],
                        style=ft.PaintingStyle.STROKE,
                    ),
                ),
                ft.canvas.Arc(
                    20,
                    20,
                    220,
                    220,
                    0,
                    2 * math.pi,
                    paint=ft.Paint(
                        color=ft.colors.BLUE,
                        stroke_width=4,
                        stroke_dash_pattern=[100, 100],
                        style=ft.PaintingStyle.STROKE,
                    ),
                ),
            ],
            width=300,
            height=300,
        )
    )

ft.app(target=main)

Describe the results you received:
image

Describe the results you expected:

image

Additional information you deem important (e.g. issue happens only occasionally):

Flet version (pip show flet):

0.9.0

Operating system:
Windows

Additional environment details:

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcontrols

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions