I have created a class that receives a vector ofImage and then uses a for loop to iterate through the images and section them up using drawSubsection like so:
void Grid::display(){
for (int i = 0; i <images.size(); i++){
for (int r = 0; r <= 11; r++) { //rows of my 12x6 grid - itterates through r=0, r=1, r=2
for (int c = 0; c <= 5; c++) { //cols of my 12x6 grid - itterates through c=0, c=1, c=2
images[i].drawSubsection(r*75, c*100, 75, 100, r*75, c*100);
}
}
}
}
This sections up all the images in to the 12x6 grid and displays them on top of each other. What I would like to do now is organise the image sections within each image so that they are organised by a column. As if the sections are layered. So for instance clicking on the top left section of one image would then reveal the top left section of the image behind.
Any suggestions on how to organise these image sections to do this? Not sure if I would be able to do this with drawSubsection() as I don’t think it actually sections the images. Maybe another method is required. Hope it makes sense.