blit inaccuracy

Started by IZACIZAC, May 31, 2013, 11:27:59 PM

Previous topic - Next topic

IZACIZAC

Hey, I am blitting a portion of a texture (1024x256)

buffer.blit(ui,0,0,0,0,600,25,true);

Which is working fine, but when I resize the window

if (Display.wasResized())
            {
                buffer.resize(Display.getWidth(), Display.getHeight());
            }


It no longer draws the portion that I want, and instead draws 1 extra pixels worth (so 26 instead of 25) and shrinks it to fill the 25 pixel space (baiscally it has a big white line under it on screen). It also shifts the entire drawing down by 1, so draws at 1 instead of 0 (both in Y and X). This is only when the Display is a odd number in height/width e.g. 801x601

Is this normal/what should I do to avoid this?

EgonOlsen

Have you tried the latest beta to see if it fixes this problem: http://jpct.de/download/beta/jpct.jar?

IZACIZAC

Perfect. Thanks for the quick reply, prob solved