Talk:Honeycombs

From Rosetta Code
Revision as of 18:10, 25 May 2011 by MikeMol (talk | contribs) (Observations and questions)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Just some observations (not criticisms):

  • The hexagonal shape of the widget will be interesting, as GUIs normally use rectangular bounding boxes. A rectangular box used in drawing will require one of three solutions to avoid overdraw:
    • The use of a drawing mask
    • Transparency in the widget's drawn image
    • A tileable rectangular pattern not 1:1 associated with the widgets themselves (i.e. drawn as a background, with transparent widgets on top)
  • The rectangle/hexagonal dissociation will be interesting for pointer hit checks, too; a rectangular widget would need to detect that the pointer check is outside its hexagonal region, and then it would need to be able to have that check passed on to the tiles below it.

--Michael Mol 18:10, 25 May 2011 (UTC)

Question: Must the widgets be represented as distinct objects in the code examples? If so, that would preclude the use of things like the wp:Flyweight pattern, which strikes me as a particularly appropriate tool for this problem. --Michael Mol 18:10, 25 May 2011 (UTC)