Solved

copying one timage region to another one

Posted on 2001-07-12
2
254 Views
Last Modified: 2010-04-06
Hi guys!

I want a procedure to copy a rectangular region of a timage to another timage in my form. Any ideas?

best regards
Manuel Lopez (lopem)
0
Comment
Question by:lopem
  • 2
2 Comments
 
LVL 6

Expert Comment

by:MannSoft
ID: 6279198
I would use the COPYRECT method.  An example:

DestRect.Left := 0;
DestRect.Top := 0;
DestRect.Right := 50;
DestRect.Bottom := 50;
SourceRect.Left := 0;
SourceRect.Top := 0;
SourceRect.Right := 50;
SourceRect.Bottom := 50;
Image1.Canvas.CopyRect(DestRect, Image2.Canvas, SourceRect);

This would copy a 50x50 square from the top left corner of Image2 into Image1.
0
 
LVL 6

Accepted Solution

by:
MannSoft earned 50 total points
ID: 6279200
Hmm after looking in the help file it looks like it would be easier doing:

DestRect := Rect(0, 0, 50, 50);
SourceRect := Rect(0, 0, 50, 50);

(They are both of type TRect BTW)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question