class Padding public
Hokusai::Padding represents padding around a given geometry
#initialize(top, right, bottom, left) public
Constructor for Hokusai::Padding
Arguments
- top - top outline width (Float)
- right - right outline width (Float)
- bottom - bottom outline width (Float)
- left - left outline width (Float)
Returns
Returns Hokusai::Padding
#width public
The total width of the padding
Returns
Returns Float
#height public
The total height of the padding
Returns
Returns Float
.convert(value) public
Converts value to padding
Arguments
- value - value can be String of comma delimited float values (top, right, bottom, left) an Array of float values, a Hokusai::Padding value or an Integer, which will be applied to uniformly
Examples
ruby
Hokuasi::Padding.convert("22,22,22,22")
# Hokusai::Padding(@top = 22, @right = 22, @bottom = 22, @left = 22)Returns
Returns Hokusai::Padding