tickLabelHeight returns height of the tick mark labels.
(sty text.Style, ticks []Tick)
| 696 | |
| 697 | // tickLabelHeight returns height of the tick mark labels. |
| 698 | func tickLabelHeight(sty text.Style, ticks []Tick) vg.Length { |
| 699 | maxHeight := vg.Length(0) |
| 700 | for _, t := range ticks { |
| 701 | if t.IsMinor() { |
| 702 | continue |
| 703 | } |
| 704 | r := sty.Rectangle(t.Label) |
| 705 | h := r.Max.Y - r.Min.Y |
| 706 | if h > maxHeight { |
| 707 | maxHeight = h |
| 708 | } |
| 709 | } |
| 710 | return maxHeight |
| 711 | } |
| 712 | |
| 713 | // tickLabelWidth returns the width of the widest tick mark label. |
| 714 | func tickLabelWidth(sty text.Style, ticks []Tick) vg.Length { |
no test coverage detected