• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            的筆記

            隨時(shí)隨地編輯

            GdiPlus筆記

            廢話

            用過不知多少開源圖像庫,其實(shí)似乎無例外的都是幾個(gè)圖像解碼庫zlib、libpng、libjpeg的封裝。夠了,基本可以解決所有圖像問題。GdiPlus這種要死不活的東西,拜微軟所賜,偶今天才有空去瞅瞅。玩一下吧,不想為了寫幾行代碼去整個(gè)開源的解碼庫。別了,zlib;別了,libpng;別了,skia;別了,freeimage;別了,cximage;別了,devil。別了,opensource。

            source

            MSDN About GDI+
            http://msdn.microsoft.com/en-us/library/ms533797(v=VS.85).aspx

            Getting Started
            http://msdn.microsoft.com/en-us/library/ms533807(v=VS.85).aspx

            Image Class
            http://msdn.microsoft.com/en-us/library/ms534462


            Use

            Note the call to GdiplusStartup in the WinMain function. The first parameter of the GdiplusStartup function is the address of a ULONG_PTR. GdiplusStartup fills that variable with a token that is later passed to the GdiplusShutdown function. The second parameter of the GdiplusStartup function is the address of a GdiplusStartupInput structure. The preceding code relies on the default GdiplusStartupInput constructor to set the structure members appropriately.

            1.引用
            #include <gdiplus.h>
            using namespace Gdiplus;
            #pragma comment (lib,"Gdiplus.lib")

            2.初始化與銷毀

            GdiplusStartupInput gdiplusStartupInput;
            ULONG_PTR           gdiplusToken;
            // Initialize GDI+.
            GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);// Shutdown
            GdiplusShutdown(gdiplusToken);

            3.畫

            VOID OnPaint(HDC hdc)
            {
               Graphics graphics(hdc);
               Pen      pen(Color(255, 0, 0, 255));
               graphics.DrawLine(&pen, 0, 0, 200, 100);
            }

            posted on 2011-07-13 16:24 的筆記 閱讀(1070) 評(píng)論(0)  編輯 收藏 引用


            只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


            久久久久一区二区三区| 久久久久女教师免费一区| 2021国产精品久久精品| 久久91精品国产91| 久久亚洲美女精品国产精品| 久久国产精品久久精品国产| 国产精品激情综合久久| 无码国内精品久久人妻| 91精品国产综合久久香蕉| 精品国产乱码久久久久软件| 无码AV波多野结衣久久| 久久精品国产99国产精品| av午夜福利一片免费看久久| 精品久久久久久99人妻| 国产欧美一区二区久久| 欧美成人免费观看久久| 91精品免费久久久久久久久| 丰满少妇人妻久久久久久| 99久久综合国产精品免费| Xx性欧美肥妇精品久久久久久| 中文字幕乱码人妻无码久久| 亚洲国产成人精品无码久久久久久综合 | 久久久久99精品成人片| 国产精品久久影院| 性欧美丰满熟妇XXXX性久久久| 久久青青草原亚洲av无码| 色偷偷888欧美精品久久久| 久久人人爽爽爽人久久久| 热久久视久久精品18| 久久毛片免费看一区二区三区| 国产2021久久精品| 97热久久免费频精品99| 久久青青草原亚洲av无码app| 一本一本久久aa综合精品| 久久精品成人欧美大片| 久久无码AV中文出轨人妻| 亚洲综合精品香蕉久久网| 久久亚洲美女精品国产精品| 国产精品久久一区二区三区| 88久久精品无码一区二区毛片| 99久久无码一区人妻|