class SDL::Surface
- SDL::Surface
- Reference
- Object
Defined in:
surface.crConstructors
Class Method Summary
Instance Method Summary
- #alpha_mod
- #alpha_mod=(alpha)
- #blend_mode
- #blend_mode=(blend_mode : BlendMode)
-
#blit(dst : Surface, srcrect = nil, dstrect = nil)
Fast copy of this Surface to dst Surface.
-
#blit_scaled(dst : Surface, srcrect = nil, dstrect = nil)
Fast scaled copy of this Surface to dst Surface.
- #clip_rect
- #clip_rect=(rect)
-
#color(r, g, b, a = nil)
Maps an RGB(A) color for this surface.
- #color_key
- #color_key=(rgb)
- #color_mod
- #color_mod=(rgb)
-
#convert(surface)
Copy this surface into a new one that is optimized for blitting to the given surface.
-
#fill(rect : Nil, r, g, b, a = nil)
Fill the whole surface with a RGB(A) color.
-
#fill(rect : SDL::Rect, r, g, b, a = nil)
Fill a rect of the surface with a RGB(A) color.
-
#fill(r, g, b, a = nil)
Fill the whole surface with a RGB(A) color.
- #finalize
- #flags
- #format
- #height
- #lock(&)
- #pitch
-
#save_bmp(path)
Saves the Surface as a BMP image.
- #set_color_key(rgb, flag = 1)
- #to_unsafe : Pointer(LibSDL::Surface)
- #width
Constructor Detail
Class Method Detail
Instance Method Detail
Fast copy of this Surface to dst Surface.
Fast scaled copy of this Surface to dst Surface. Scales to the whole surface by default.
def convert(surface)
#
Copy this surface into a new one that is optimized for blitting to the given surface.
Fill a rect of the surface with a RGB(A) color.