MCPcopy Create free account
hub / github.com/SolarLune/masterplan / TranslateRect

Method TranslateRect

camera.go:93–104  ·  view source on GitHub ↗
(rect *sdl.FRect)

Source from the content-addressed store, hash-verified

91}
92
93func (camera *Camera) TranslateRect(rect *sdl.FRect) *sdl.FRect {
94
95 pos := camera.TranslatePoint(Vector{rect.X, rect.Y})
96
97 return &sdl.FRect{
98 X: pos.X,
99 Y: pos.Y,
100 W: rect.W,
101 H: rect.H,
102 }
103
104}
105
106func (camera *Camera) TranslatePoint(point Vector) Vector {
107 return point.Sub(camera.Offset())

Callers 15

DrawCardMethod · 0.80
DrawGridMethod · 0.80
DrawMethod · 0.80
ImmediateIconButtonFunction · 0.80
DrawMethod · 0.80
DrawMethod · 0.80
DrawMethod · 0.80
DrawMethod · 0.80
DrawMethod · 0.80
DrawMethod · 0.80
DrawMethod · 0.80
DrawOnTopMethod · 0.80

Calls 1

TranslatePointMethod · 0.95

Tested by

no test coverage detected