Documentation ¶
Index ¶
- func BtnOption(rsc *Rescaler) btn.Option
- type Rescaler
- func (rsc Rescaler) Dims(dims floatgeom.Point2) floatgeom.Point2
- func (rs Rescaler) Draw(r render.Renderable, layers ...int)
- func (rsc Rescaler) Height(h float64) float64
- func (rsc Rescaler) Position(target floatgeom.Point2) (float64, float64)
- func (rsc Rescaler) Scale(m render.Modifiable)
- func (rsc Rescaler) SetPosition(rnd render.Renderable, target floatgeom.Point2)
- func (rsc Rescaler) Width(w float64) float64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Rescaler ¶
type Rescaler struct {
// contains filtered or unexported fields
}
A Rescaler knows the resolution a scene is designed for, and can make simple adjustments to scale and positioning of elements in the scene if the window is scaled differently from the target resolution at scene start. The rescaler does not handle a window's size changing mid-scene.
func (Rescaler) Scale ¶
func (rsc Rescaler) Scale(m render.Modifiable)
Scale will scale a modifiable
func (Rescaler) SetPosition ¶
func (rsc Rescaler) SetPosition(rnd render.Renderable, target floatgeom.Point2)
Click to show internal directories.
Click to hide internal directories.