Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show of eachtilerelpos shows confusing data #6

Open
roflmaostc opened this issue Jun 1, 2022 · 3 comments
Open

show of eachtilerelpos shows confusing data #6

roflmaostc opened this issue Jun 1, 2022 · 3 comments

Comments

@roflmaostc
Copy link
Member

Define

arr = [i*5 + j for i=0:4, j=0:4]
eachtilerelpos(TiledView(arr, (2,2), (0,0)))

Screenshot from 2022-06-01 11-50-31

But

collect(eachtilerelpos(TiledView(arr, (2,2), (0,0))))

Screenshot from 2022-06-01 11-51-24

@RainerHeintzmann
Copy link
Member

Not sure whether there is any problem.

help?> eachtilerelpos
search: eachtilerelpos

  eachtilerelpos(A, scale=nothing)
  returns a generator that iterates through the relative distance of each tile center `1 .+ size(A).÷2` to the center of the the untiled parent array `1 .+ size(parent).÷2`
  The tuple `scale` is used to multiply the relative position with a physical pixelsize.

Is this not what it does?

@roflmaostc
Copy link
Member Author

The function is correct, the show method is just misleading

@RainerHeintzmann
Copy link
Member

I see. Yes, it might be worth writing a show method for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants