On Tue, Feb 02, 2010 at 02:49:08AM +1300, Ralph Versteegen wrote: > On 31 January 2010 07:00, James Paige <[email protected]> wrote: > > > > I don't see variable sprite size causing a problem. That just means the > > spriteslice size will change when the animation frame changes, and that > > is no problem. > > Well, I already notice a problem: clipping right now is based on a > slice's screen coordinates, which for an animating sprite are not the > same as the position at which it's drawn. Recall the idea that sprite > animations could include frame offsets, which do NOT affect the > 'logical' (slice) position.
But none of that is implemented yet. I do remember discussing allowing animating sprites to have different display position and logical position. I always envisioned implementing that with two slices. A container slice with unchanging size that would be the logical position, and it would have a spriteslice child which would be the animating component that could overflow the edges of the logical slice. (And I agree that it would make no sense to clip children of a compound slice of that type) But if I understand correctly, you envision implementing variable animation frame sizes entirely within the sprite, so there would be just one slice, right? > > --- > > James > > OK, I just had a look at this clipping code. Eeek! setclip was not > intended for this kind of over-use. Yeah, tell me about it :) > If you try to attach a RectSlice with a border or a MapSlice to a > clipping parent, you should find that clipping simply fails since > these call setclip themselves when drawing - they are not primitives. > Also, the first thing drawn might also call setclip (from within > allmodex) if it changes wrkpage. > Using frame_new_view would be simpler, safe, and more elegant than > this setclip hackery (this is actually basically what it was intended > for) EXCEPT that it changes the origin of the screen. Hmmm. I guess > we'll just have to switch to views and add an extra offset to slice > position when drawing to undo the double translation. I would be delighted to switch over to frame_new_view. I can give it another shot and see if I can figure out where it wasn't working for me before. --- James _______________________________________________ Ohrrpgce mailing list [email protected] http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
