0
我在看的Expanding Item Renders in Datagrid一些示例代碼,我不明白下面的代碼行:這是什麼路徑代碼在做什麼?
Path data="M 0 0 L 8 0 L 4 6 L 0 0 Z"
我知道這是定義用於定義三角形圖形的路徑,但我不明白怎麼它是這樣做的。我試過擺弄數據,但它仍然沒有道理。 任何人都可以闡明這條線在做什麼?
<s:Path data="M 0 0 L 8 0 L 4 6 L 0 0 Z"
top="3" left="3" rotation.up="-90" rotation="-90"
rotation.upAndSelected="0" rotation.overAndSelected="0"
rotation.downAndSelected="0">
<s:fill>
<s:SolidColor color="0x999999" color.over="0x000000" color.overAndSelected="0x000000" />
</s:fill>
</s:Path>
'M 0 0 L 8 0 L 4 6 L 0 0 Z' =移動到0,0行到8,0行到4,6行到0,0。我忘了Z是什麼。可能是某種「結束」的事情。 – DodgerThud
是啊,Z表示「零」,所以你回到由M 0 0定義的第一個座標(0,0)。它只是意味着「完成路徑」:) –