ÓÃ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-
Ïà¹ØÎĵµ£º
3.2 Óû§µÇ¼·½°¸
ÔÚ½øÈëÒ»¸öϵͳʱ£¬±ØÐëÏÈÔڵǼ´°ÌåÖÐÊäÈëÕýÈ·µÄÓû§ÃûºÍÃÜÂë²ÅÄܽøÈë¡£ÕâÑù¿ÉÒÔÈ·±£ÏµÍ³µÄ°²È«ÐԺͱ£ÃÜÐÔ£¬µÇ¼´°ÌåµÄÖÆ×÷°´ÕÕϵͳµÄ´óС¼°Óô¦£¬¿ÉÒÔ·ÖΪ²»Í¬µÄµÇ¼´°ÌåÑùʽ£¬ÔÚϵͳµÚÒ»´ÎµÇ¼ǰ£¬Ê×ÏÈÒª¶Ô²Ù×÷Ô±ÐÅÏ¢½øÐÐÏàÓ¦µÄÉèÖᣱ¾½Ú½«¶ÔµÇ¼´°Ìå¼°²Ù×÷Ô±¹ÜÀí´°ÌåµÄÖÆ×÷¹ý³Ì½øÐÐÏêϸµÄ˵Ã÷ ......
DelphiÖÐʵÏÖÎļþ¿½±´µÄÈýÖÖ·½·¨
1£®µ÷ÓÃAPIº¯Êý
procedure CopyFile(fromFileName,ToFileName:string);
var
f1,f2:file;
Begin
AssignFile(f1,fromFileName); file://Ö¸¶¨Ô´ÎļþÃû
AssignFile(f2,ToFileName); file://Ö¸¶¨Ä¿±êÎļþÃû
Reset(f1);
Try
Rewrite(f2);
Try
If Lzcopy(TfileRec(f1).handle,TfileRe ......
×¢£º ʹÓôíÎ󣬻òÕßÔڸüӵĵط½Ã»Óмӣ¬¿ÉÄÜ»á³öÏÖ"privileged instruction"´íÎ󣬻òÕßµØÖ··ÃÎÊ´íÎó¡£
³£¼ûµÄµ÷ÓùßÀýÓÐregister, pascal, cdecl, stdcall, safecall¡£º¯ÊýµÄµ÷ÓùÜÀí¾ö¶¨Á˲ÎÊýÈçºÎ´«µÝ¸ø×Ó¹ý³Ì£¬²¢´Ó¶ÑÕ»ÖÐÍ˳ö£¬ÒÔ¼°¼Ä´æÆ÷ÔÚ²ÎÊý´«µÝÖеÄʹÓ㬴íÎóºÍÒì³£µÄ´¦Àí¡£DelphiÖÐĬÈϵĵ ......
¿ª·¢²½Ö裺
1¡¢´´½¨ActiveX Library¹¤³Ì¡£
2¡¢´´½¨COM Object¡£
3¡¢´´½¨Type Library£¬²¢´´½¨ÏàÓ¦½Ó¿Ú¡£
4¡¢´´½¨½Ó¿Ú¶ÔÓ¦µÄº¯ÊýºÍʵÏÖ¡£
¾ßÌåÈçÏ£º
1¡¢´´½¨ActiveX Library¹¤³Ì¡£
new|other|activeX|activeX library
Delphi»á×Ô¶¯Éú³É¿ò¼Ü´úÂ룬ֱ½Ó±àÒëµÄ»°¾Í¿ÉÒԵõ½Ò»¸ödllÎļþÁË£»
Èç¹ûÏë±àÒë³öÀ´µÄÊÇocxÎÄ ......