On Mon, Mar 2, 2009 at 12:48 PM, mstramba <mikestra...@gmail.com> wrote:
> > Greetings, > > I have a ColorForm create from : (Form fromFileNamed: cards). > > It's an 840x504x8 png file of a deck of playing cards, i.e. showing all > the > cards. > > I want to create individual ColorForms, each representing one playing card > from the 'master' colorform. > > So I guess I need to (in a loop) extract a rectangular area of pixels from > the original ColorForm and then create a new colorform from those extracted > pixels. > > I'm looking at the ColorForm, ImageMorph, Form .. and other superlcasses > methods, but haven't figured out which combination of methods I need to > use. > eachCard := masterForm copy: (0...@0 corner: 8...@504). You'll need to replace 0...@0 and 8...@504 with the coordinates you need. Also, this is fun: (Display copy: (0...@0 corner: 1...@768)) asMorph openInWindow It makes a partial screen-shot :-). Gulik. -- http://gulik.pbwiki.com/
_______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners