Class: Sevgi::Sundries::Grid::Y

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

Overview

Vertical grid axis.

Instance Attribute Summary

Attributes inherited from Axis

#halve, #major, #minor

Attributes inherited from Ruler

#brut, #finish, #start, #sub

Attributes inherited from Interval

#n, #u

Instance Method Summary collapse

Methods inherited from Ruler

#expand, #margins, #ms, #sd, #sn, #su, #waste

Methods inherited from Interval

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

Constructor Details

#initialize(this, other) ⇒ void

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.

Creates a vertical axis wrapper.

Parameters:



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

def initialize(this, other) = super(other, this)

Instance Method Details

#lineSevgi::Geometry::Line

Returns the base vertical line for this axis.

Returns:

  • (Sevgi::Geometry::Line)


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

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

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

Returns a vertical line translated to an x coordinate.

Parameters:

  • x (Numeric)

    x coordinate

Returns:

  • (Sevgi::Geometry::Line)


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

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