gfx

package
v0.0.0-...-0c7cf84 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2017 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FPS_UPPER_LIMIT = 200
	FPS_LOWER_LIMIT = 200
	FPS_DEFAULT     = 30
)

FPS

View Source
const (
	SMOOTHING_OFF = 0
	SMOOTHING_ON  = 0
)

Variables

This section is empty.

Functions

func AACircleColor

func AACircleColor(renderer *sdl.Renderer, x, y, rad int, color sdl.Color) bool

func AACircleRGBA

func AACircleRGBA(renderer *sdl.Renderer, x, y, rad int, r, g, b, a uint8) bool

func AAEllipseColor

func AAEllipseColor(renderer *sdl.Renderer, x, y, rx, ry int, color sdl.Color) bool

func AAEllipseRGBA

func AAEllipseRGBA(renderer *sdl.Renderer, x, y, rx, ry int, r, g, b, a uint8) bool

func AALineColor

func AALineColor(renderer *sdl.Renderer, x1, y1, x2, y2 int, color sdl.Color) bool

func AALineRGBA

func AALineRGBA(renderer *sdl.Renderer, x1, y1, x2, y2 int, r, g, b, a uint8) bool

func AAPolygonColor

func AAPolygonColor(renderer *sdl.Renderer, vx, vy []int16, color sdl.Color) bool

func AAPolygonRGBA

func AAPolygonRGBA(renderer *sdl.Renderer, vx, vy []int16, r, g, b, a uint8) bool

func ArcColor

func ArcColor(renderer *sdl.Renderer, x, y, rad, start, end int, color sdl.Color) bool

func ArcRGBA

func ArcRGBA(renderer *sdl.Renderer, x, y, rad, start, end int, r, g, b, a uint8) bool

func BezierColor

func BezierColor(renderer *sdl.Renderer, vx, vy []int16, s int, color sdl.Color) bool

func BezierRGBA

func BezierRGBA(renderer *sdl.Renderer, vx, vy []int16, s int, r, g, b, a uint8) bool

func BoxColor

func BoxColor(renderer *sdl.Renderer, x1, y1, x2, y2 int, color sdl.Color) bool

func BoxRGBA

func BoxRGBA(renderer *sdl.Renderer, x1, y1, x2, y2 int, r, g, b, a uint8) bool

func CharacterColor

func CharacterColor(renderer *sdl.Renderer, x, y int, c byte, color sdl.Color) bool

func CharacterRGBA

func CharacterRGBA(renderer *sdl.Renderer, x, y int, c, r, g, b, a uint8) bool

func CircleColor

func CircleColor(renderer *sdl.Renderer, x, y, rad int, color sdl.Color) bool

func CircleRGBA

func CircleRGBA(renderer *sdl.Renderer, x, y, rad int, r, g, b, a uint8) bool

func EllipseColor

func EllipseColor(renderer *sdl.Renderer, x, y, rx, ry int, color sdl.Color) bool

func EllipseRGBA

func EllipseRGBA(renderer *sdl.Renderer, x, y, rx, ry int, r, g, b, a uint8) bool

func FilledCircleColor

func FilledCircleColor(renderer *sdl.Renderer, x, y, rad int, color sdl.Color) bool

func FilledCircleRGBA

func FilledCircleRGBA(renderer *sdl.Renderer, x, y, rad int, r, g, b, a uint8) bool

func FilledEllipseColor

func FilledEllipseColor(renderer *sdl.Renderer, x, y, rx, ry int, color sdl.Color) bool

func FilledEllipseRGBA

func FilledEllipseRGBA(renderer *sdl.Renderer, x, y, rx, ry int, r, g, b, a uint8) bool

func FilledPieColor

func FilledPieColor(renderer *sdl.Renderer, x, y, rad, start, end int, color sdl.Color) bool

func FilledPieRGBA

func FilledPieRGBA(renderer *sdl.Renderer, x, y, rad, start, end int, r, g, b, a uint8) bool

func FilledPolygonColor

func FilledPolygonColor(renderer *sdl.Renderer, vx, vy []int16, color sdl.Color) bool

func FilledPolygonRGBA

func FilledPolygonRGBA(renderer *sdl.Renderer, vx, vy []int16, r, g, b, a uint8) bool

func FilledTrigonColor

