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

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

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • 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!

  • # From: https://github.com/AndyObtiva/glimmer-dsl-swt/blob/development/docs/reference/GLIMMER_SAMPLES.md#hello-canvas-path require 'glimmer-dsl-swt' class HelloCanvasPath include Glimmer::UI::Application after_body do regenerate end body { shell { grid_layout { margin_width 0 margin_height 0 margin_top 5 } text 'Hello, Canvas Path!' minimum_size 800, 700 @button = button { layout_data :center, :center, true, false text 'Regenerate' enabled false on_widget_selected do regenerate end } canvas { layout_data :fill, :fill, true, true background :white text('line', 15, 200) { foreground :red } @path1 = path { antialias :on foreground :red } text('quad', 15, 300) { foreground :dark_green } @path2 = path { antialias :on foreground :dark_green } text('cubic', 15, 400) { foreground :blue } @path3 = path { antialias :on foreground :blue } } on_widget_disposed do # safe to kill thread as data is in memory only, so no risk of data loss @thread.kill end } } def regenerate @thread = Thread.new do @button.enabled = false @path1.clear @path2.clear @path3.clear y1 = y2 = y3 = 300 700.times.each do |x| x += 55 x1 = x - 2 x2 = x - 1 x3 = x y1 = y3 y2 = y1 y3 = [[y3 + (rand*24 - 12), 0].max, 700].min @path1.content { line(x1, y1 - 100) } if x % 2 == 0 @path2.content { quad(x1, y1, x2, y2) } end if x % 3 == 0 @path3.content { cubic(x1, y1 + 100, x2, y2 + 100, x3, y3 + 100) } end sleep(0.01) end @button.enabled = true end end end HelloCanvasPath.launch

  • 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
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