Class: Sevgi::Sundries::Grid::Axis

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

Overview

Axis wrapper exposing grid line queries for one line direction.

Direct Known Subclasses

X, Y

Defined Under Namespace

Classes: Halve, Major, Minor, Query

Instance Attribute Summary collapse

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 an axis wrapper.

Parameters:



125
126
127
128
129
130
131
# File 'lib/sevgi/sundries/grid.rb', line 125

def initialize(this, other)
  super(this)

  @major = Major.send(:new, self, other)
  @halve = Halve.send(:new, self, other)
  @minor = Minor.send(:new, self, other)
end

Instance Attribute Details

#halveSevgi::Sundries::Grid::Axis::Halve (readonly)

Returns lines placed at the perpendicular ruler's halfway distances.



114
115
116
# File 'lib/sevgi/sundries/grid.rb', line 114

def halve
  @halve
end

#majorSevgi::Sundries::Grid::Axis::Major (readonly)

Returns lines placed at the perpendicular ruler's major distances.



110
111
112
# File 'lib/sevgi/sundries/grid.rb', line 110

def major
  @major
end

#minorSevgi::Sundries::Grid::Axis::Minor (readonly)

Returns lines placed at the perpendicular ruler's minor distances.



118
119
120
# File 'lib/sevgi/sundries/grid.rb', line 118

def minor
  @minor
end