From: <ti...@da...> - 2007-02-28 14:12:01
|
Sorry for the scarce partecipation, I'm next to an importan exam and I'm doing brain time-sharing between multiple disciplines... > 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. > 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'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? Tito |