Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
EnTerr
Roku Guru

ChangeMatchingRegions() - what does it do?

roCompositor's ChangeMatchingRegions has this terse description:
"ifCompositor" wrote:
ChangeMatchingRegions(oldRegion as Object, newRegion as Object) as Void
Global search and replace of Sprite roRegions.

Replaces regions that match oldRegion with newRegion.
It's unclear here
  • what "global" means (local to roCompositor instance - or global to the player?), also

  • what it means by using plural "regions" (can params be lists of regions?) and

  • what to "match" means (identity? dimension equality?).

Going out on a limb here, i am guessing perhaps what it does is: go over all roSprites for this roCompositor instance, checks their respective roRegions and if it finds literally the same oldRegion (the same pointer, that is), replaces it with newRegion. Am i close?

Also, shouldn't roCompositor support some way to enumerate all belonging sprites, like ifEnum ?
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.