Class: SLComponents::FolderIcon

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



78
79
80
# File 'lib/mk_semi_lattice/sl_components.rb', line 78

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

#setup_shapeObject



71
72
73
74
75
76
# File 'lib/mk_semi_lattice/sl_components.rb', line 71

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

#x=(x) ⇒ Object



82
83
84
# File 'lib/mk_semi_lattice/sl_components.rb', line 82

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

#y=(y) ⇒ Object



86
87
88
# File 'lib/mk_semi_lattice/sl_components.rb', line 86

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