Saturday, May 21, 2022

Glimmer DSL for LibUI 0.5.11 - Basic Shape Drag & Drop

Glimmer DSL for LibUI 0.5.11 (Fukuoka Ruby 2022 Award Winning Desktop Development GUI Library) has just been released with the following changes (courtesy of the Perfect Shape gem): 

  • Upgrade to perfect-shape 1.0.4 (geometric algorithms)
  • Update examples/shape_coloring.rb with basic drag and drop support
  • Support `#move_by(x_delta, y_delta)` (alias `translate`) method on all shapes and `path` (e.g. useful in drag and drop)
  • Support `#move(x, y)` method on all shapes and `path` to move to x,y coordinate directly
  • Support `#min_x` minimum x coordinate of shape/`path` (of top-left corner)
  • Support `#min_y` minimum y coordinate of shape/`path` (of top-left corner)
  • Support `#max_x` maximum x coordinate of shape/`path` (of bottom-right corner)
  • Support `#max_y` maximum y coordinate of shape/`path` (of bottom-right corner)
  • Support `#center_point` (`Array` of x,y) center point of shape/`path`
  • Support `#center_x` center x coordinate of shape/`path`
  • Support `#center_y` center y coordinate of shape/`path`

You can now drag and drop shapes to move them around in the Shape Coloring example.


Happy Glimmering!

No comments: