• <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筆記

            廢話

            用過(guò)不知多少開(kāi)源圖像庫(kù),其實(shí)似乎無(wú)例外的都是幾個(gè)圖像解碼庫(kù)zlib、libpng、libjpeg的封裝。夠了,基本可以解決所有圖像問(wèn)題。GdiPlus這種要死不活的東西,拜微軟所賜,偶今天才有空去瞅瞅。玩一下吧,不想為了寫幾行代碼去整個(gè)開(kāi)源的解碼庫(kù)。別了,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 的筆記 閱讀(1076) 評(píng)論(0)  編輯 收藏 引用


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


            国产Av激情久久无码天堂| 久久精品人人做人人妻人人玩| 国产成年无码久久久免费| 国产精品成人久久久久三级午夜电影| 久久久久高潮毛片免费全部播放 | 久久99国产精品一区二区| 久久综合久久美利坚合众国| 国产亚洲精午夜久久久久久| 久久婷婷五月综合国产尤物app| 久久久久久人妻无码| 久久综合色老色| 色妞色综合久久夜夜| 国产偷久久久精品专区| 亚洲AV无码一区东京热久久| 亚洲AV日韩精品久久久久久 | segui久久国产精品| 久久99国产精品99久久 | 韩国三级中文字幕hd久久精品| 99久久精品无码一区二区毛片 | 国产午夜福利精品久久2021| 成人国内精品久久久久影院| 51久久夜色精品国产| 久久99精品九九九久久婷婷| 亚洲精品视频久久久| 久久人人爽爽爽人久久久| 99久久99久久精品国产片果冻| 久久国产香蕉视频| 亚洲欧美日韩久久精品第一区| 狠狠色婷婷综合天天久久丁香| 久久久精品国产亚洲成人满18免费网站| 色99久久久久高潮综合影院| 日韩av无码久久精品免费| 久久综合狠狠综合久久激情 | 久久受www免费人成_看片中文| 91久久精一区二区三区大全| 国产一区二区精品久久凹凸| 久久国产免费直播| 久久久黄片| 久久99国产亚洲高清观看首页| 久久久久99这里有精品10| 99久久国产综合精品麻豆|