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

            的筆記

            隨時隨地編輯

            GdiPlus筆記

            廢話

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

            国产成人精品综合久久久久 | 精品久久久久久中文字幕大豆网| 久久黄视频| 国产aⅴ激情无码久久| 一本一道久久精品综合| 亚洲欧美久久久久9999| 久久精品国产99国产电影网| 亚洲国产成人久久综合一| 久久福利片| avtt天堂网久久精品| 精品国产乱码久久久久软件| 久久99免费视频| 亚洲精品午夜国产VA久久成人| 国产成人久久激情91| 97精品伊人久久大香线蕉| 国产精品综合久久第一页| 久久久久久亚洲精品成人| 漂亮人妻被中出中文字幕久久| 国产成人精品久久| 精品久久久久久无码专区 | 国产99久久精品一区二区| 久久99热这里只有精品66| 99久久国产主播综合精品| 九九精品99久久久香蕉| 国产毛片欧美毛片久久久| 2021国产精品午夜久久| 亚洲人AV永久一区二区三区久久| 久久久久综合国产欧美一区二区 | 国产精品久久精品| 久久精品成人欧美大片| 99久久综合国产精品免费| 亚洲国产日韩欧美久久| 亚州日韩精品专区久久久| 亚洲国产香蕉人人爽成AV片久久| 日韩亚洲国产综合久久久| 久久久久国产| 亚洲人成无码网站久久99热国产 | 国产99精品久久| 久久亚洲国产欧洲精品一| 亚洲狠狠久久综合一区77777| 国产精品福利一区二区久久|