Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
ExcludeClipRect in SFML
Print
Pages: [
1
]
Author
Topic: ExcludeClipRect in SFML (Read 1717 times)
0 Members and 1 Guest are viewing this topic.
xumepoc
Jr. Member
Posts: 55
ExcludeClipRect in SFML
«
on:
March 20, 2014, 01:22:18 pm »
Is there any method to ExcludeClipRect and SelectClipRgn, as in GDI, in SFML??
Logged
Laurent
Administrator
Hero Member
Posts: 32498
Re: ExcludeClipRect in SFML
«
Reply #1 on:
March 20, 2014, 02:00:40 pm »
Not easily. However you can play with sf::View and/or sf::RenderTarget to achieve the same results (I assume these functions set a clipping region/rect for rendering).
Logged
Laurent Gomila - SFML developer
xumepoc
Jr. Member
Posts: 55
Re: ExcludeClipRect in SFML
«
Reply #2 on:
March 20, 2014, 07:59:19 pm »
Thanks
I will look into it.
Can you do the same in order to have the same effect as IntersectClipRect(rect) and SelectClipRgn(NULL). This will result in drawing only the things what are inside of the rect coord. Which is useful for when you want to make a list with scroll so you are displaying only the items inside of the rect, no matter how far you have scrolled.
Logged
Laurent
Administrator
Hero Member
Posts: 32498
Re: ExcludeClipRect in SFML
«
Reply #3 on:
March 20, 2014, 08:27:36 pm »
Simulating a clipping rect is easy with sf::View, you just need to set both the view rect and its viewport to the area to clip.
Logged
Laurent Gomila - SFML developer
xumepoc
Jr. Member
Posts: 55
Re: ExcludeClipRect in SFML
«
Reply #4 on:
March 21, 2014, 05:48:22 am »
Thanks for the fast reply!!!
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
ExcludeClipRect in SFML
anything