主要实现画点、画线、画圆、画多边形等操作。
l GUI_DRAWMODE GUI_SetDrawMode(GUI_DRAWMODE mode):可选的mode值为NORMAL、XOR;
l GUI_DRAWMODE GUI_GetDrawMode(void):获取当前绘制模式;
绘图模式的可选值为:GUI_DRAWMODE_XOR/GUI_DRAWMODE_NORMAL
void GUI_GetClientRect(GUI_RECT* pRect):获取当前客户区域,如果不指定,则客户区相当于整个显示区;
由于此类函数会被频繁调用,因而在设计实现时,已经进行了优化。
何种优化,不清楚。Uc/GUI函数调用嵌套较深,很难看清。
l void GUI_ClearRect(int x0, int y0, int x1, int y1):在当前户窗口中以背景色填充矩形区域;
l void GUI_DrawPixel(int x, int y):画一个像素的点;
l void GUI_DrawPoint(int x, int y):画点,不同于DrawPixel,该点大小可变;
l void GUI_DrawRect(int x0, int y0, int x1, int y1):画矩形框;
l void GUI_DrawRectEx(const GUI_RECT *pRect):同上;
l void GUI_FillRect(int x0, int y0, int x1, int y1):矩形填充;
l void GUI_FillRectEx (const GUI_RECT* pRect):同上;
l void GUI_InvertRect(int x0, int y0, int x1, int y1):矩形区域反色;
l void GUI_DrawBitmap(const GUI_BITMAP* pBM, int x, int y);
l void GUI_DrawBitmapMag(const GUI_BITMAP* pBM,int x0, int y0,int XMul, int YMul); 可放大绘制显示;
l void GUI_DrawHLine(int y, int x0, int x1):自动处理位置关系,单像素宽;
l void GUI_DrawLine(int x0, int y0, int x1, int y1);
l void GUI_DrawLineRel(int dx, int dy):相对绘制;
l void GUI_DrawLineTo(int x, int y):终点绘制;
l void GUI_DrawPolyLine(const GUI_POINT* pPoint, int NumPoints, int x, int y):多点绘制;
l void GUI_DrawVLine(int x, int y0, int y1):竖线绘制;
l U8 GUI_GetLineStyle (void);
l U8 GUI_SetLineStyle(U8 LineStyle):样式设置,可选样式:GUI_LS_SOLID/DASH/DOT/DASH_DOT/DASH_DOTDOT(虑线);
l void GUI_DrawPolygon(const GUI_POINT* pPoint, int NumPoints, int x, int y):定义点后,自动关闭起点和终点;
l void GUI_FillPolygon(const GUI_POINT* pPoint, int NumPoints, int x, int y):多边形填充;
l void GUI_DrawCircle(int x0, int y0, int r):r的值必须小于180;
l void GUI_FillCircle(int x0, int y0, int r);
l void GUI_DrawEllipse (int x0, int y0, int rx, int ry):半径值小于180;
l void GUI_FillEllipse(int x0, int y0, int rx, int ry);
l void GL_DrawArc (int xCenter, int yCenter, int rx, int ry, int a0, int a1);a0,a1为起始和结束的角度,值-30-210?360?rx、ry类似于椭圆;
l void GUI_DrawGraph(I16 *paY, int NumPoints, int x0, int y0):有些类似于绘制基于从标轴的曲线;
l void GUI_RestoreContext(const GUI_CONTEXT* pContext):上下文保存,含字体、显示位置等;
l void GUI_SaveContext(GUI_CONTEXT* pContext);
文章评论(0条评论)
登录后参与讨论