From: tiennou <tie...@gm...> - 2007-02-28 15:34:08
|
Le 28 f=C3=A9vr. 07 =C3=A0 15:11, ti...@da... a =C3=A9crit : > Sorry for the scarce partecipation, I'm next to an importan > exam and I'm doing brain time-sharing between multiple > disciplines... No problem about that... I wish I could let you > >> Are you satisfied with my naming conventions of the code I >> revamped ? Using mKeypointObscured as a member name and >> KeypointObscured() and SetKeypointObscured() as methods >> ? > I agree. Okay, so that's what I'll use... > >> I'm trying to get ShapesEditor to work again, and as they >> are numerous references to the old Shapes.h structs, I'm >> thinking about making all members public, because it >> would make it work with no change. On the other hand >> this would mean that my accessor stuff is useless, so >> I'm wondering ;-) > I say let's make all them public. It's not ideal, but we can > fix it later. I think I will change everything right now, because I've already =20 changed members name, so I'm stuck. >> I'm thinking about refactoring code from View/Browser, >> because there is numerous methods related to turning >> ShapesFrame/ShapesBitmap into images/thumbnails for >> viewing. I added these capabilities to ShapesBitmap (you >> can now call ShapeBitmapToImage and ImageThumbnail >> directly on them), but I need to add a pointer to a >> ShapesChunk in ShapesFrame in order to be able to access >> the associated ShapeBitmap- >>> ShapeBitmapToImage call... What do you think about it ? > I don't like this. IMO a ShapesFrame should not be able to > generate its own > wxImage, because it's linked to a ShapesBitmap in a "weak" > way (that is, you need to access the full chunk to realize > the link). I'm thinking about a new class that knows how to > convert ShapesBitmaps and ShapesFrames to wxImage. It could > be called for example ShapesRenderDevice or ShapesRenderer. > The nice thing about that would be just ONE SETTING for > "show transparent pixels", "view using color table", "smooth > thumbnails" and so on. We could just ask it "I need to > convert this bitmap/frame for viewing, could you do it?" and > it would create a wxImage with the correct display settings. > It could even cache thumbnails I guess. We could store a > pointer to this converter in ShapesView. Could it work? I think there is some need for a refactor in those parts of the code, =20= but yes, it can be delayed until we have a working wxDocument approach. I was just going overshot ;-) tiennou |