gfx

package
v0.0.0-...-e2d1978 Latest Latest
Warning

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

Go to latest
Published: May 17, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RGBA8

func RGBA8(c color.Color) (uint8, uint8, uint8, uint8)

RGBA8 -

Types

type FlipMode

type FlipMode int

FlipMode -

const (
	FlipNone FlipMode = iota
	FlipHorizontal
	FlipVertical
)

can be ORed

type IFont

type IFont interface {
	Print(x0, y0 int, text string)
	SetColor(c color.RGBA)
}

IFont -

type ITexture

type ITexture interface {
	SetColorMod(c color.Color)
}

ITexture -

type Renderer

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

Renderer -

func NewRenderer

func NewRenderer(r *sdl.Renderer) *Renderer

NewRenderer -

func (*Renderer) Clear

func (o *Renderer) Clear()

Clear -

func (*Renderer) ClearAll

func (o *Renderer) ClearAll()

ClearAll -

func (*Renderer) Copy

func (o *Renderer) Copy(tex *Texture, x, y int)

Copy -

func (*Renderer) CopyRegion

func (o *Renderer) CopyRegion(tex *Texture, src, dst image.Rectangle)

CopyRegion -

func (*Renderer) CopyRegionEx

func (o *Renderer) CopyRegionEx(tex *Texture, src, dst image.Rectangle, flip FlipMode)

CopyRegionEx -

func (*Renderer) Destroy

func (o *Renderer) Destroy() error

Destroy -

func (*Renderer) DrawLine

func (o *Renderer) DrawLine(x1, y1, x2, y2 int)

DrawLine -

func (*Renderer) DrawRect

func (o *Renderer) DrawRect(x, y, w, h int)

DrawRect -

func (*Renderer) DrawRect2i

func (o *Renderer) DrawRect2i(rect image.Rectangle)

DrawRect2i -

func (*Renderer) DrawText

func (o *Renderer) DrawText(x, y int, text string)

DrawText -

func (*Renderer) FillRect

func (o *Renderer) FillRect(x, y, w, h int)

FillRect -

func (*Renderer) FillRect2i

func (o *Renderer) FillRect2i(rect image.Rectangle)

FillRect2i -

func (*Renderer) ImageToTexture

func (o *Renderer) ImageToTexture(img image.Image) (*Texture, error)

ImageToTexture -

func (*Renderer) LoadTexture

func (o *Renderer) LoadTexture(path string) (*Texture, error)

LoadTexture -

func (*Renderer) Present

func (o *Renderer) Present()

Present -

func (*Renderer) Print

func (o *Renderer) Print(x, y int, text string)

Print -

func (*Renderer) ResetViewport

func (o *Renderer) ResetViewport()

ResetViewport -

func (*Renderer) SDLRenderer

func (o *Renderer) SDLRenderer() *sdl.Renderer

SDLRenderer -

func (*Renderer) SetColor

func (o *Renderer) SetColor(c color.Color)

SetColor -

func (*Renderer) SetDefaultFont

func (o *Renderer) SetDefaultFont(font font.Face)

SetDefaultFont -

func (*Renderer) SetOffset

func (o *Renderer) SetOffset(offset image.Point)

SetOffset -

func (*Renderer) SetScale

func (o *Renderer) SetScale(x, y float64)

SetScale -

func (*Renderer) SetTextColor

func (o *Renderer) SetTextColor(c color.Color)

SetTextColor -

func (*Renderer) SetViewport

func (o *Renderer) SetViewport(rect image.Rectangle)

SetViewport -

func (*Renderer) Size

func (o *Renderer) Size() (int, int)

Size -

func (*Renderer) UnloadTexture

func (o *Renderer) UnloadTexture(tex *Texture)

UnloadTexture -

type Texture

type Texture struct {
	general.RefCounter
	general.URI

	W, H int
	// contains filtered or unexported fields
}

Texture -

func (*Texture) At

func (o *Texture) At(x, y int) color.Color

At -

func (*Texture) Bounds

func (o *Texture) Bounds() image.Rectangle

Bounds -

func (*Texture) ColorModel

func (o *Texture) ColorModel() color.Model

ColorModel -

func (*Texture) SetBlendMode

func (o *Texture) SetBlendMode(mode sdl.BlendMode)

SetBlendMode -

func (*Texture) SetColorMod

func (o *Texture) SetColorMod(c color.Color)

SetColorMod -

Jump to

Keyboard shortcuts

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