Perhaps you can add it to some of the vocabs in the images.* hierarchy? I think images.tesselation or images.processing would be suitable. Also see the tesselate word, if I'm not mistaken it does the same thing as your generate-sprite-sheet word. But there is nothing like your image-part and new-image-like words afaict, so those would be useful. But maybe you should rename image-part to crop-image? Cutting a smaller image from an existing one is a cropping operation.
> For a small game that I was making in order to get accustomed to factor, > I needed to load textures from a sprite sheet. Basically, I wanted to > take an image and split it into pieces of fixed dimensions. I wasn't > able to find words to help me there (may be there are and I am unaware). > So I ended up introducing a few new words: > > new-image-like: create a new empty image having properties of an > existing image but with modified dimensions > > image-part: extract a part of an image into a separate image > > generate-sprite-sheet: given an image, produce a sequence of images > having fixed width and heights > > These new words can be seen implemented here: > https://github.com/rationalrevolt/factor-practice/blob/master/images/sprites/sprites.factor > > A small test program using these words is present here: > https://github.com/rationalrevolt/factor-practice/blob/master/sprite-test/sprite-test.factor > > If these are useful, could someone recommend a vocabulary that could > contain them? The words new-image-like and image-part could reside in > the images vocab. I'm not sure where the generate-sprite-sheet word > could fit in or if it is sufficiently useful to include. -- mvh/best regards Björn Lindqvist ------------------------------------------------------------------------------ Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140 _______________________________________________ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk