Sha256: 197ef6d406b575a232fe59dcf0df54e3f2e3ff08847dc910787eee4f94214e43

Contents?: true

Size: 919 Bytes

Versions: 30

Compression:

Stored size: 919 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 (OS.windows? ? 347 : 330), (OS.windows? ? 372 : 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

30 entries across 30 versions & 1 rubygems

Version Path
glimmer-dsl-swt-4.30.1.0 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.30.0.0 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.29.0.0 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.28.0.0 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.27.0.1 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.27.0.0 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.26.0.1 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.26.0.0 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.25.0.2 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.25.0.1 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.25.0.0 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.24.4.8 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.24.4.7 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.24.4.6 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.24.4.5 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.24.4.4 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.24.4.3 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.24.4.2 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.24.4.1 samples/hello/hello_canvas_transform.rb
glimmer-dsl-swt-4.24.4.0 samples/hello/hello_canvas_transform.rb