Re: On screen text display high level method proposal
Status: Alpha
Brought to you by:
cwalther
From: Christian W. <cwa...@gm...> - 2008-07-31 18:35:21
|
Andrea Viarengo wrote: > I perfected my system to show the texts in Pipmak. Wow, very cool! I'll definitely integrate this. An idea that just occurred to me: would it make sense to put such features that are implemented on top of Pipmak's (public) core functionality into a separate namespace, maybe "pipmaklib" or something, instead of "pipmak"? We could conceivably end up with hundreds of them, and the pipmak table would be a bit crowded then. Could you transform your descriptions into something that fits into Reference.tex? Otherwise the commit will have to wait until I get around to doing that. (I'm trying to take a hard stance on this - no feature committed without documentation, otherwise it will never get written.) Small bug: weird things happen with the positioning of the text when the window is resized while the demo is running. Do you think this can be fixed in a reasonable way? > I have prefered name pipmak.displaytext() respect pipmak.message() because > last case could generate confusion with message passing, but you > can found another more suitable name. "displaytext" is fine with me. I haven't scrutinized the code very thoroughly, but a few detail comments nonetheless: > -- Globals defined: > -- pipmak.cachedtext (table) > -- pipmak.istextdisplayed (boolean) Do these need to be global (i.e. do they need to survive leaving and reentering the node)? If they do, I think pipmak_internal would be a better place for them than pipmak. (For the command line history I chose to use a plain global, outside of any table, but that's probably not such a good example to follow.) > panel { pipmak.newimage( pipmak.screensize()) } Note to self: We need a way to make a panel or slide without any background image. Storing and drawing such a big texture of pure transparency is just a waste of resources. But, in the meantime: you could make the image 1x1 pixel and stretch it by setting the panel's "w" and "h". Or even leave it at 1x1 - patches can also be outside of the rectangle of the panel, as seen on the Lua command line. -Christian |