Recent Posts
Selamat datang di Coding Delphi Land Weblog kumpulan source code pemogram delphi
(Bukan maksud untuk menggurui tetapi marilah kita berbagi ilmu tuk perkembangan kemajuan teknologi kita
Sabtu, 14 November 2009
Changin Shape
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Image1: TImage;
procedure Button1Click(Sender: TObject);
procedure Image1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
Image : TBitmap;
Area : Hrgn;
begin
//coded by Jason Myerscough
Image := Image1.Picture.Bitmap; //get the picture from The image componet
Area := CreateEllipticRgn(5, 10, 400, 500); //Set the area you want the picture to appear
SelectClipRgn(Canvas.Handle , Area); //Set the Area as the canvas
canvas.Draw(0, 0, Image); //Draw the picture to the canvas
//finally Rate this code =P
end;
end.
0 komentar:
Posting Komentar