func FilledTrigonColor(renderer *sdl.Renderer, x1, y1, x2, y2, x3, y3 int, color sdl.Color) bool

func FilledTrigonRGBA

func FilledTrigonRGBA(renderer *sdl.Renderer, x1, y1, x2, y2, x3, y3 int, r, g, b, a uint8) bool

func FramerateDelay

func FramerateDelay(manager *FPSmanager) uint32

func GFXPrimitiveSetFont

func GFXPrimitiveSetFont(fontdata []byte, cw, ch uint32)

func GFXPrimitivesSetFontRotation

func GFXPrimitivesSetFontRotation(rotation uint32)

func GetFramecount

func GetFramecount(manager *FPSmanager) (int, bool)

func GetFramerate

func GetFramerate(manager *FPSmanager) (int, bool)

func HlineColor

func HlineColor(renderer *sdl.Renderer, x1, x2, y int, color sdl.Color) bool

func HlineRGBA

func HlineRGBA(renderer *sdl.Renderer, x1, x2, y int, r, g, b, a uint8) bool

func ImageFilterAbsDiff

func ImageFilterAbsDiff(src1, src2, dest []byte) bool

func ImageFilterAdd

func ImageFilterAdd(src1, src2, dest []byte) bool

func ImageFilterAddByte

func ImageFilterAddByte(src1, dest []byte, c byte) bool

func ImageFilterAddUint

func ImageFilterAddUint(src1, dest []byte, c uint) bool

func ImageFilterBinarizeUsingThreshold

func ImageFilterBinarizeUsingThreshold(src1, dest []byte, t byte) bool

func ImageFilterBitAnd

func ImageFilterBitAnd(src1, src2, dest []byte) bool

func ImageFilterBitNegation

func ImageFilterBitNegation(src1, dest []byte) bool

func ImageFilterBitOr

func ImageFilterBitOr(src1, src2, dest []byte) bool

func ImageFilterClipToRange

func ImageFilterClipToRange(src1, dest []byte, tmin, tmax byte) bool

func ImageFilterDiv

func ImageFilterDiv(src1, src2, dest []byte) bool

func ImageFilterMMXdetect

func ImageFilterMMXdetect() bool

func ImageFilterMMXoff

func ImageFilterMMXoff()

func ImageFilterMMXon

func ImageFilterMMXon()

func ImageFilterMean

func ImageFilterMean(src1, src2, dest []byte) bool

func ImageFilterMult

func ImageFilterMult(src1, src2, dest []byte) bool

func ImageFilterMultByByte

func ImageFilterMultByByte(src1, dest []byte, c byte) bool

func ImageFilterMultDivby2

func ImageFilterMultDivby2(src1, src2, dest []byte) bool

func ImageFilterMultDivby4

func ImageFilterMultDivby4(src1, src2, dest []byte) bool

func ImageFilterMultNor

func ImageFilterMultNor(src1, src2, dest []byte) bool

func ImageFilterNormalizeLinear

func ImageFilterNormalizeLinear(src1, dest []byte, cmin, cmax, nmin, nmax int) bool

func ImageFilterShiftLeft

func ImageFilterShiftLeft(src1, dest []byte, n byte) bool

func ImageFilterShiftLeftByte

func ImageFilterShiftLeftByte(src1, dest []byte, n byte) bool

func ImageFilterShiftLeftUint

func ImageFilterShiftLeftUint(src1, dest []byte, n byte) bool

func ImageFilterShiftRight

func ImageFilterShiftRight(src1, dest []byte, n byte) bool

func ImageFilterShiftRightAndMultByByte

func ImageFilterShiftRightAndMultByByte(src1, dest []byte, n, c byte) bool

func ImageFilterShiftRightUint

func ImageFilterShiftRightUint(src1, dest []byte, n byte) bool

func ImageFilterSub

func ImageFilterSub(src1, src2, dest []byte) bool

func ImageFilterSubByte

func ImageFilterSubByte(src1, dest []byte, c byte) bool

func ImageFilterSubUint

func ImageFilterSubUint(src1, dest []byte, c uint) bool

func InitFramerate

func InitFramerate(manager *FPSmanager)

func LineColor

func LineColor(renderer *sdl.Renderer, x1, y1, x2, y2 int, color sdl.Color) bool

func LineRGBA

