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

Method SDLRect

utils.go:322–344  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

320}
321
322func (cr CorrectingRect) SDLRect() *sdl.FRect {
323
324 rect := &sdl.FRect{}
325
326 if cr.X1 < cr.X2 {
327 rect.X = cr.X1
328 rect.W = cr.X2 - cr.X1
329 } else {
330 rect.X = cr.X2
331 rect.W = cr.X1 - cr.X2
332 }
333
334 if cr.Y1 < cr.Y2 {
335 rect.Y = cr.Y1
336 rect.H = cr.Y2 - cr.Y1
337 } else {
338 rect.Y = cr.Y2
339 rect.H = cr.Y1 - cr.Y2
340 }
341
342 return rect
343
344}
345
346type Image struct {
347 Size Vector

Callers 3

UpdateMethod · 0.80
UpdateMethod · 0.80
UpdateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected