• Post Reply Bookmark Topic Watch Topic
  • New Topic

Swapping image areas  RSS feed

 
Chunis galore
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Say I have a square with width (# of rows) 300 and height (# of columns) 300. Say I have two square images both with area 100. If picture 1 starts at row 10 and column 10 and picture 2 starts at row 10 and column 200, how do I swap their areas, essentially swapping their locations? I have tried the following code

It moves my image in the right direction but sort of smears across the image. How can I swap these two image areas so I can change their locations?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!