Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

插件 API 加一个自动绘制趋势图函数 #1077

Open
AzulEterno opened this issue Mar 5, 2022 · 3 comments
Open

插件 API 加一个自动绘制趋势图函数 #1077

AzulEterno opened this issue Mar 5, 2022 · 3 comments

Comments

@AzulEterno
Copy link

可以添加一个函数类似于GetDataRequired() 在那个类中定时调用
这样就可以减少开发自绘趋势背景的繁杂程度。

bool IfEnableBackgroundDraw(){
     return true;
}

float LogCurrentValue(){
     // 在GetDataRequired之后调用
     // 返回一个介于0.0-1.0之间的值,用于记录当前需要显示的柱状图高度系数

     // 用于自动绘制背景历史。
}

@zhongyang219
Copy link
Owner

已经有类似的函数了:
virtual void OnMonitorInfo(const MonitorInfo& monitor_info) {}
此函数会每秒钟调用一次,向插件传递所有获取到的监控信息,详细说明请参照“插件开发指南

@AzulEterno
Copy link
Author

已经有类似的函数了: virtual void OnMonitorInfo(const MonitorInfo& monitor_info) {} 此函数会每秒钟调用一次,向插件传递所有获取到的监控信息,详细说明请参照“插件开发指南

我的意思是向主程序绘图的灰色背景趋势函数传递一个值,使得主程序可以绘制网速占用背景趋势这种,你提到的这个函数貌似是主程序向插件传递的?

@zhongyang219
Copy link
Owner

我的意思是向主程序绘图的灰色背景趋势函数传递一个值,使得主程序可以绘制网速占用背景趋势这种,你提到的这个函数貌似是主程序向插件传递的?

明白了你的意思了,确实可以考虑增加一个这样的接口

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants