Sha256: 5bf11d252eccd83f92845f708883c07d696f3b80a55aad3c4407567fbdb75e0d

Contents?: true

Size: 860 Bytes

Versions: 42

Compression:

Stored size: 860 Bytes

Contents

require 'glimmer-dsl-swt'

include Glimmer

glimmer_logo = File.expand_path('../../icons/scaffold_app.png', __dir__)

shell {
  text 'Hello, Canvas Transform!'
  minimum_size 330, 352
  
  canvas {
    background :white

    image(glimmer_logo, 0, 0) {
      transform {
        translation 110, 110
        rotation 90
        scale 0.21, 0.21
        # also supports inversion, identity, shear, and multiplication {transform properties}
      }
    }
    image(glimmer_logo, 0, 0) {
      transform {
        translation 110, 220
        scale 0.21, 0.21
      }
    }
    image(glimmer_logo, 0, 0) {
      transform {
        translation 220, 220
        rotation 270
        scale 0.21, 0.21
      }
    }
    image(glimmer_logo, 0, 0) {
      transform {
        translation 220, 110
        rotation 180
        scale 0.21, 0.21
      }
    }
  }
}.open

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
glimmer-dsl-swt-4.20.16.0 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.21.1.0 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.21.0.1 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.21.0.0 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.20.15.5 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.20.15.4 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.20.15.3 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.20.15.2 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.20.15.1 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.20.15.0 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.20.14.2 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.20.14.1 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.20.14.0 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.20.13.18 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.20.13.17 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.20.13.16 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.20.13.15 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.20.13.14 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.20.13.13 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.20.13.12 samples/hello/hello_canvas_transform.rb