Glimmer Gets Its First Official Custom Shape Gems

This page summarizes the projects mentioned and recommended in the original post on dev.to

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • glimmer-dsl-swt

    Glimmer DSL for SWT (JRuby Desktop Development Cross-Platform Native GUI Framework) - The Quickest Way From Zero To GUI - If You Liked Shoes, You'll Love Glimmer!

  • Glimmer DSL for SWT, which made it to the Top 8 Ruby Framework Projects on LibHunt for Feb 2021, recently added support for Custom Shapes, which are reusable graphical constructs akin of Custom Widgets (reusable widget constructs). Glimmer DSL for SWT just got its first official custom shape gems: glimmer-cp-bevel, providing the bevel keyword, and glimmer-cp-stickfigure, providing the stick_figure keyword. They are covered below.

  • glimmer-cp-bevel

    Bevel - Glimmer DSL for SWT Custom Shape

  • # From: https://github.com/AndyObtiva/glimmer-cp-bevel#example require 'glimmer-cp-bevel' include Glimmer shell { text 'Glimmer Tetris Icon' label { text 'Check out the application icon!' font height: 20 } icon_block_size = 64 icon_bevel_size = icon_block_size.to_f / 25.to_f icon_bevel_pixel_size = 0.16*icon_block_size.to_f icon_size = 8 icon_pixel_size = icon_block_size * icon_size image(icon_pixel_size, icon_pixel_size) { icon_size.times { |row| icon_size.times { |column| colored = row >= 1 && column.between?(1, 6) color = colored ? color(([:white] + [:cyan, :blue, :dark_yellow, :yellow, :green, :magenta, :red]).sample) : color(:white) x = column * icon_block_size y = row * icon_block_size bevel(x: x, y: y, base_color: color, size: icon_block_size) } } } }.open

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • glimmer-cp-stickfigure

    Stick Figure - Glimmer DSL for SWT Custom Shape

  • # From: https://github.com/AndyObtiva/glimmer-cp-stickfigure/blob/master/samples/stick_figure/hello_stick_figure.rb require_relative '../../lib/glimmer-cp-stickfigure' # Use `require 'glimmer-cp-stickfigure'` if gem is installed class HelloStickFigure include Glimmer::UI::CustomShell WIDTH = 220 HEIGHT = 235 body { shell { text 'Hello, Stick Figure!' minimum_size WIDTH, HEIGHT @canvas = canvas { background :white 15.times { |n| x_location = (rand*WIDTH/2).to_i%WIDTH + (rand*15).to_i y_location = (rand*HEIGHT/2).to_i%HEIGHT + (rand*15).to_i foreground_color = rgb(rand*255, rand*255, rand*255) stick_figure(location_x: x_location, location_y: y_location, size: 35+n*2) { foreground foreground_color } } on_mouse_down { |mouse_event| @drag_detected = false @canvas.cursor = :hand # select shape at location @selected_shape = @canvas.shape_at_location(mouse_event.x, mouse_event.y) # select shape parent if it is a nested shape like an arm or leg @selected_shape = @selected_shape.parent_shapes.last if @selected_shape.parent_shapes.any? } on_drag_detected { |drag_detect_event| @drag_detected = true @drag_current_x = drag_detect_event.x @drag_current_y = drag_detect_event.y } on_mouse_move { |mouse_event| if @drag_detected @selected_shape&.move_by(mouse_event.x - @drag_current_x, mouse_event.y - @drag_current_y) @drag_current_x = mouse_event.x @drag_current_y = mouse_event.y end } on_mouse_up { |mouse_event| @canvas.cursor = :arrow @drag_detected = false @selected_shape = nil } } } } end HelloStickFigure.launch

  • dcr

    Draw Color Repeat - A Young Child Programming Language for Drawing and Coloring with Repetition

  • Currently used in the upcoming DCR project

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Glimmer DSL for SWT v4.24.1.0 Improved Hello, Canvas Path!

    1 project | dev.to | 24 Jul 2022
  • Why Ruby is More Readable than Python

    1 project | /r/ruby | 19 Jul 2022
  • Glimmer DSL for SWT Hello, Canvas Data-Binding! (+ Quads & Cubics)

    1 project | dev.to | 15 Jul 2022
  • Glimmer Metronome - Tap-based Tempo & Up/Down Beat Toggling

    2 projects | dev.to | 15 Jan 2022
  • Quarto Game, Custom Shapes, and Canvas Shape DSL Tutorial

    1 project | dev.to | 6 Jan 2022