Class: SLComponents::Document

Inherits:
NodeShape show all
Defined in:
lib/mk_semi_lattice/sl_components.rb

Instance Attribute Summary

Attributes inherited from NodeShape

#dx, #dy, #file_path, #fixed, #label, #linked, #name, #type, #x, #y

Instance Method Summary collapse

Methods inherited from NodeShape

#initialize

Constructor Details

This class inherits a constructor from SLComponents::NodeShape

Instance Method Details

#color=(c) ⇒ Object



99
100
101
# File 'lib/mk_semi_lattice/sl_components.rb', line 99

def color=(c)
  # 画像には直接色をつけられません
end

#setup_shapeObject



92
93
94
95
96
97
# File 'lib/mk_semi_lattice/sl_components.rb', line 92

def setup_shape
  @image = Image.new(
    './.semi_lattice/icons/document.png',
    x: @x-28, y: @y-20, width: 38, height: 56, z: @z
  )
end

#x=(x) ⇒ Object



103
104
105
# File 'lib/mk_semi_lattice/sl_components.rb', line 103

def x=(x)
  @image.x = x - 28
end

#y=(y) ⇒ Object



107
108
109
# File 'lib/mk_semi_lattice/sl_components.rb', line 107

def y=(y)
  @image.y = y - 20
end