Documentation ¶
Index ¶
- func ConvertRect(rect *primitives.Rectangle) *sdl.Rect
- func ConvertRectF(rect *primitives.RectangleF) *sdl.FRect
- type FontLoader
- type GraphicsAdapter
- type TextCreator
- type TextDrawer
- func (drawer *TextDrawer) Dimensions() primitives.Dimensions
- func (drawer *TextDrawer) Draw(position *primitives.Point) error
- func (drawer *TextDrawer) DrawF(position *primitives.PointF) error
- func (drawer *TextDrawer) DrawScaled(destRect *primitives.Rectangle) error
- func (drawer *TextDrawer) DrawScaledF(destRect *primitives.RectangleF) error
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
Click to show internal directories.
Click to hide internal directories.