Re: Paint like component
- From: "Liz" <liz_wants_no_spam@xxxxxxxxxxxxxxxxxxxxx>
- Date: 28 Nov 2005 08:47:42 -0700
Rudy wrote:
> I am looking for a very basic paint like component, i will be used to
> read peoples signatures and then save them to file. Nothing fancy
> just a pen and "canvas" really
Use TPaintBox comes by default with delphi.
Then save the item as a bitmap.
var
Bitmap: TBitmap;
Source: TRect;
Dest: TRect;
begin
Bitmap := TBitmap.Create;
try
with Bitmap do
begin
Width := MyPaintBox.Width;
Height := MyPaintBox.Height;
Dest := Rect(0, 0, Width, Height);
end;
with MyPaintBox do
Source := Rect(0, 0, Width, Height);
Bitmap.Canvas.CopyRect(Dest, MyPaintBox.Canvas, Source);
Bitmap.SaveToFile('MYFILE.BMP');
finally
Bitmap.Free;
end;
end;
--
Liz the Brit
Delphi things I have released: http://www.xcalibur.co.uk/DelphiThings
.
- Follow-Ups:
- Re: Paint like component
- From: Rudy
- Re: Paint like component
- References:
- Paint like component
- From: Rudy
- Paint like component
- Prev by Date: Re: How could I edit a pascal form on C++Builder ?
- Next by Date: Re: Delphi access for firebird: suggestions please
- Previous by thread: Paint like component
- Next by thread: Re: Paint like component
- Index(es):
Relevant Pages
|