Sounds like we are getting different results in that case. Here's a little demo code and screenshots showing the issue I am experiencing (I get the same on Windows and Android):
// Project: cliptest
// Created: 2018-10-02
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle( "cliptest" )
SetWindowSize( 1024, 768, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( 100, 100 ) // doesn't have to match the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts
test_image = CreateImageColor(0,255,0,255)
test_spr = CreateSprite(test_image)
SetSpriteSize(test_spr,80,80)
SetSpritePositionByOffset(test_spr,50,50)
SetSpriteScissor(test_spr,40,50,60,50)
do
Print( ScreenFPS() )
Sync()
loop
In the above code, I'd expect everything to get clipped, but instead I'm seeing the whole sprite:
However, when I increase the y2 value, it clips correctly:
// Project: cliptest
// Created: 2018-10-02
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle( "cliptest" )
SetWindowSize( 1024, 768, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( 100, 100 ) // doesn't have to match the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts
test_image = CreateImageColor(0,255,0,255)
test_spr = CreateSprite(test_image)
SetSpriteSize(test_spr,80,80)
SetSpritePositionByOffset(test_spr,50,50)
SetSpriteScissor(test_spr,40,50,60,51)
do
Print( ScreenFPS() )
Sync()
loop