winPos returns the RenderWindow based position within the bounding box of the widget, where the x, y coordinates are the proportion across the bounding box to use: 0 = left / top, 1 = right / bottom
(x, y float32)
| 439 | // are the proportion across the bounding box to use: |
| 440 | // 0 = left / top, 1 = right / bottom |
| 441 | func (wb *WidgetBase) winPos(x, y float32) image.Point { |
| 442 | bb := wb.winBBox() |
| 443 | sz := bb.Size() |
| 444 | var pt image.Point |
| 445 | pt.X = bb.Min.X + int(math32.Round(float32(sz.X)*x)) |
| 446 | pt.Y = bb.Min.Y + int(math32.Round(float32(sz.Y)*y)) |
| 447 | return pt |
| 448 | } |
| 449 | |
| 450 | // Profiling and Benchmarking, controlled by settings app bar: |
| 451 |
no test coverage detected