Scripts/Diagram

From J Wiki
Jump to: navigation, search

Diagram editing prototype

Template:Tick

Diagram.png

  • Draws boxes for items with shadow, title, list of members
  • Draws connector lines dynamically between items
  • Drags items dynamically updating
  • Dragged item is selected with border and shadow style

Implementation details (available j601 beta t)

  • uses glwindoworg for local item coordinates
  • uses wd 'setinvalid id' for update invoking paint

Notes:

  • gl2 (both Windows and Java) incorrectly offsets glpaint by glwindoworg, so explicit glwindoworg 0 0 has to be done
  • Java (esp. Mac) setinvalid is slower and jerky, but direct call to paint is fast.
  • Direct paint requires glpaint, whereas initial paint (wd 'pshow') and setinvalid do not: this is because system does not know when you are done painting. So the usage pattern for ad hoc painting should be: glpaint @ f_g_paint.

See Also