zoukankan      html  css  js  c++  java
  • 8.1 图像API

    8.1 图像API

     

    Routine

    Description

    Drawing related functions

    GUI_AddRect()

    调整矩形框的大小

    GUI_GetClientRect()

    Returns the current available drawing area.

    GUI_GetDrawMode()

    Returns the current drawing mode.

    GUI_GetPenSize()

    Returns the current pen size in  pixels.

    GUI_GetPixelIndex()

    Returns the color index of a given position.

    GUI_SetClipRect()

    Sets the rectangle used for clipping.

    GUI_SetDrawMode()

    Sets the drawing mode.

    GUI_SetPenSize()

    Sets the pen size in pixels.

    Basic drawing routines

    GUI_Clear()

    Fills the display / the active window with the background color.

    GUI_ClearRect()

    Fills a rectangular area with the background color.

    GUI_CopyRect()

    Copies a rectangle area on the display

    GUI_DrawGradientH()

    Draws a rectangle filled with a horizontal color gradient.

    GUI_DrawGradientV()

    Draws a rectangle filled with a vertical color gra- dient.

    GUI_DrawGradientRoundedH()

    Draws a rectangle with rounded corners filled with a horizontal color gradient.

    GUI_DrawGradientRoundedV()

    Draws a rectangle with rounded corners filled with a vertical color gradient.

    GUI_DrawPixel()

    Draws a single pixel.

    GUI_DrawPoint()

    Draws a point.

    GUI_DrawRect()

    Draws a rectangle.

    GUI_DrawRectEx()

    Draws a rectangle.

    GUI_DrawRoundedFrame()

    Draws a frame with rounded corners.

    GUI_DrawRoundedRect()

    Draws a rectangle with rounded corners.

    GUI_FillRect()

    Draws a filled rectangle.

    GUI_FillRectEx()

    Draws a filled rectangle.

    GUI_FillRoundedRect()

    Draws a filled rectangle with rounded corners.

    GUI_InvertRect()

    Invert a rectangular area.

    Alpha blending

    GUI_EnableAlpha()

    Enables/disables automatic alpha blending

    GUI_PreserveTrans()

    Makes sure that alpha channel remains after drawing operations.

    GUI_RestoreUserAlpha()

    Restores the previous state of user alpha blend- ing

    GUI_SetAlpha()

    Sets the current alpha blending value. (Obso- lete)

    GUI_SetUserAlpha()

    Sets an additional value which is used to calcu- late the actual alpha blending value to be  used.

    Drawing bitmaps

    GUI_DrawBitmap()

    Draws a bitmap.

    GUI_DrawBitmapEx()

    Draws a scaled bitmap.

    GUI_DrawBitmapMag()

    Draws a magnified bitmap.

     

    GUI_SetAlphaMask8888()

    Could be used for setting an additional AND and OR mask to be used for drawing the pixels of 32bpp bitmaps.

     

    GUI_SetClipRect()

        GUI_RECT Rect = { 0, 0, 100, 200 }, Rect2;
        GUI_AddRect(&Rect2, &Rect, -20);
    
    //    GUI_SetClipRect(&Rect2);    // 切掉,不会影响该方框。
    
        GUI_FillRectEx(&Rect);
    
        GUI_Delay(1000);
    //    GUI_SetClipRect(NULL);
        GUI_SetColor(GUI_GREEN);
        GUI_FillRectEx(&Rect);
      

       

        GUI_SetClipRect(&Rect2);    // 切掉,不会影响该方框。
    
        GUI_FillRectEx(&Rect);
    
        GUI_Delay(5000);
    //    GUI_SetClipRect(NULL);
        GUI_SetColor(GUI_GREEN);
        GUI_FillRectEx(&Rect);
      
    
    

      

        GUI_SetClipRect(&Rect2);    // 切掉,不会影响该方框。
    
        GUI_FillRectEx(&Rect);
    
        GUI_Delay(5000);
        GUI_SetClipRect(NULL);
        GUI_SetColor(GUI_GREEN);
        GUI_FillRectEx(&Rect);
      
    
    
  • 相关阅读:
    为 WordPress 标签添加 rel="nofollow" 属性
    Discuz X3.2 SEO设置 title 不支持空格的解决方法
    LANMP 如何禁止访问 .htaccess 文件
    Discuz 哪些文件和文件夹需要777权限
    WordPress 模板常用函数
    CSS控制 table 的 cellpadding,cellspacing
    从 Typecho 自定义字段的调用代码看去
    Linux 服务器如何修改 DNS
    Linux 服务器如何禁止 ping 以及开启 ping
    Asp.Net 加载不同项目程序集
  • 原文地址:https://www.cnblogs.com/qiyuexin/p/10421420.html
Copyright © 2011-2022 走看看