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



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

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

#setup_shapeObject



74
75
76
77
78
79
# File 'lib/mk_semi_lattice/sl_components.rb', line 74

def setup_shape
  @image = Image.new(
    '.semi_lattice/icons/folder.png',
    x: @x-67.2, y: @y-43.2, width: 134.4, height: 86.4, z: @z
  )
end

#x=(x) ⇒ Object



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

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

#y=(y) ⇒ Object



89
90
91
# File 'lib/mk_semi_lattice/sl_components.rb', line 89

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