Solved

copying one timage region to another one

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

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

777 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