func (src *Surface) BlitScaled(srcrect *Rect, dst *Surface, dstrect *Rect) int { _src := (*C.SDL_Surface)(unsafe.Pointer(src)) _srcrect := (*C.SDL_Rect)(unsafe.Pointer(srcrect)) _dst := (*C.SDL_Surface)(unsafe.Pointer(dst)) _dstrect := (*C.SDL_Rect)(unsafe.Pointer(dstrect)) return (int)(C.SDL_BlitScaled(_src, _srcrect, _dst, _dstrect)) }
// BlitScaled performs a scaled fast blit from the source surface to the // destination surface. // // srcRect represents the rectangle to be copied or image.ZR to copy the entire // surface. // // dstRect represents the rectangle to be copied into. // // If the srcRect and dstRect differs in size, the surface will be scaled to // fit. func (src *Surface) BlitScaled(srcRect image.Rectangle, dst *Surface, dstRect image.Rectangle) (err error) { cSrcRect := cRect(srcRect) cDstRect := cRect(dstRect) if C.SDL_BlitScaled(src.cSurface, cSrcRect, dst.cSurface, cDstRect) != 0 { return getError() } return nil }
func (src *Surface) BlitScaled(srcRect *Rect, dst *Surface, dstRect *Rect) int { return int(C.SDL_BlitScaled(src.cptr(), srcRect.cptr(), dst.cptr(), dstRect.cptr())) }
// Surface (https://wiki.libsdl.org/SDL_BlitScaled) func (src *Surface) BlitScaled(srcRect *Rect, dst *Surface, dstRect *Rect) error { if C.SDL_BlitScaled(src.cptr(), srcRect.cptr(), dst.cptr(), dstRect.cptr()) != 0 { return GetError() } return nil }