Class: Raylib::NPatchInfo

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/raylib/core/structs/n_patch_info.rb

Overview

NPatchInfo, n-patch layout info

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create(source, left, top, right, bottom, layout) ⇒ Object



13
14
15
16
17
18
19
20
21
22
# File 'lib/raylib/core/structs/n_patch_info.rb', line 13

def self.create(source, left, top, right, bottom, layout)
  new.tap do |instance|
    instance[:source] = source
    instance[:left] = left
    instance[:top] = top
    instance[:right] = right
    instance[:bottom] = bottom
    instance[:layout] = layout
  end
end

Instance Method Details

#bottomInteger

Bottom border offset

Returns:

  • (Integer)

    bottom



66
# File 'lib/raylib/core/structs/n_patch_info.rb', line 66

def bottom = self[:bottom]

#bottom=(new_bottom) ⇒ Object

Sets Bottom border offset



69
70
71
# File 'lib/raylib/core/structs/n_patch_info.rb', line 69

def bottom=(new_bottom)
  self[:bottom] = new_bottom
end

#layoutInteger

Layout of the n-patch: 3x3, 1x3 or 3x1

Returns:

  • (Integer)

    layout



75
# File 'lib/raylib/core/structs/n_patch_info.rb', line 75

def layout = self[:layout]

#layout=(new_layout) ⇒ Object

Sets Layout of the n-patch: 3x3, 1x3 or 3x1



78
79
80
# File 'lib/raylib/core/structs/n_patch_info.rb', line 78

def layout=(new_layout)
  self[:layout] = new_layout
end

#leftInteger

Left border offset

Returns:

  • (Integer)

    left



39
# File 'lib/raylib/core/structs/n_patch_info.rb', line 39

def left = self[:left]

#left=(new_left) ⇒ Object

Sets Left border offset



42
43
44
# File 'lib/raylib/core/structs/n_patch_info.rb', line 42

def left=(new_left)
  self[:left] = new_left
end

#rightInteger

Right border offset

Returns:

  • (Integer)

    right



57
# File 'lib/raylib/core/structs/n_patch_info.rb', line 57

def right = self[:right]

#right=(new_right) ⇒ Object

Sets Right border offset



60
61
62
# File 'lib/raylib/core/structs/n_patch_info.rb', line 60

def right=(new_right)
  self[:right] = new_right
end

#sourceRectangle

Texture source rectangle

Returns:



30
# File 'lib/raylib/core/structs/n_patch_info.rb', line 30

def source = self[:source]

#source=(new_source) ⇒ Object

Sets Texture source rectangle



33
34
35
# File 'lib/raylib/core/structs/n_patch_info.rb', line 33

def source=(new_source)
  self[:source] = new_source
end

#to_sObject



24
25
26
# File 'lib/raylib/core/structs/n_patch_info.rb', line 24

def to_s
  "Raylib::NPatchInfo##{object_id} source=#{source} left=#{left} top=#{top} right=#{right} bottom=#{bottom} layout=#{layout}"
end

#topInteger

Top border offset

Returns:

  • (Integer)

    top



48
# File 'lib/raylib/core/structs/n_patch_info.rb', line 48

def top = self[:top]

#top=(new_top) ⇒ Object

Sets Top border offset



51
52
53
# File 'lib/raylib/core/structs/n_patch_info.rb', line 51

def top=(new_top)
  self[:top] = new_top
end