//---------------------------------------------------------------------------
#include
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Image1MouseMove(TObject *Sender, TShiftState Shift,
int X, int Y)
{
xx=X;
yy=Y;
P2=0;
for(int i=0;i
{
for(int j=0;j
{
Image2->Canvas->Pixels[(i+P2)][(j+P1)]=Image1->Canvas->Pixels[i+xx][j+yy];
Image2->Canvas->Pixels[(i+P2)][(j+(P1+1))]=Image1->Canvas->Pixels[i+xx][j+yy];
Image2->Canvas->Pixels[(i+(P2+1))][(j+P1)]=Image1->Canvas->Pixels[i+xx][j+yy];
Image2->Canvas->Pixels[(i+(P2+1))][(j+(P1+1))]=Image1->Canvas->Pixels[i+xx][j+yy];
}
P1=0;
P2++;
}
}
//---------------------------------------------------------------------------
No hay comentarios:
Publicar un comentario