IRiS nX
114 ARTICLES / 235 REPLIES [1:2]
=ADMIN=


#121. ÀüºÀÈÆ
TBitmap ¿¡ ´ëÇÑ Áú¹®ÀÌ ÀÖ½À´Ï´Ù. 2005/07/20 (Wed)

µ¨¸¶´ç¿¡ Áú¹®À» µÎ¹øÀ̳ª ÇßÁö¸¸ ¾Æ¹«µµ ´äº¯ÇØ ÁÖ´Â »ç¶÷ÀÌ ¾ø¾î¼­.. ÀÌ·¸°Ô ÀÌ°÷À» ã°Ô µÇ¾ú½À´Ï´Ù.

TBitmapÀ» ·¡ÇÎÇϴ Ŭ·¡½º¸¦ Á¦ÀÛÁßÀÔ´Ï´Ù. Ŭ·¡½º À̸§Àº TDIB Àä

Page, BmpFile : TDIB; ¶ó°í ¼±¾ðÇϸé

BmpFile.Draw(Page, 0, 0); ÀÌ·±½ÄÀ¸·Î
µå·ÎÀ× ÇÒ ¼ö ÀÖ½À´Ï´Ù.

±×·±µ¥ »ý¼ºÀÚ¿¡¼­ ¾È¿¡ ÀÖ´Â TBitmap °´Ã¼¸¦ Create ÇÔ¿¡µµ ºÒ±¸ÇÏ°í ScanLineÀ» ÀÌ¿ëÇÑ Draw ÇÔ¼ö¿¡¼­ ¾ï¼¼½º ¹ÙÀ̿÷¹À̼ÇÀÌ ³³´Ï´Ù. µÑ´Ù BMP ÆÄÀÏÀ» ·ÎµåÇÏ¸é ±¦Âú±¸¿ä. ¾Æ¸¶ ScanLineÀÌ ¼¼ÆÃÀÌ ¾ÈµÇ°Å³ª ¸Þ¸ð¸®°¡ ÇÒ´çÀÌ ¾ÈµÈ °Í °°Àºµ¥¿ä..

TBitmap.Create ÇÑ ´ÙÀ½¿¡ ¾î¶² ÀÛ¾÷À» ÇØ ÁÖ¾î¾ß Æ÷ÀÎÅ͸¦ »ç¿ëÇÒ ¼ö ÀÖÀ»±î¿ä?

#121-1. ÀüºÀÈÆ 2005/07/20 (Wed)
Ãß°¡»çÇ×
Âü°í·Î Image ÄÄÆ÷³ÍÆ® À§¿¡ ±×¸®´Â DrawÇÔ¼öµµ Àִµ¥ ¶È°°Àº ±¸Á¶ÀÓ¿¡µµ ±×°ÍÀº Àß µË´Ï´Ù.

#121-2. ¾È¿µ±â 2005/07/21 (Thu)

var
    bitmap: TDIB;
    pDest32: ^DWORD;
    i, j: integer;
begin
    bitmap := TDIB.Create();
    bitmap.Width := 100;
    bitmap.Height := 100;
    bitmap.PixelFormat := pf32bit;
    bitmap.Canvas.FillRect(bitmap.Canvas.ClipRect);

    for j := 0 to pred(bitmap.Height) do begin
        pDest32 := bitmap.ScanLine[j];
        for i := 0 to pred(bitmap.Width) do begin
            pDest32^ := $FF0000;
            inc(pDest32);
        end;
    end;

    Canvas.Draw(0, 0, bitmap);

    bitmap.Free();
end;


ÀÌ·± ½ÄÀ¸·Î Ãâ·ÂÇÏ·ÁÇßÀ» ¶§ ¹®Á¦°¡ »ý±ä´Ù¸é ¹º°¡ TDIB¿¡ ¹®Á¦°¡ ÀÖ´Â °ÍÀÔ´Ï´Ù. ±×¸®°í TDIBÀÇ ±¸Çö¿¡ ¹®Á¦°¡ ÀÖ´Â °æ¿ì¿¡´Â ±¸ÇöÇÑ ¼Ò½º°¡ ¾øÀ¸¸é ¿øÀÎÀ» ¾ËÁö ¸øÇÕ´Ï´Ù.
(À§ÀÇ °á°ú·Î´Â windowÀÇ (0,0)ºÎÅÍ (100,100)±îÁö »¡°£ »ç°¢ÇüÀÌ ³ªÅ¸³³´Ï´Ù.)

ÀÏ´Ü TDIB¸¦ ±¸ÇöÇÒ ¶§ inherited¸¦ »©¸ÔÀº ºÎºÐÀÌ ÀÖ´ÂÁö È®ÀÎÇÏ°í ±× ºÎºÐ¿¡ ¹®Á¦°¡ ¾øÀ» ¶§´Â ¼Ò½º¸¦ Á÷Á¢ ¿Ã·Á ÁÖ¼¼¿ä.


NAME / EMAIL
URL
SUBJECT
MESSAGE
ATTACH
ATTACH STYLE COOKIE  
[PREV] [NEXT] return


IRiS nX by NvyU =starry scape=