lengthOffset returns an offset that should be added to the tick mark's line to accout for its length. I.e., the start of the line for a minor tick mark must be shifted by half of the length.
(len vg.Length)
| 688 | // the line for a minor tick mark must be shifted by half of |
| 689 | // the length. |
| 690 | func (t Tick) lengthOffset(len vg.Length) vg.Length { |
| 691 | if t.IsMinor() { |
| 692 | return len / 2 |
| 693 | } |
| 694 | return 0 |
| 695 | } |
| 696 | |
| 697 | // tickLabelHeight returns height of the tick mark labels. |
| 698 | func tickLabelHeight(sty text.Style, ticks []Tick) vg.Length { |