该模块的想法是能够以图形方式表示管道内部的数据。
例如,数据如下所示:
1,4
这将是function y=f(x)
,其中:
4=f(1)
我需要使用此行
TODO: WritePointToHTML(rawData);
其基本思想是生成HTML文件,其代码将绘制所需的行。
我试图使用html画一条线,但是我不明白如何在管道中表示它
var canvas = document.getElementById('Canvas');
var context = canvas.getContext('2d');
答案 0 :(得分:-1)
我假设原始海报正在寻找线条,而不是使用c#管道。
#include <iostream>
#include <windows.h>
const int MAX_WND_TEXT = 60;
int main()
{
POINT p;
char wndName[MAX_WND_TEXT];
while (true)
{
GetCursorPos(&p);
HWND hWnd = WindowFromPoint(p);
if (hWnd)
{
HWND hWndRoot = GetAncestor(hWnd, GA_ROOTOWNER); // or GetAncestor(GA_ROOT), or GetAncestor(GA_PARENT), or GetParent(), as needed...
HWND hWndChild = NULL;
if ((hWndRoot) && (hWndRoot != hWnd))
{
hWndChild = hWnd;
hWnd = hWndRoot;
}
if (!GetWindowTextA(hWnd, wndName, MAX_WND_TEXT))
wndName[0] = '\0';
std::cout << p.x << " " << p.y << std::endl;
std::cout << "'" << wndName << "'" << std::endl;
if (hWndChild)
{
ScreenToClient(hWndChild, &p);
if (!SendMessageA(hWndChild, WM_GETTEXT, MAX_WND_TEXT, (LPARAM)wndName))
wndName[0] = '\0';
std::cout << p.x << " " << p.y << std::endl;
std::cout << "'" << wndName << "'" << std::endl;
}
}
Sleep(100);
}
return 0;
}
//在斜率公式中添加了“绘制斜率”。 https://codepen.io/hollyeplyler/pen/gqYyZx