函数名 |
px_void PX_GeoDrawRect(px_surface *psurface, px_int left, px_int top, px_int right, px_int bottom,px_color color); |
说明 |
绘制一个实心矩形 |
参数 |
psurface 渲染表面 left top right bottom 位置描述 color 颜色 |
在PX_ApplicationRender中添加代码(如下所示),分别绘制一个:
(100,100)---> (300,300) 的 宽度为8的 红色 半透明 矩形
(200,200)---> (500,500) 的 宽度为8的 蓝色 半透明 矩形
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_GeoDrawRect(pRenderSurface,100,100,300,300,PX_COLOR(128,255,0,0));
PX_GeoDrawRect(pRenderSurface,200,200,500,500,PX_COLOR(128,0,0,255));
}