graphics

package
v0.0.0-...-c96882c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertRect

func ConvertRect(rect *primitives.Rectangle) *sdl.Rect

func ConvertRectF

func ConvertRectF(rect *primitives.RectangleF) *sdl.FRect

Types

type FontLoader

type FontLoader interface {
	Load(fileName string, size int) (graphics.TextCreator, error)
}

func NewFontLoader

func NewFontLoader(renderer *sdl.Renderer) FontLoader

type GraphicsAdapter

type GraphicsAdapter interface {
	graphics.TextureLoader
	graphics.WindowAdapter
	graphics.ScreenPresenter
	TextureLoader() graphics.TextureLoader
	TextureCreator() graphics.TextureCreator
	WindowAdapter() graphics.WindowAdapter
	ScreenPresenter() graphics.ScreenPresenter
	FontLoader() graphics.FontLoader
	Init() error
}

func NewGraphicsAdapter

func NewGraphicsAdapter() GraphicsAdapter

type TextCreator

type TextCreator struct {
	// contains filtered or unexported fields
}

func (*TextCreator) Create

func (creator *TextCreator) Create(text string, color primitives.Color) (graphics.TextDrawer, error)

type TextDrawer

type TextDrawer struct {
	// contains filtered or unexported fields
}

func NewTextDrawer

func NewTextDrawer(texture *texture) *TextDrawer

func (*TextDrawer) Dimensions

func (drawer *TextDrawer) Dimensions() primitives.Dimensions

func (*TextDrawer) Draw

func (drawer *TextDrawer) Draw(position *primitives.Point) error

func (*TextDrawer) DrawF

func (drawer *TextDrawer) DrawF(position *primitives.PointF) error

func (*TextDrawer) DrawScaled

func (drawer *TextDrawer) DrawScaled(destRect *primitives.Rectangle) error

func (*TextDrawer) DrawScaledF

func (drawer *TextDrawer) DrawScaledF(destRect *primitives.RectangleF) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL