bottomMost returns the bottom-most GlyphBox.
(c *draw.Canvas, boxes []GlyphBox)
| 350 | |
| 351 | // bottomMost returns the bottom-most GlyphBox. |
| 352 | func bottomMost(c *draw.Canvas, boxes []GlyphBox) GlyphBox { |
| 353 | miny := c.Min.Y |
| 354 | l := GlyphBox{} |
| 355 | for _, b := range boxes { |
| 356 | if b.Size().Y <= 0 { |
| 357 | continue |
| 358 | } |
| 359 | if y := c.Y(b.Y) + b.Min.Y; y < miny && b.Y >= 0 { |
| 360 | miny = y |
| 361 | l = b |
| 362 | } |
| 363 | } |
| 364 | return l |
| 365 | } |
| 366 | |
| 367 | // Transforms returns functions to transfrom |
| 368 | // from the x and y data coordinate system to |