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

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

Overview

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

Returns the base horizontal line for this axis.

Returns:

  • (Sevgi::Geometry::Line)


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

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

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

Returns a horizontal line translated to a y coordinate.

Parameters:

  • y (Numeric)

    y coordinate

Returns:

  • (Sevgi::Geometry::Line)


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

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