Skip to content

Arc

Examples#

See these.

Arc #

Bases: Shape

Draws an arc scaled to fit inside the given rectangle.

It starts from start_angle radians around the oval up to start_angle + sweep_angle radians around the oval, with zero radians being the point on the right hand side of the oval that crosses the horizontal line that intersects the center of the rectangle and with positive angles going clockwise around the oval. If use_center is True, the arc is closed back to the center, forming a circle sector. Otherwise, the arc is not closed, forming a circle segment.

https://api.flutter.dev/flutter/dart-ui/Canvas/drawArc.html

data #

data: Any = skip_field()

Arbitrary data of any type.

height #

height: Number = 0

The height of the rectangle containing the arc's oval.

key #

key: (
    str | int | float | bool | ValueKey | ScrollKey | None
) = None

page #

page: Page | PageView | None

The page (of type Page or PageView) to which this control belongs to.

paint #

paint: Paint = field(default_factory=lambda: Paint())

A style to draw an arc with.

parent #

parent: BaseControl | None

The direct ancestor(parent) of this control.

It defaults to None and will only have a value when this control is mounted (added to the page tree).

The Page control (which is the root of the tree) is an exception - it always has parent=None.

start_angle #

start_angle: Number = 0

The starting angle in radians to draw arc from.

sweep_angle #

sweep_angle: Number = 0

The length of the arc in radians.

use_center #

use_center: bool = False

Whether this arc is closed back to the center, forming a circle sector. If not closed (False), this arc forms a circle segment.

width #

width: Number = 0

The width of the rectangle containing the arc's oval.

x #

x: Number

The x-axis coordinate of the arc's top left point.

y #

y: Number

The y-axis coordinate of the arc's top left point.

before_event #

before_event(e: ControlEvent)

before_update #

before_update()

This method is called every time when this control is being updated.

Note

Make sure not to call/request an update() here.

did_mount #

did_mount()

init #

init()

is_isolated #

is_isolated()

update #

update() -> None

will_unmount #

will_unmount()