Flex的mxml组件中进行图形绘制

在容器内画背景、画框

    <s:Group width="100%" height="100%">
        <s:Rect left="0" right="0" top="0" bottom="0">
            
            <s:fill>
                <s:SolidColor color="0xFF0000" alpha="1" />
            s:fill>
            
            <s:stroke>
                <s:SolidColorStroke color="0xB1BEC2" weight="10"/>
            s:stroke>
        s:Rect>
    s:Group>

绘制圆角矩形背景

<s:Rect left="0" right="0" top="0" bottom="0" radiusX="10">
        
        <s:fill >
            <s:SolidColor color="0x1A4876" alpha="1" />
        s:fill>

    s:Rect>

关键点:radiusX,radiusY

你可能感兴趣的:(Flex)