SolidColorStroke - 大写 属性 不工作
SolidColorStroke - caps property is not working
我正在尝试为矩形设置角和权重
<fx:Script>
<![CDATA[
protected function weight_changeHandler(event:Event):void
{
borderStroke.weight = wght.value;
}
protected function corner_changeHandler(event:Event):void
{
border.topLeftRadiusX= border.bottomLeftRadiusX =border.topRightRadiusX=border.bottomRightRadiusX=corner.value;
}
]]>
</fx:Script>
<s:layout >
<s:VerticalLayout paddingLeft="50" paddingTop="50"/>
</s:layout>
<s:Rect horizontalCenter="0" verticalCenter="0" height="300" width="300" id="border">
<s:stroke>
<s:SolidColorStroke id="borderStroke" color="#000000" caps="square" weight="1" alpha="1"/>
</s:stroke>
</s:Rect>
<s:NumericStepper id="wght" change="weight_changeHandler(event)" maximum="100"/>
<s:NumericStepper id="corner" change="corner_changeHandler(event)" maximum="100"/>
当我增加重量时,直角也在变化。我越来越像这样
谁能告诉我我错过了什么?我的错误是什么?
您只需将 JointStyle
(joints
参数)设置为 JointStyle.MITER
(miter
):
<s:SolidColorStroke id="borderStroke" color="#000000" caps="square" joints="miter" weight="1" alpha="1"/>
希望对您有所帮助。
我正在尝试为矩形设置角和权重
<fx:Script>
<![CDATA[
protected function weight_changeHandler(event:Event):void
{
borderStroke.weight = wght.value;
}
protected function corner_changeHandler(event:Event):void
{
border.topLeftRadiusX= border.bottomLeftRadiusX =border.topRightRadiusX=border.bottomRightRadiusX=corner.value;
}
]]>
</fx:Script>
<s:layout >
<s:VerticalLayout paddingLeft="50" paddingTop="50"/>
</s:layout>
<s:Rect horizontalCenter="0" verticalCenter="0" height="300" width="300" id="border">
<s:stroke>
<s:SolidColorStroke id="borderStroke" color="#000000" caps="square" weight="1" alpha="1"/>
</s:stroke>
</s:Rect>
<s:NumericStepper id="wght" change="weight_changeHandler(event)" maximum="100"/>
<s:NumericStepper id="corner" change="corner_changeHandler(event)" maximum="100"/>
当我增加重量时,直角也在变化。我越来越像这样
谁能告诉我我错过了什么?我的错误是什么?
您只需将 JointStyle
(joints
参数)设置为 JointStyle.MITER
(miter
):
<s:SolidColorStroke id="borderStroke" color="#000000" caps="square" joints="miter" weight="1" alpha="1"/>
希望对您有所帮助。