⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stk_cht.cpp

📁 windRiver提供的的Zinc5.3完整源码,文档非常齐全
💻 CPP
字号:
//==================================================================////	stk_cht.cpp	-- demonstrates a simple 2D stack chart////==================================================================#include <zaf.hpp>#include <cf_api/bz_zcht.hpp>#include <cff3_zaf.h>const int NUM_GROUPS = 5;const int NUM_POINTS = 10;double	DATA[NUM_GROUPS][NUM_POINTS] = { 	{ 33, 30, 27, 24, 21, 18, 15, 12,  9,  6 },	{ 20, 18, 14,  2, 14, 37, 35, 30, 24, 23 },	{ 16, 15, 23, 17, 24, 20, 18, 13, 28, 16 },	{ 20, 15, 10, 12, 14, 20, 24, 28, 30, 32 },	{ 12,  8,  6,  8, 12, 15, 16, 15, 12,  8,},};////	ChartWindow is a simple ZafWindow enclosing a ZafChart//class ChartWindow : public ZafWindow{public:    ChartWindow ();private:  	ZafChart*		chart;};ChartWindow::ChartWindow ()		: ZafWindow (10, 10, 50, 10){	AddGenericObjects (new ZafStringData ("ChartFolio Test"));    //     //	add a ZafChart to our Window:    //	chart = new ZafChart (0, 0, 0, 0, CF_ID_STACK_2D);    chart->SetRegionType (ZAF_AVAILABLE_REGION);    Add (chart);	//	//	add data to our chart:	//	for (int i = 0; i < NUM_GROUPS; i++)	{    	for (int j = 0; j < NUM_POINTS; j++)        {		    chart->AddDataPoint (i + 1, DATA[i][j]);        }    }}////	Simple, generic Main () -- add a new window to the window manager //	and allow Control () to process events//ZafApplication::Main (){	zafWindowManager->Add (new ChartWindow);    Control ();	return (0);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -