Class: Processing::TextBounds

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

Overview

Bounding box for text.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#hObject (readonly)

Height of bounding box



92
93
94
# File 'lib/processing/font.rb', line 92

def h
  @h
end

#wObject (readonly)

Width of bounding box



88
89
90
# File 'lib/processing/font.rb', line 88

def w
  @w
end

#xObject (readonly)

Horizontal position



80
81
82
# File 'lib/processing/font.rb', line 80

def x
  @x
end

#yObject (readonly)

Vertical position



84
85
86
# File 'lib/processing/font.rb', line 84

def y
  @y
end

Instance Method Details

#inspectString

Returns a string containing a human-readable representation of object.

Returns:

  • (String)

    inspected text



103
104
105
# File 'lib/processing/font.rb', line 103

def inspect()
  "#<Processing::TextBounds: x:#{x} y:#{y} w:#{w} h:#{h}>"
end