Documentation
¶
Overview ¶
Package ray the implementation of render.Render for raylib
Index ¶
- type RenderImpl
- func (rr RenderImpl) BeginFrame()
- func (rr RenderImpl) DrawGradientBox(pos geometry.Point, box shapes.Box, gradient color.Gradient)
- func (rr RenderImpl) DrawSolidBox(pos geometry.Point, box shapes.Box, solid color.Solid)
- func (rr RenderImpl) DrawSprite(def components.SpriteDef, sprite sprite.Sprite, pos geometry.Point, ...) error
- func (rr RenderImpl) DrawText(ftd components.FontDef, txt ui.Text, pos geometry.Point, color color.Solid)
- func (rr RenderImpl) End()
- func (rr RenderImpl) EndFrame()
- func (rr RenderImpl) GetFrameTime() float32
- func (rr RenderImpl) GetKeyStatus(key device.Key) device.KeyStatus
- func (rr RenderImpl) GetMousePoint() geometry.Point
- func (rr RenderImpl) GetScreenSize() geometry.Size
- func (rr *RenderImpl) Init(opt options.Options)
- func (rr RenderImpl) IsMouseRelease(button device.MouseButton) bool
- func (rr RenderImpl) LoadFont(fileName string) (components.FontDef, error)
- func (rr RenderImpl) LoadTexture(fileName string) (components.TextureDef, error)
- func (rr *RenderImpl) MeasureText(fnt components.FontDef, str string, size float32) geometry.Size
- func (rr *RenderImpl) SetBackgroundColor(color color.Solid)
- func (rr RenderImpl) ShouldClose() bool
- func (rr RenderImpl) UnloadFont(textureDef components.FontDef)
- func (rr RenderImpl) UnloadTexture(textureDef components.TextureDef)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RenderImpl ¶
type RenderImpl struct {
// contains filtered or unexported fields
}
RenderImpl is our render.Render based on raylib
func (RenderImpl) DrawGradientBox ¶
DrawGradientBox draws a solid box with an color.Solid and a scale
func (RenderImpl) DrawSolidBox ¶
DrawSolidBox draws a solid box with an color.Solid and a scale
func (RenderImpl) DrawSprite ¶
func (rr RenderImpl) DrawSprite(def components.SpriteDef, sprite sprite.Sprite, pos geometry.Point, tint color.Solid) error
DrawSprite draws a sprite.Sprite in the given geometry.Point with the tint color.Color
func (RenderImpl) DrawText ¶
func (rr RenderImpl) DrawText(ftd components.FontDef, txt ui.Text, pos geometry.Point, color color.Solid)
DrawText will draw a text.Text in the given geometry.Point with the correspondent color.Color
func (RenderImpl) GetFrameTime ¶
func (rr RenderImpl) GetFrameTime() float32
GetFrameTime returns the time from the delta time for current frame
func (RenderImpl) GetKeyStatus ¶
func (rr RenderImpl) GetKeyStatus(key device.Key) device.KeyStatus
GetKeyStatus returns the device.KeyStatus for a given device.Key
func (RenderImpl) GetMousePoint ¶
func (rr RenderImpl) GetMousePoint() geometry.Point
GetMousePoint returns the current Point of the mouse
func (RenderImpl) GetScreenSize ¶
func (rr RenderImpl) GetScreenSize() geometry.Size
GetScreenSize get the current screen size
func (RenderImpl) IsMouseRelease ¶
func (rr RenderImpl) IsMouseRelease(button device.MouseButton) bool
IsMouseRelease check if the given MouseButton has been release
func (RenderImpl) LoadFont ¶
func (rr RenderImpl) LoadFont(fileName string) (components.FontDef, error)
LoadFont giving it file name into VRAM
func (RenderImpl) LoadTexture ¶
func (rr RenderImpl) LoadTexture(fileName string) (components.TextureDef, error)
LoadTexture giving it file name into VRAM
func (*RenderImpl) MeasureText ¶
func (rr *RenderImpl) MeasureText(fnt components.FontDef, str string, size float32) geometry.Size
MeasureText return the geometry.Size of a string with a defined size and spacing
func (*RenderImpl) SetBackgroundColor ¶
func (rr *RenderImpl) SetBackgroundColor(color color.Solid)
SetBackgroundColor changes the current background color.Solid
func (RenderImpl) ShouldClose ¶
func (rr RenderImpl) ShouldClose() bool
ShouldClose returns if th engine should close
func (RenderImpl) UnloadFont ¶
func (rr RenderImpl) UnloadFont(textureDef components.FontDef)
UnloadFont from VRAM
func (RenderImpl) UnloadTexture ¶
func (rr RenderImpl) UnloadTexture(textureDef components.TextureDef)
UnloadTexture from VRAM