
STM32MP157D-DK1与STM32MP157F-DK2重大区别和推荐选择哪块板子,想做智能家居方面的,
求助,移植touchgfx之后stm32不运行程序。
求助,移植touchgfx之后stm32不运行程序,keil进入debug倒是可以手动运行
ism330dhcxtr的I2c没有应答
请求大佬帮忙
在TouchGFX中显示中文问题
STM32H745I-DISCO的GUI DEMO演示。
STM32H745I-DISCO搭建GUI开发环境。
TouchGFX
STM32cubeProgrammer是否有提供API用于设计定制化的升级软件?
可以多P一张图,放进去。程序里面进行切换
这样的话,每张不同颜色的图片都要存进外部FLASH了,会导致外部FLASH过大;如果能够通过程序去recolor成不同颜色的话,就只需要往外部FLASH中存入一张图片
一种方法,可以准备多张图片,动态切换图片;另一种,可以参考Dynamic Bitmap,可为图片填充任意颜色
下面是参考链接
https://support.touchgfx.com/4.18/docs/development/ui-development/touchgfx-engine-features/dynamic-bitmaps
他们的颜色都是可以编程调整的啊。
比如:
Screen1ViewBase::Screen1ViewBase(){ boxWithBorderName.setPosition(240, 56, 337, 132); boxWithBorderName.setColor(touchgfx::Color::getColorFromRGB(212, 27, 27)); boxWithBorderName.setBorderColor(touchgfx::Color::getColorFromRGB(21, 24, 202)); boxWithBorderName.setBorderSize(20); add(boxWithBorderName);}
Screen1ViewBase::Screen1ViewBase(){ touchgfx::CanvasWidgetRenderer::setupBuffer(canvasBuffer, CANVAS_BUFFER_SIZE); shape.setPosition(140, 36, 200, 200); shape.setOrigin(100.000f, 100.000f); shape.setScale(1.000f, 1.000f); shape.setAngle(0.000f); shapePainter.setColor(touchgfx::Color::getColorFromRGB(60, 180, 230)); shape.setPainter(shapePainter); const touchgfx::AbstractShape::ShapePoint shapePoints4] = { { 0.000f, -100.000f }, { 100.000f, 0.000f }, { 0.000f, 100.000f }, { -100.000f, 0.000f } }; shape.setShape(shapePoints); add(shape);}
[md]第二种方法有具体的源码吗,之前尝试过用动态位图的方法去实现,但是失败了
image控件没有提供setColor
box1.setColor(touchgfx::Color::getColorFromRGB(29,173,161));
box1.invalidate();
比较简单的方法就是在image上方再画个单色BOX,我们根据事件情况来决定其可见性。 比方:
if(ConditionOK)
{
box2.setVisible(false);
box2.invalidate();
}
else
{
box2.setVisible(true);
box2.invalidate();
}
当然,你也可以尝试其它办法。
[md]如果是单一颜色的圆角矩形类的图片可以尝试使用SVG控件,SVG控件利用MCU实时渲染在存储方面要求就能降低不少