Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Clipping in 2D drawing commands

Author
Message
george++
AGK Tool Maker
17
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 27th Aug 2017 19:27 Edited at: 27th Aug 2017 19:27
Is it possible with AppGameKit?
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 27th Aug 2017 21:25
which kind of clipping do you mean ?
clipping on sprites or the draw-XXX commands ?
george++
AGK Tool Maker
17
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 27th Aug 2017 22:19 Edited at: 27th Aug 2017 22:21
The draw-XXX commands.
For examble the following code:
Quote: "
SetScissor2D(10.0, 10.0, 50.0, 50.0)
DrawLine(0, 0, 100.0, 100.0, 250, 0, 0)
"

will force AppGameKit to draw a line, visible only in the rectangle defined by the scissor command
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 27th Aug 2017 22:46
Sorry but where is the problem ?
george++
AGK Tool Maker
17
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 27th Aug 2017 23:02 Edited at: 27th Aug 2017 23:08
The effect of the current command applies to the sprites also.

EDIT: I think you mean that I can use the SetScissor command only for the 2D drawing and then restore the output for the whole screen.
Quote: "
SetScissor2D(10.0, 10.0, 50.0, 50.0)
DrawLine(0, 0, 100.0, 100.0, 250, 0, 0)
Render()
SetScissor2D(0.0, 0.0, 100.0, 100.0)
do other stuff
"

Login to post a reply

Server time is: 2024-09-30 07:29:53
Your offset time is: 2024-09-30 07:29:53