Forum Discussion

bbrouse's avatar
bbrouse
Visitor
10 years ago

Is it possible to crop/cut off a poster node?

I want to include a star rating on one of my scene graph scenes. My plan is to have an image of all 5 stars in a row and crop the image so it only shows the number of stars that match a rating of a given show (including cases with half stars).

Is there a reasonable way to set the rendered width/height of a given poster node? It looks like setting the width/height of a poster node will scale the image.
  • I would imagine the easiest would be to have an opaque rectangle layer on top of the star ratings and shrink it to allow more stars to show through. Or have single-star sized poster notes and add a node for each star you want to display. Or, have a full sized node and (assuming the stars are from a "wingdings" style font) expand or contract the length of the string.

    - Joel
  • Any chance there's some undocumented support for cropping posters.. something along the lines of SourceRect for roImageCanvas and roRegion for roBitmaps?? Anything like that in SceneGraph?

    I suppose you could use a MaskGroup, but that would only work on OpenGL-enabled boxes, so it's not of much use...