Wait, I think I said that slightly wrong. What I meant is: If we're known to be outside the data window (or do_wrap wouldn't be called), then there are only two cases: either we are still inside the display window (in which no wrap is necessary), or we're already outside the data window. So it all amounts to the same thing, if you follow.
> On Mar 28, 2022, at 10:48 PM, Larry Gritz <l...@larrygritz.com> wrote: > > I think this is correct. Here is the comment at the declaration of do_wrap: > > // Given x,y,z known to be outside the pixel data range, and a wrap > // mode, alter xyz to implement the wrap. Return true if the resulting > // x,y,z is within the valid pixel data window, false if it still is > // not. > bool do_wrap(int& x, int& y, int& z, WrapMode wrap) const; > > This is a private method, and so if it's only called when x,y,z is outside > the data window, then by definition the union of the data window and the > display window is... the display window. > > >> On Mar 28, 2022, at 8:30 PM, Nathan Rusch <nathanru...@gmail.com >> <mailto:nathanru...@gmail.com>> wrote: >> >> I was looking at the source of `ImageBufImpl::do_wrap` today, and I noticed >> that `WrapClamp` always clamps the input coordinates using the display >> window coordinates (`full_x`, `full_y`, `full_width`, `full_height`, etc.). >> >> I always assumed `WrapClamp` would clamp out-of-bounds coordinates to the >> available image area (i.e. the union of the data and display windows), but >> is that not the intended behavior? >> >> Thanks, >> -Nathan >> _______________________________________________ >> Oiio-dev mailing list >> Oiio-dev@lists.openimageio.org <mailto:Oiio-dev@lists.openimageio.org> >> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org > > -- > Larry Gritz > l...@larrygritz.com <mailto:l...@larrygritz.com> > > > > -- Larry Gritz l...@larrygritz.com
_______________________________________________ Oiio-dev mailing list Oiio-dev@lists.openimageio.org http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org