func LineRGBA(renderer *sdl.Renderer, x1, y1, x2, y2 int, r, g, b, a uint8) bool

func PieColor

func PieColor(renderer *sdl.Renderer, x, y, rad, start, end int, color sdl.Color) bool

func PieRGBA

func PieRGBA(renderer *sdl.Renderer, x, y, rad, start, end int, r, g, b, a uint8) bool

func PixelColor

func PixelColor(renderer *sdl.Renderer, x, y int, color sdl.Color) bool

func PixelRGBA

func PixelRGBA(renderer *sdl.Renderer, x, y int, r, g, b, a uint8) bool

func PolygonColor

func PolygonColor(renderer *sdl.Renderer, vx, vy []int16, color sdl.Color) bool

func PolygonRGBA

func PolygonRGBA(renderer *sdl.Renderer, vx, vy []int16, r, g, b, a uint8) bool

func RectangleColor

func RectangleColor(renderer *sdl.Renderer, x1, y1, x2, y2 int, color sdl.Color) bool

func RectangleRGBA

func RectangleRGBA(renderer *sdl.Renderer, x1, y1, x2, y2 int, r, g, b, a uint8) bool

func RotateSurface90Degrees

func RotateSurface90Degrees(src *sdl.Surface, numClockwiseTurns int) *sdl.Surface

func RotoZoomSurface

func RotoZoomSurface(src *sdl.Surface, angle, zoom float64, smooth int) *sdl.Surface

func RotoZoomSurfaceXY

func RotoZoomSurfaceXY(src *sdl.Surface, angle, zoomx, zoomy float64, smooth int) *sdl.Surface

func RoundedBoxColor

func RoundedBoxColor(renderer *sdl.Renderer, x1, y1, x2, y2, rad int, color sdl.Color) bool

func RoundedBoxRGBA

func RoundedBoxRGBA(renderer *sdl.Renderer, x1, y1, x2, y2, rad int, r, g, b, a uint8) bool

func RoundedRectangleColor

func RoundedRectangleColor(renderer *sdl.Renderer, x1, y1, x2, y2, rad int, color sdl.Color) bool

func RoundedRectangleRGBA

func RoundedRectangleRGBA(renderer *sdl.Renderer, x1, y1, x2, y2, rad int, r, g, b, a uint8) bool

func SetFramerate

func SetFramerate(manager *FPSmanager, rate uint32) bool

func ShrinkSurface

func ShrinkSurface(src *sdl.Surface, factorx, factory int) *sdl.Surface

func StringColor

func StringColor(renderer *sdl.Renderer, x, y int, s string, color sdl.Color) bool

func StringRGBA

func StringRGBA(renderer *sdl.Renderer, x, y int, s string, r, g, b, a uint8) bool

func TexturedPolygon

func TexturedPolygon(renderer *sdl.Renderer, vx, vy []int16, surface *sdl.Surface, textureDX, textureDY int) bool

func ThickLineColor

func ThickLineColor(renderer *sdl.Renderer, x1, y1, x2, y2, width int, color sdl.Color) bool

func ThickLineRGBA

func ThickLineRGBA(renderer *sdl.Renderer, x1, y1, x2, y2, width int, r, g, b, a uint8) bool

func TrigonColor

func TrigonColor(renderer *sdl.Renderer, x1, y1, x2, y2, x3, y3 int, color sdl.Color) bool

func TrigonRGBA

func TrigonRGBA(renderer *sdl.Renderer, x1, y1, x2, y2, x3, y3 int, r, g, b, a uint8) bool

func VlineColor

func VlineColor(renderer *sdl.Renderer, x, y1, y2 int, color sdl.Color) bool

func VlineRGBA

func VlineRGBA(renderer *sdl.Renderer, x, y1, y2 int, r, g, b, a uint8) bool

func ZoomSurface

func ZoomSurface(src *sdl.Surface, zoomx, zoomy float64, smooth int) *sdl.Surface

func ZoomSurfaceSize

func ZoomSurfaceSize(width, height int, zoomx, zoomy float64) (dstwidth int, dstheight int)

Types

type FPSmanager

type FPSmanager struct {
	FrameCount uint32
	RateTicks  float32
	BaseTicks  uint32
	LastTicks  uint32
	Rate       uint32
}

Jump to

Keyboard shortcuts

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