|
本帖最后由 飞翔的竹蜻蜓 于 2019-5-23 14:29 编辑
做控制界面的时候用了TouchGFX,目前需要绘制一个颜色可变的三角形,并且位置可以移动,目前的想法是用shape类绘制,但是shape怎么使用?
- shape.setCorner(0, CWRUtil::Q5(25), CWRUtil::Q5(0));
- shape.setCorner(1, CWRUtil::Q5(0), CWRUtil::Q5(50));
- shape.setCorner(2, CWRUtil::Q5(50), CWRUtil::Q5(50));
- //shape.setShape();
- shapePainter.setColor(touchgfx::Color::getColorFrom24BitRGB(18, 141, 172));
- shape.setPainter(shapePainter);
- shape.setPosition(0,0,100,100);
- //shape.setXY(0,0);
- shape.setWidth(0);
- shape.setAlpha(0xaa);
- shape.setVisible(true);
- //shape.setHeight(100);
- shape.setOrigin(25,0);
-
- add(shape);
复制代码
不知道问题出在了哪里?各路大神为指点迷津
|
|