Widget position functions PointToRelPos translates a point in Scene pixel coords into relative position within node, based on the Content BBox
(pt image.Point)
| 421 | // PointToRelPos translates a point in Scene pixel coords |
| 422 | // into relative position within node, based on the Content BBox |
| 423 | func (wb *WidgetBase) PointToRelPos(pt image.Point) image.Point { |
| 424 | return pt.Sub(wb.Geom.ContentBBox.Min) |
| 425 | } |
| 426 | |
| 427 | // winBBox returns the RenderWindow based bounding box for the widget |
| 428 | // by adding the Scene position to the ScBBox |
no test coverage detected