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

            热久久视久久精品18| 久久嫩草影院免费看夜色| 久久九九久精品国产免费直播| 久久亚洲色一区二区三区| 欧美精品国产综合久久| 久久se精品一区二区| 久久精品成人免费国产片小草| 天堂无码久久综合东京热| 久久99精品国产自在现线小黄鸭| 青青青青久久精品国产h| 日日狠狠久久偷偷色综合免费 | 99久久精品国产一区二区蜜芽 | 久久精品成人免费观看97| 亚洲狠狠婷婷综合久久蜜芽| 久久亚洲国产午夜精品理论片| 亚洲欧美另类日本久久国产真实乱对白 | 久久人人超碰精品CAOPOREN| 精品人妻伦九区久久AAA片69| 精品久久久久久无码人妻蜜桃| 亚洲成色WWW久久网站| 久久久久国产一区二区三区| 国产一区二区精品久久| 色偷偷久久一区二区三区| 久久人妻少妇嫩草AV无码蜜桃| 一级做a爰片久久毛片16| 97久久久久人妻精品专区 | 国产精品免费久久| 欧洲人妻丰满av无码久久不卡| 中文精品99久久国产 | 久久亚洲精品人成综合网| 久久综合九色综合久99| 久久久久亚洲?V成人无码| 2021久久精品国产99国产精品| 一本色综合网久久| 亚洲中文字幕无码一久久区| 亚洲欧美久久久久9999| 久久久久高潮综合影院| 中文字幕人妻色偷偷久久| 2021国产精品午夜久久| 囯产极品美女高潮无套久久久 | 91精品久久久久久无码|