• <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   管理


            亚洲欧美日韩久久精品| 一级做a爰片久久毛片看看| 亚洲综合日韩久久成人AV| 久久久久亚洲av无码专区| 777米奇久久最新地址| 久久99亚洲综合精品首页| 精品国产乱码久久久久软件| 久久精品人人槡人妻人人玩AV| 久久Av无码精品人妻系列| 精品久久久久国产免费| 亚洲av日韩精品久久久久久a | 97香蕉久久夜色精品国产 | 久久婷婷人人澡人人| 久久久久久国产精品无码下载 | 久久精品国产久精国产思思| 99久久精品免费国产大片| 久久人人爽人人爽人人片AV高清| 狠狠色丁香久久婷婷综| 一本色道久久99一综合| 久久久艹| 国产高清国内精品福利99久久| 久久久久亚洲AV无码网站| 久久成人18免费网站| 久久久噜噜噜久久中文福利| 久久久无码精品亚洲日韩京东传媒| 草草久久久无码国产专区| 精品久久久噜噜噜久久久| 日韩人妻无码精品久久免费一| 日日狠狠久久偷偷色综合免费 | 国内精品九九久久久精品| 亚洲中文字幕无码久久精品1| 热综合一本伊人久久精品| 久久精品中文字幕第23页| 91精品国产91久久久久久蜜臀| aaa级精品久久久国产片| 久久久久久久97| 97久久超碰成人精品网站| 久久夜色精品国产欧美乱| 色偷偷偷久久伊人大杳蕉| 久久国产精品成人片免费| 久久精品国产秦先生|