本页内容

C

ArcItem QML Type

定义一个以给定起始值和结束值为参数的弧形。更多...

Import Statement: import QtQuickUltralite.Studio.Components
Since: Qt Quick Ultralite 2.7
Inherits:

Shape

属性

详细说明

您可以通过为其begin 和end 属性设置值来定义弧形。该弧形可以仅为一条线,也可以是带填充的轮廓。strokeColor 和strokeWidth 属性用于定义线条或轮廓的外观。

弧线起始点与终点之间的区域(即轮廓内部)将使用fillColor 属性定义的纯色填充,或使用ShapeGradient 的某个子类型定义的gradient 进行填充。若同时启用fillcolor 和gradient ,则使用渐变效果。

要创建带有轮廓的弧,请将其outlineArc 属性设置为true 。arcWidth 属性定义了弧的轮廓总宽度,包括轮廓和填充部分。

根据round 、roundBegin 和roundEnd 属性的值,弧线轮廓的端点可以是圆角。如果弧线没有轮廓,则其capStyle 属性定义了线条的结束方式(方头或圆角)。

属性文档

arcWidth : real [default]

具有轮廓的弧线的总宽度,包括轮廓和填充部分。

另请参阅 begin 、end 以及strokeWidth 。

begin : real [default]

弧线起始位置的度数。

要创建一个圆,请将此属性的值设置为 0,并将end 属性的值设置为 360。

capStyle : int

如果弧线没有轮廓,则采用该线条的顶点样式。

常量描述
ShapePath.FlatCap一个不覆盖线段终点的方形线端。
ShapePath.SquareCap一个方形线端,它覆盖线段的端点,并向外延伸出线宽的一半。
ShapePath.RoundCap圆角线端。

默认的 capStyle 为ShapePath.FlatCap ,这意味着方形线端不覆盖端点。

另请参阅 round 、roundBegin 、roundEnd 和ShapePath::capStyle 。

end : real [default]

弧线结束时的角度位置。

要创建一个圆,请将此属性的值设置为 360,并将begin 属性的值设置为 0。

fillColor : color

弧线的填充颜色。

如果弧线仅由单线构成,则会填充其起始点(begin )与终点(end )之间的区域。如果弧线带有轮廓线,则会填充轮廓线内部的区域。

gradient 用于定义弧线的填充颜色。如果同时启用fillcolor 和gradient ,则使用渐变效果。

当设置为“transparent ”时,不会进行填充。

默认值为white 。

gradient : int

弧形填充色的渐变效果。如果启用此选项,则会忽略fillColor 属性,并使用ShapeGradient 子类型之一对弧形进行填充。

默认情况下,不启用渐变,且值为null 。此时,填充将根据fillColor 的值使用纯色。

outlineArc : bool

该弧线是否具有轮廓。

另请参阅 arcWidth 、begin 、end 、round 、roundBegin 以及roundEnd 。

round : bool

弧线轮廓的端点是否具有圆角。

可通过roundBegin 和roundEnd 属性分别指定各端点的圆角。

roundBegin : bool

弧线轮廓是否以圆角开头。

另请参阅 round 和roundEnd 。

roundEnd : bool

弧线轮廓是否以圆头结束。

另请参阅 round 和roundBegin 。

strokeColor : color

弧线或轮廓线的颜色。

当设置为transparent 时,不会绘制线条。

默认值为red 。

strokeWidth : int [default]

弧线或轮廓线的宽度。

当设置为负值时,不绘制线条。

在某些 Qt 许可证下可用。
了解更多信息。