Class: RubySketch::Processing::TextBounds

Inherits:
Object
  • Object
show all
Defined in:
lib/rubysketch/processing.rb

Overview

Bounding box for text.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(x, y, w, h) ⇒ TextBounds

Initialize bouding box.

Parameters:

  • x (Numeric)

    horizontal position

  • y (Numeric)

    vertical position

  • w (Numeric)

    width of bounding box

  • h (Numeric)

    height of bounding box



1182
1183
1184
# File 'lib/rubysketch/processing.rb', line 1182

def initialize (x, y, w, h)
  @x, @y, @w, @h = x, y, w, h
end

Instance Attribute Details

#hObject (readonly)

Height of bounding box



1173
1174
1175
# File 'lib/rubysketch/processing.rb', line 1173

def h
  @h
end

#wObject (readonly)

Width of bounding box



1169
1170
1171
# File 'lib/rubysketch/processing.rb', line 1169

def w
  @w
end

#xObject (readonly)

Horizontal position



1161
1162
1163
# File 'lib/rubysketch/processing.rb', line 1161

def x
  @x
end

#yObject (readonly)

Vertical position



1165
1166
1167
# File 'lib/rubysketch/processing.rb', line 1165

def y
  @y
end