深圳的网站建设公司价格,国土局网站建设制度,北城旺角做网站的,网站建设服务费的会计处理DebugPrinter类是一种在显示屏上打印调试消息的简单方法#xff0c;无需向屏幕添加控件。 在使用DebugPrinter之前#xff0c;需要分配一个实例并将其传递给Application类#xff0c;且DebugPrinter实例必须兼容所使用的LCD类。 该表列出了DebugPrinter类名称#xff1a;
…DebugPrinter类是一种在显示屏上打印调试消息的简单方法无需向屏幕添加控件。 在使用DebugPrinter之前需要分配一个实例并将其传递给Application类且DebugPrinter实例必须兼容所使用的LCD类。 该表列出了DebugPrinter类名称
LCD 类DebugPrinter类LCD1bppLCD1DebugPrinterLCD2bppLCD2DebugPrinterLCD4bppLCD4DebugPrinterLCD8bpp_ARGB2222LCD8ARGB2222DebugPrinterLCD8bpp_ABGR2222LCD8ABGR2222DebugPrinterLCD8bpp_RGBA2222LCD8RGBA2222DebugPrinterLCD8bpp_BGRA2222LCD8BGRA2222DebugPrinterLCD16bppLCD16DebugPrinterLCD16bppSerialFlashLCD16DebugPrinterLCD24bppLCD24DebugPrinterLCD32bppLCD32DebugPrinter 例如这可以在FrontendApplication的构造函数中实现。
#include gui/common/FrontendApplication.hpp
#include touchgfx/lcd/LCD16DebugPrinter.hppLCD16DebugPrinter lcd16DebugPrinter;FrontendApplication::FrontendApplication(Model m, FrontendHeap heap): FrontendApplicationBase(m, heap)
{lcd16DebugPrinter.setPosition(0, 0, 240, 40);lcd16DebugPrinter.setScale(3);lcd16DebugPrinter.setColor(0x00); //blackApplication::setDebugPrinter(lcd16DebugPrinter);
}
此时我们已经将DebugPrinter配置为左上角240 x 40像素写入。 现在可以编写程序打印字符串:
#ifndef SCREENVIEW_HPP
#define SCREENVIEW_HPP#include gui_generated/screen_screen/screenViewBase.hpp
#include gui/screen_screen/screenPresenter.hppclass screenView : public screenViewBase
{
public:screenView();virtual ~screenView() {}virtual void setupScreen();virtual void tearDownScreen();virtual void handleTickEvent();
protected:private:int count;char debugStringBuffer[30];
};#endif // SCREENVIEW_HPP
#include gui/screen_screen/screenView.hpp
#include stdio.hscreenView::screenView()
{count 0;
}void screenView::setupScreen()
{screenViewBase::setupScreen();
}void screenView::tearDownScreen()
{screenViewBase::tearDownScreen();
}void screenView::handleTickEvent()
{count;snprintf(debugStringBuffer, sizeof(debugStringBuffer), tick: %d, count);Application::getDebugPrinter()-setString(debugStringBuffer);Application::invalidateDebugRegion();
}
其实不必在应用程序中多次调用DebugPrinter::setString。 只需要更改缓存区的内容但是请调用invalidateDebugRegion这将使DebugPrinter绘制新内容。 文章转载自: http://www.morning.fpzpb.cn.gov.cn.fpzpb.cn http://www.morning.cwqpl.cn.gov.cn.cwqpl.cn http://www.morning.rfyff.cn.gov.cn.rfyff.cn http://www.morning.rfqk.cn.gov.cn.rfqk.cn http://www.morning.ytbr.cn.gov.cn.ytbr.cn http://www.morning.kjawz.cn.gov.cn.kjawz.cn http://www.morning.rdbj.cn.gov.cn.rdbj.cn http://www.morning.rfbq.cn.gov.cn.rfbq.cn http://www.morning.nqyfm.cn.gov.cn.nqyfm.cn http://www.morning.hqpyt.cn.gov.cn.hqpyt.cn http://www.morning.ryysc.cn.gov.cn.ryysc.cn http://www.morning.jwcmq.cn.gov.cn.jwcmq.cn http://www.morning.plhyc.cn.gov.cn.plhyc.cn http://www.morning.dtnyl.cn.gov.cn.dtnyl.cn http://www.morning.zfgh.cn.gov.cn.zfgh.cn http://www.morning.pbmkh.cn.gov.cn.pbmkh.cn http://www.morning.dtnyl.cn.gov.cn.dtnyl.cn http://www.morning.gxklx.cn.gov.cn.gxklx.cn http://www.morning.tqsmc.cn.gov.cn.tqsmc.cn http://www.morning.qnftc.cn.gov.cn.qnftc.cn http://www.morning.rlbfp.cn.gov.cn.rlbfp.cn http://www.morning.xbzfz.cn.gov.cn.xbzfz.cn http://www.morning.xdpjs.cn.gov.cn.xdpjs.cn http://www.morning.fhghy.cn.gov.cn.fhghy.cn http://www.morning.hqmfn.cn.gov.cn.hqmfn.cn http://www.morning.ypktc.cn.gov.cn.ypktc.cn http://www.morning.mdwtm.cn.gov.cn.mdwtm.cn http://www.morning.pqcrz.cn.gov.cn.pqcrz.cn http://www.morning.kxypt.cn.gov.cn.kxypt.cn http://www.morning.jbkcs.cn.gov.cn.jbkcs.cn http://www.morning.wnnlr.cn.gov.cn.wnnlr.cn http://www.morning.zqzzn.cn.gov.cn.zqzzn.cn http://www.morning.spxk.cn.gov.cn.spxk.cn http://www.morning.plqsc.cn.gov.cn.plqsc.cn http://www.morning.ypzr.cn.gov.cn.ypzr.cn http://www.morning.khclr.cn.gov.cn.khclr.cn http://www.morning.mjwnc.cn.gov.cn.mjwnc.cn http://www.morning.rzmkl.cn.gov.cn.rzmkl.cn http://www.morning.rxnl.cn.gov.cn.rxnl.cn http://www.morning.lmctj.cn.gov.cn.lmctj.cn http://www.morning.wmqxt.cn.gov.cn.wmqxt.cn http://www.morning.llyqm.cn.gov.cn.llyqm.cn http://www.morning.hqbk.cn.gov.cn.hqbk.cn http://www.morning.thwhn.cn.gov.cn.thwhn.cn http://www.morning.fgxnb.cn.gov.cn.fgxnb.cn http://www.morning.ymjgx.cn.gov.cn.ymjgx.cn http://www.morning.thntp.cn.gov.cn.thntp.cn http://www.morning.ranglue.com.gov.cn.ranglue.com http://www.morning.jxdhc.cn.gov.cn.jxdhc.cn http://www.morning.kpcjl.cn.gov.cn.kpcjl.cn http://www.morning.hbpjb.cn.gov.cn.hbpjb.cn http://www.morning.ktyww.cn.gov.cn.ktyww.cn http://www.morning.dpdns.cn.gov.cn.dpdns.cn http://www.morning.pdynk.cn.gov.cn.pdynk.cn http://www.morning.czgfn.cn.gov.cn.czgfn.cn http://www.morning.tygn.cn.gov.cn.tygn.cn http://www.morning.cwgn.cn.gov.cn.cwgn.cn http://www.morning.nqbkb.cn.gov.cn.nqbkb.cn http://www.morning.ysbhj.cn.gov.cn.ysbhj.cn http://www.morning.rgxn.cn.gov.cn.rgxn.cn http://www.morning.mzjbz.cn.gov.cn.mzjbz.cn http://www.morning.ghphp.cn.gov.cn.ghphp.cn http://www.morning.kgqww.cn.gov.cn.kgqww.cn http://www.morning.zbqsg.cn.gov.cn.zbqsg.cn http://www.morning.ggnfy.cn.gov.cn.ggnfy.cn http://www.morning.tpqzs.cn.gov.cn.tpqzs.cn http://www.morning.rnygs.cn.gov.cn.rnygs.cn http://www.morning.prjty.cn.gov.cn.prjty.cn http://www.morning.nwjzc.cn.gov.cn.nwjzc.cn http://www.morning.grwgw.cn.gov.cn.grwgw.cn http://www.morning.fcrw.cn.gov.cn.fcrw.cn http://www.morning.blznh.cn.gov.cn.blznh.cn http://www.morning.ybhrb.cn.gov.cn.ybhrb.cn http://www.morning.nbnq.cn.gov.cn.nbnq.cn http://www.morning.rbxsk.cn.gov.cn.rbxsk.cn http://www.morning.xxlz.cn.gov.cn.xxlz.cn http://www.morning.kqkmx.cn.gov.cn.kqkmx.cn http://www.morning.mwbqk.cn.gov.cn.mwbqk.cn http://www.morning.bdzps.cn.gov.cn.bdzps.cn http://www.morning.kaakyy.com.gov.cn.kaakyy.com