ÓÃdelphi°ÑͼÏñÐýת180¶È
ÕâÁ½ÌìÓõ½ÁËͼÏñ´¦Àí£¬ÐèÒª°ÑͼÏñÐýת180¶È£¬ºÜ¼òµ¥µÄͼÏñ´¦Àí£¬µ«ÎÒÊÇÐÂÀ´µÄ£¬»¨È¥Á˺ܳ¤Ê±¼ä£¬½á¹ûÄØ£¬»¹Ã»¸ã¶¨……
ÏÂÃæÊÇÎÒдµÄ´úÂ룬Ëã·¨ºÜ¼òµ¥£¬°Ñµã[SWidth-1-PX,SHeight-1-PY]¸úµã[x,y]µÄÑÕÉ«×öһϽ»»»£¬µ«ÊÇЧ¹ûºÜÔã¸â£¬×ªµÄ·Ç³£Âý¡£ÎÒ³¢ÊÔÓÅ»¯Ëã·¨£¬°ÑÑÕÉ«ÐÅÏ¢¶ÁÈ¡µ½Ö®ºó£¬½øÐÐһϱȽϣ¬Èç¹ûÑÕÉ«Ò»Ñù¾Í²»ÓÃ×ö½»»»ÁË£¬ÑÕÉ«²»Ò»ÑùÔÙ½»»»¡£Ã»¸Ð¾õµ½Ëٶȱä¿ìÁË¡£ÓÖÉÏÍøÕÒÁ˺ܶàÏà¹ØÎÄÕ£¬·¢Ïִ󲿷ֵÄËã·¨ÊÇÎÒûÓо¹ý±È½ÏµÄËã·¨£¬»¹ÓÐ360¶ÈÐýתµÄ£¬Ëã·¨¸üÂé·³£¬×îºóÎҸijÉÒýÓÃwindows×Ô´øµÄͼƬºÍ´«Õæä¯ÀÀÆ÷ÁË£¬Ïêϸ´úÂëÔÚÏÂһƪ·Å³ö¡£
ÒÔÏÂÊÇÎÒÓÃ×Ô¼ºµÄË㷨дµÄÐýת180¶ÈµÄ´úÂ룬ϣÍû¸ßÈËÄÜ°ïÎÒ¿´¿´£¬ÎÊÌâ³öÔÚÄÄÀΪʲôÐýתµÄÕâôÂý£¬²»Ê¤¸Ð¼¤£¡
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, jpeg, ExtCtrls,Math;
type
TForm1 = class(TForm)
Image1: TImage;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
procedure bmp_rotate(src,dst:tbitmap{;angle:extended});
var
SWidth,SHeight,SHalfHeight{°ë¸ß}:integer;
PX,PY:integer;
FSHalfHeight:real;
c0,c1:tcolor;
begin
SWidth:=src.Width;
SHeight:=src.Height;
//ÅжÏÐÐÊýÊÇÆæÊý»¹ÊÇżÊý£¬ÊÇÆæÊýµÄ»°µ¥¶À½»»»×óÓÒÏñËØÑÕÉ«£¬ÊÇżÊýÔòÌø¹ý
SHalfHeight:=floor(SHeight/2);
FSHalfHeight:=SHeight/2;
if SHalfHeight<FSHalfHeight then
begin
PY:=SHalfHeight;
for PX :=0 to floor(SWidth/2) do begin
c0:=src.Canvas.Pixels[PX,PY];
c1:=src.Canvas.Pixels[SWidth-1-PX,PY];
if c0=c1 then
else
begin
dst.Canvas.Pixels[SWidth-1-PX,PY]:=c0;
dst.Canvas.Pixels[PX,PY]:=c1;
end
end;
end;
// ¿ªÊ¼Ðýת
for PY :=0 to SHalfHeight-1 do begin
for PX :=0 to SWidth-1 do begin
c0:=src.Canvas.Pixels[PX,PY];
c1:=src.Canvas.Pixels[SWidth-1-
Ïà¹ØÎĵµ£º
Delphi²Ù×÷INIÎļþ²½ÖèÈçÏ£º
-------------------------------------
1£©ÔÚUsesÖÐÌí¼ÓiniFileµ¥Ôª£»
2£©ÉùÃ÷TiniFile¶ÔÏó£»
3£©´´½¨TiniFile¶ÔÏó£»
----------------try------------------
4£©INIÎļþ¶Áд²Ù×÷£»
--------------finally----------------
5£©ÊÍ·ÅTiniFile¶ÔÏó£»
---------------end--------------- ......
ÓÉÓÚ×é¼þÌṩµÄ·½Ê½²»Í¬£¬ËùÒÔ°²×°µÄ·½·¨Ò²ÊDz»Ò»ÑùµÄ£¬ÏÂÃæ¾ÍÄ¿Ç°³£¼ûµÄ¸÷ÖÖÐÎʽµÄ×é¼þµÄ°²×°·½·¨½éÉÜһϡ£
1 Ö»ÓÐÒ»¸öDCUÎļþµÄ×é¼þ¡£DCUÎļþÊDZàÒëºÃµÄµ¥ÔªÎļþ£¬ÕâÑùµÄ×é¼þÊÇ×÷Õß²»Ïë°ÑÔ´Â빫²¼¡£Ò»°ãÀ´Ëµ£¬×÷Õß±ØÐë˵Ã÷´Ë×é¼þÊʺÏDelphiµÄÄÄÖÖ°æ±¾£¬Èç¹û°æ±¾²»¶ ......
¶¯Ì¬Á´½Ó¿âÊÇÒ»¸öÄܹ»±»Ó¦ÓóÌÐòºÍÆäËüµÄDLLµ÷ÓõĹý³ÌºÍº¯ÊýµÄ¼¯ºÏÌå,ËüÀïÃæ°üº¬µÄÊǹ«¹²´úÂë»ò×ÊÔ´¡£ÓÉÓÚDLL´úÂëʹÓÃÁËÄÚ´æ¹²Ïí¼¼Êõ,ÔÚijЩµØ·½windowsÒ²¸øÁËDLLһЩ¸ü¸ßµÄȨÏÞ,Òò¶øDLLÖпÉÒÔʵÏÖһЩһ°ã³ÌÐòËù²»ÄÜʵÏֵŦÄÜ,ÈçʵÏÖwindowsµÄHOOK¡¢ISAPIµÈ¡£Í¬Ê±,DLL»¹Îª²»Í¬ÓïÑÔ¼ä´úÂë¹²ÏíÌṩÁËÒ»Ìõ·½±ãµÄ;¾¶¡£Òò¶øD ......
Ò» DllµÄÖÆ×÷Ò»°ã²½Öè
¶þ ²ÎÊý´«µÝ
Èý DLLµÄ³õʼ»¯ºÍÍ˳öÇåÀí[Èç¹ûÐèÒª³õʼ»¯ºÍÍ˳öÇåÀí]
ËÄ È«¾Ö±äÁ¿µÄʹÓÃ
Îå µ÷Óþ²Ì¬ÔØÈë
Áù µ÷Óö¯Ì¬ÔØÈë
Æß ÔÚDLL½¨Á¢Ò»¸öTForM
°Ë ÔÚDLLÖн¨Á¢Ò»¸öTMDIChildForM
¾Å ʾÀý£º
Ê® DelphiÖÆ×÷µÄDllÓëÆäËûÓïÑԵĻìºÏ ......
DelphiÖÐÓÐÒ»¸öÏß³ÌÀàTThreadÊÇÓÃÀ´ÊµÏÖ¶àÏ̱߳à³ÌµÄ£¬Õâ¸ö¾ø´ó¶àÊýDelphiÊé½å¶¼ÓÐ˵µ½£¬µ«»ù±¾É϶¼ÊǶÔTThreadÀàµÄ¼¸¸ö³ÉÔ±×÷Ò»¼òµ¥½éÉÜ£¬ÔÙ˵Ã÷Ò»ÏÂExecuteµÄʵÏÖºÍSynchronizeµÄÓ÷¨¾ÍÍêÁË¡£È»¶øÕâ²¢²»ÊǶàÏ̱߳à³ÌµÄÈ«²¿£¬ÎÒд´ËÎĵÄÄ¿µÄÔÚÓÚ¶Ô´Ë×÷Ò»¸ö²¹³ä¡£
Ï̱߳¾ÖÊÉÏÊǽø³ÌÖÐÒ»¶Î²¢·¢ÔËÐеĴú ......