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

Author Topic: Clipping paths or masks  (Read 8664 times)

0 Members and 1 Guest are viewing this topic.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Clipping paths or masks
« Reply #15 on: March 11, 2010, 09:26:48 pm »
Quote
You can create a new generic shape/polygon class to be used both for current drawable shapes and for masks

This is exactly what I was starting to do.

Quote
You can also let maks be extended or to accept grayscale arrays/images for raster alpha channel masks

I have to investigate to find if this would be possible without depth/stencil buffers and alpha channel (because I can't ensure that those will be created). It looks pretty complicated ;)

Quote
Logical classes for polygon and vectors would be usefull, but may not fit with SFML current feel. I would prefer a way where images, shapes, and text logics are completely separated from the display concept (mvc). if we want to draw an image, we create a Sprite, but if we want to draw a shape, we could also create a kind of "sprite" for it, a drawable object with some specific properties for display. Same thing for text and masks. On this point of view, masks are a kind of view object that receives any of these logical objects (shapes, images, text)

This is really ambitious!
Laurent Gomila - SFML developer

model76

  • Full Member
  • ***
  • Posts: 231
    • View Profile
Clipping paths or masks
« Reply #16 on: March 12, 2010, 02:05:50 am »
Quote
With the technique that I intend to use I can have up to 6 clipping lines.
Sounds good, although more lines, and a circular mask would be really useful. :)

Quote
You can also let maks be extended or to accept grayscale arrays/images for raster alpha channel masks
Now that would be REALLY cool! With that you could have a simple way, with the six lines, and an advanced way, with infinite possibilities. That might just be the best way to take care of users of all levels...