• <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 的筆記 閱讀(1079) 評論(0)  編輯 收藏 引用

            欧美激情精品久久久久久久九九九| 手机看片久久高清国产日韩| 国产精品久久毛片完整版| 久久精品中文字幕久久| 久久午夜福利电影| 久久精品亚洲中文字幕无码麻豆 | 国内精品伊人久久久久777| 欧美一区二区三区久久综合| 香蕉久久夜色精品国产小说| 亚洲精品第一综合99久久| 国产精品久久影院| 亚洲中文久久精品无码ww16| 99久久免费只有精品国产| 亚洲香蕉网久久综合影视| 国产91久久综合| 久久99国产精品一区二区| 久久精品中文字幕一区| 久久精品国产黑森林| 亚洲国产精品无码久久久蜜芽| 久久91精品综合国产首页| 久久久这里有精品中文字幕| 久久亚洲国产精品成人AV秋霞 | 91精品日韩人妻无码久久不卡 | 日韩欧美亚洲综合久久影院Ds | 午夜精品久久久久| 久久WWW免费人成—看片| 九九99精品久久久久久| 韩国免费A级毛片久久| 久久久久av无码免费网| 久久国产香蕉一区精品| 久久99国产一区二区三区| av无码久久久久不卡免费网站 | 国产精品欧美久久久久天天影视| 久久精品国产网红主播| 人妻丰满AV无码久久不卡| 国内精品人妻无码久久久影院导航 | 中文字幕亚洲综合久久| 久久香蕉综合色一综合色88| www久久久天天com| 欧美激情精品久久久久| 国产精品久久久天天影视香蕉|