I have box2d and qml working together nice. I am generating a polygon like this
Polygon{
vertices: [
Qt.point(6, 22),
Qt.point(10, 64),
Qt.point(46, 89),
Qt.point(82, 64),
Qt.point(84, 21),
开发者_开发技巧 Qt.point(45, 1)
]
}
but can not add
Polygon{
...
...
**color: red**
}
it does not allow with a red line under "color".
should i do some javascript attraction?
thanks
you have to use hexadecimal colors. or using Common.b2Color object. you can see documentation here http://www.box2dflash.org/docs/2.1a/reference/
color : #FFFFFF;
or b2Color(rr:Number, gg:Number, bb:Number);
精彩评论