Solved

copying one timage region to another one

Posted on 2001-07-12
2
252 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
problem when i try to pack my dll file with upx 9 72
FMX StringGrid1->Canvas->FillRect Problem 3 128
control image tags in a string ? 12 111
DBGrid or StringGrid ? 6 71
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

896 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now