Class: Sevgi::Sundries::Grid::X Private

Inherits:
Axis show all
Defined in:
lib/sevgi/sundries/grid.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Horizontal grid axis.

Instance Attribute Summary

Attributes inherited from Axis

#halve, #major, #minor

Attributes inherited from Ruler

#brut, #sub

Attributes inherited from Interval

#n, #u

Instance Method Summary collapse

Methods inherited from Axis

#initialize

Methods inherited from Ruler

#expand, #initialize, #margin, #ms, #sd, #sn, #su, #waste

Methods inherited from Interval

[], #[], #count, #d, #ds, #h, #hs, #initialize, #nds, #nhs

Constructor Details

This class inherits a constructor from Sevgi::Sundries::Grid::Axis

Instance Method Details

#lineSevgi::Geometry::Line

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns the base horizontal line for this axis.

Returns:

  • (Sevgi::Geometry::Line)


136
# File 'lib/sevgi/sundries/grid.rb', line 136

def line = @line ||= Geometry::Line[d, 0.0]

#line_at(y) ⇒ Sevgi::Geometry::Line

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a horizontal line translated to a y coordinate.

Parameters:

  • y (Numeric)

    y coordinate

Returns:

  • (Sevgi::Geometry::Line)


141
# File 'lib/sevgi/sundries/grid.rb', line 141

def line_at(y) = line.at([0.0, y])