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


            亚洲国产成人久久综合碰| 日本福利片国产午夜久久| 99久久久精品免费观看国产| 亚洲精品国产自在久久| 精品欧美一区二区三区久久久| AV色综合久久天堂AV色综合在| 久久久久久久久波多野高潮| 久久综合成人网| 婷婷久久五月天| 欧美黑人激情性久久| 日本五月天婷久久网站| 亚洲人成精品久久久久| 2021国内久久精品| 国产精品久久久久久五月尺| 国产A级毛片久久久精品毛片| 7777久久久国产精品消防器材| 伊人久久大香线蕉亚洲五月天| 人妻无码αv中文字幕久久 | 狠狠色综合网站久久久久久久高清| 四虎国产精品成人免费久久| 一本久久a久久精品综合香蕉 | 精品久久久久久久国产潘金莲| 一级做a爰片久久毛片免费陪| 久久人妻无码中文字幕| 婷婷五月深深久久精品| 久久国产精品久久| 久久精品无码一区二区日韩AV| 一本久久综合亚洲鲁鲁五月天| 人妻无码αv中文字幕久久琪琪布| 精品一区二区久久| 中文精品99久久国产 | 99久久er这里只有精品18| 国产亚洲美女精品久久久| 亚洲欧美精品一区久久中文字幕 | 久久综合香蕉国产蜜臀AV| 久久久中文字幕| 久久亚洲AV成人无码| 狠狠色丁香婷综合久久| 亚洲国产精品狼友中文久久久 | 久久国产成人午夜aⅴ影院| 久久久国产亚洲精品|