函数名 |
px_void PX_GeoDrawLine(px_surface *psurface, px_int x0, px_int y0, px_int x1, px_int y1 ,pt_int lineWidth, px_color color); |
说明 |
绘制一个反走样线段 |
参数 |
psurface 渲染表面 x0 y0起始点坐标 x1 y1 终点坐标 lineWidth 线宽 color 颜色 |
在PX_ApplicationRender中添加画线代码(如下所示),分别绘制三根:
(100,100)---> (600,100) 的 宽度为2的 红线
(100,200)---> (600,200) 的 宽度为6的 绿线
(100,300)---> (600,300) 的 宽度为12的 蓝线
px_void PX_ApplicationRender(PX_Application *pApp,px_dword elpased)
{
px_surface *pRenderSurface=&pApp->runtime.RenderSurface;
PX_RuntimeRenderClear(&pApp->runtime,PX_COLOR(255,255,255,255));
PX_GeoDrawLine(pRenderSurface,100,100,600,100,2,PX_COLOR(255,255,0,0));
PX_GeoDrawLine(pRenderSurface,100,200,600,200,6,PX_COLOR(255,0,255,0));
PX_GeoDrawLine(pRenderSurface,100,300,600,300,12,PX_COLOR(255,0,0,255));
}