arrayfire / forge

High Performance Visualization
222 stars 48 forks source link

grid x,y coordinates are not consistent when plotted #181

Closed matkraj closed 6 years ago

matkraj commented 6 years ago

I am trying to use window.grid in an organised way, but the images seem to be placed in the window by a different key than .grid(a,b). I tried to swap x,y in myWindow(x,y) which results in overlapping images.

code:

unsigned int gridx = 5;
unsigned int gridy = 2;
af::Window myWindow(gridx*64,gridy*64,"disk");
myWindow.grid(gridy,gridx);

myWindow(0,0).image(disk, "0,0 disk");
myWindow(0,1).image(disk, "0,1 disk");
myWindow(0,2).image(disk, "0,2 disk");
myWindow(0,3).image(disk, "0,3 disk");
myWindow(0,4).image(disk, "0,4 disk");

myWindow(1,0).image(disk, "1,0 disk");
myWindow(1,1).image(disk, "1,1 disk");
myWindow(1,2).image(disk, "1,2 disk");
myWindow(1,3).image(disk, "1,3 disk");
myWindow(1,4).image(disk, "1,4 disk");

myWindow.show()

results in: image

9prady9 commented 6 years ago

I have moved the issue to downstream where it is related to https://github.com/arrayfire/arrayfire/issues/2204