Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: ExcludeClipRect in SFML  (Read 1343 times)

0 Members and 1 Guest are viewing this topic.

xumepoc

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
ExcludeClipRect in SFML
« on: March 20, 2014, 01:22:18 pm »
Is there any method to ExcludeClipRect and SelectClipRgn, as in GDI, in SFML??

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
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).
Laurent Gomila - SFML developer

xumepoc

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: ExcludeClipRect in SFML
« Reply #2 on: March 20, 2014, 07:59:19 pm »
Thanks  :D :D
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. 

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
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.
Laurent Gomila - SFML developer

xumepoc

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: ExcludeClipRect in SFML
« Reply #4 on: March 21, 2014, 05:48:22 am »
Thanks for the fast reply!!! ;D ;D ;D ;D

 

anything