Documentation ¶
Overview ¶
Package gfx is an add-on for SDL2 that provides drawing of graphics primitives, rotozoomer, MMX image filters and framerate control.
Index ¶
- Constants
- func AACircleColor(renderer *sdl.Renderer, x, y, rad int32, color sdl.Color) bool
- func AACircleRGBA(renderer *sdl.Renderer, x, y, rad int32, r, g, b, a uint8) bool
- func AAEllipseColor(renderer *sdl.Renderer, x, y, rx, ry int32, color sdl.Color) bool
- func AAEllipseRGBA(renderer *sdl.Renderer, x, y, rx, ry int32, r, g, b, a uint8) bool
- func AALineColor(renderer *sdl.Renderer, x1, y1, x2, y2 int32, color sdl.Color) bool
- func AALineRGBA(renderer *sdl.Renderer, x1, y1, x2, y2 int32, r, g, b, a uint8) bool
- func AAPolygonColor(renderer *sdl.Renderer, vx, vy []int16, color sdl.Color) bool
- func AAPolygonRGBA(renderer *sdl.Renderer, vx, vy []int16, r, g, b, a uint8) bool
- func ArcColor(renderer *sdl.Renderer, x, y, rad, start, end int32, color sdl.Color) bool
- func ArcRGBA(renderer *sdl.Renderer, x, y, rad, start, end int32, r, g, b, a uint8) bool
- func BezierColor(renderer *sdl.Renderer, vx, vy []int16, s int, color sdl.Color) bool
- func BezierRGBA(renderer *sdl.Renderer, vx, vy []int16, s int, r, g, b, a uint8) bool
- func BoxColor(renderer *sdl.Renderer, x1, y1, x2, y2 int32, color sdl.Color) bool
- func BoxRGBA(renderer *sdl.Renderer, x1, y1, x2, y2 int32, r, g, b, a uint8) bool
- func CharacterColor(renderer *sdl.Renderer, x, y int32, c byte, color sdl.Color) bool
- func CharacterRGBA(renderer *sdl.Renderer, x, y int32, c, r, g, b, a uint8) bool
- func CircleColor(renderer *sdl.Renderer, x, y, rad int32, color sdl.Color) bool
- func CircleRGBA(renderer *sdl.Renderer, x, y, rad int32, r, g, b, a uint8) bool
- func EllipseColor(renderer *sdl.Renderer, x, y, rx, ry int32, color sdl.Color) bool
- func EllipseRGBA(renderer *sdl.Renderer, x, y, rx, ry int32, r, g, b, a uint8) bool
- func FilledCircleColor(renderer *sdl.Renderer, x, y, rad int32, color sdl.Color) bool
- func FilledCircleRGBA(renderer *sdl.Renderer, x, y, rad int32, r, g, b, a uint8) bool
- func FilledEllipseColor(renderer *sdl.Renderer, x, y, rx, ry int32, color sdl.Color) bool
- func FilledEllipseRGBA(renderer *sdl.Renderer, x, y, rx, ry int32, r, g, b, a uint8) bool
- func FilledPieColor(renderer *sdl.Renderer, x, y, rad, start, end int32, color sdl.Color) bool
- func FilledPieRGBA(renderer *sdl.Renderer, x, y, rad, start, end int32, r, g, b, a uint8) bool
- func FilledPolygonColor(renderer *sdl.Renderer, vx, vy []int16, color sdl.Color) bool
- func FilledPolygonRGBA(renderer *sdl.Renderer, vx, vy []int16, r, g, b, a uint8) bool
- func FilledTrigonColor(renderer *sdl.Renderer, x1, y1, x2, y2, x3, y3 int32, color sdl.Color) bool
- func FilledTrigonRGBA(renderer *sdl.Renderer, x1, y1, x2, y2, x3, y3 int32, r, g, b, a uint8) bool
- func FramerateDelay(manager *FPSmanager) uint32
- func GetFramecount(manager *FPSmanager) (int, bool)
- func GetFramerate(manager *FPSmanager) (int, bool)
- func HlineColor(renderer *sdl.Renderer, x1, x2, y int32, color sdl.Color) bool
- func HlineRGBA(renderer *sdl.Renderer, x1, x2, y int32, r, g, b, a uint8) bool
- func ImageFilterAbsDiff(src1, src2, dest []byte) bool
- func ImageFilterAdd(src1, src2, dest []byte) bool
- func ImageFilterAddByte(src1, dest []byte, c byte) bool
- func ImageFilterAddUint(src1, dest []byte, c uint) bool
- func ImageFilterBinarizeUsingThreshold(src1, dest []byte, t byte) bool
- func ImageFilterBitAnd(src1, src2, dest []byte) bool
- func ImageFilterBitNegation(src1, dest []byte) bool
- func ImageFilterBitOr(src1, src2, dest []byte) bool
- func ImageFilterClipToRange(src1, dest []byte, tmin, tmax byte) bool
- func ImageFilterDiv(src1, src2, dest []byte) bool
- func ImageFilterMMXdetect() bool
- func ImageFilterMMXoff()
- func ImageFilterMMXon()
- func ImageFilterMean(src1, src2, dest []byte) bool
- func ImageFilterMult(src1, src2, dest []byte) bool
- func ImageFilterMultByByte(src1, dest []byte, c byte) bool
- func ImageFilterMultDivby2(src1, src2, dest []byte) bool
- func ImageFilterMultDivby4(src1, src2, dest []byte) bool
- func ImageFilterMultNor(src1, src2, dest []byte) bool
- func ImageFilterNormalizeLinear(src1, dest []byte, cmin, cmax, nmin, nmax int) bool
- func ImageFilterShiftLeft(src1, dest []byte, n byte) bool
- func ImageFilterShiftLeftByte(src1, dest []byte, n byte) bool
- func ImageFilterShiftLeftUint(src1, dest []byte, n byte) bool
- func ImageFilterShiftRight(src1, dest []byte, n byte) bool
- func ImageFilterShiftRightAndMultByByte(src1, dest []byte, n, c byte) bool
- func ImageFilterShiftRightUint(src1, dest []byte, n byte) bool
- func ImageFilterSub(src1, src2, dest []byte) bool
- func ImageFilterSubByte(src1, dest []byte, c byte) bool
- func ImageFilterSubUint(src1, dest []byte, c uint) bool
- func InitFramerate(manager *FPSmanager)
- func LineColor(renderer *sdl.Renderer, x1, y1, x2, y2 int32, color sdl.Color) bool
- func LineRGBA(renderer *sdl.Renderer, x1, y1, x2, y2 int32, r, g, b, a uint8) bool
- func PieColor(renderer *sdl.Renderer, x, y, rad, start, end int32, color sdl.Color) bool
- func PieRGBA(renderer *sdl.Renderer, x, y, rad, start, end int32, r, g, b, a uint8) bool
- func PixelColor(renderer *sdl.Renderer, x, y int32, color sdl.Color) bool
- func PixelRGBA(renderer *sdl.Renderer, x, y int32, r, g, b, a uint8) bool
- func PolygonColor(renderer *sdl.Renderer, vx, vy []int16, color sdl.Color) bool
- func PolygonRGBA(renderer *sdl.Renderer, vx, vy []int16, r, g, b, a uint8) bool
- func RectangleColor(renderer *sdl.Renderer, x1, y1, x2, y2 int32, color sdl.Color) bool
- func RectangleRGBA(renderer *sdl.Renderer, x1, y1, x2, y2 int32, r, g, b, a uint8) bool
- func RotateSurface90Degrees(src *sdl.Surface, numClockwiseTurns int) *sdl.Surface
- func RotoZoomSurface(src *sdl.Surface, angle, zoom float64, smooth int) *sdl.Surface
- func RotoZoomSurfaceXY(src *sdl.Surface, angle, zoomx, zoomy float64, smooth int) *sdl.Surface
- func RoundedBoxColor(renderer *sdl.Renderer, x1, y1, x2, y2, rad int32, color sdl.Color) bool
- func RoundedBoxRGBA(renderer *sdl.Renderer, x1, y1, x2, y2, rad int32, r, g, b, a uint8) bool
- func RoundedRectangleColor(renderer *sdl.Renderer, x1, y1, x2, y2, rad int32, color sdl.Color) bool
- func RoundedRectangleRGBA(renderer *sdl.Renderer, x1, y1, x2, y2, rad int32, r, g, b, a uint8) bool
- func SetFont(fontdata []byte, cw, ch uint32)
- func SetFontRotation(rotation uint32)
- func SetFramerate(manager *FPSmanager, rate uint32) bool
- func ShrinkSurface(src *sdl.Surface, factorx, factory int) *sdl.Surface
- func StringColor(renderer *sdl.Renderer, x, y int32, s string, color sdl.Color) bool
- func StringRGBA(renderer *sdl.Renderer, x, y int32, s string, r, g, b, a uint8) bool
- func TexturedPolygon(renderer *sdl.Renderer, vx, vy []int16, surface *sdl.Surface, ...) bool
- func ThickLineColor(renderer *sdl.Renderer, x1, y1, x2, y2, width int32, color sdl.Color) bool
- func ThickLineRGBA(renderer *sdl.Renderer, x1, y1, x2, y2, width int32, r, g, b, a uint8) bool
- func TrigonColor(renderer *sdl.Renderer, x1, y1, x2, y2, x3, y3 int32, color sdl.Color) bool
- func TrigonRGBA(renderer *sdl.Renderer, x1, y1, x2, y2, x3, y3 int32, r, g, b, a uint8) bool
- func VlineColor(renderer *sdl.Renderer, x, y1, y2 int32, color sdl.Color) bool
- func VlineRGBA(renderer *sdl.Renderer, x, y1, y2 int32, r, g, b, a uint8) bool
- func ZoomSurface(src *sdl.Surface, zoomx, zoomy float64, smooth int) *sdl.Surface
- func ZoomSurfaceSize(width, height int32, zoomx, zoomy float64) (dstwidth, dstheight int)
- type FPSmanager
Constants ¶
const ( FPS_UPPER_LIMIT = 200 // highest possible rate supported by framerate controller in Hz (1/s) FPS_LOWER_LIMIT = 1 // lowest possible rate supported by framerate controller in Hz (1/s) FPS_DEFAULT = 30 // default rate of framerate controller in Hz (1/s) )
FPS definitions.
const ( SMOOTHING_OFF = 0 // disable anti-aliasing (no smoothing) SMOOTHING_ON = 1 // enable anti-aliasing (smoothing) )
Rotozoom smoothing settings.
Variables ¶
This section is empty.
Functions ¶
func AACircleColor ¶
AACircleColor draws anti-aliased circle with blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#aad64361b01181e6aff940add96d23c61)
func AACircleRGBA ¶
AACircleRGBA draws anti-aliased circle with blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a332780885aa2cfdc2de34dcff8d67e8b)
func AAEllipseColor ¶
AAEllipseColor draws anti-aliased ellipse with blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a1c7d20dcba8e0d7ce483f4c854c438be)
func AAEllipseRGBA ¶
AAEllipseRGBA draws anti-aliased ellipse with blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#ab9f0f00d7fb2f04aa9ba1630e31a27bf)
func AALineColor ¶
AALineColor draws anti-aliased line with alpha blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a25c56f2def855db01dcf7ff7f7356182)
func AALineRGBA ¶
AALineRGBA draws anti-aliased line with alpha blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a25c56f2def855db01dcf7ff7f7356182)
func AAPolygonColor ¶
AAPolygonColor draws anti-aliased polygon with alpha blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a09950a50e8806e88bb20c543c58cc6a8)
func AAPolygonRGBA ¶
AAPolygonRGBA draws anti-aliased polygon with alpha blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a7d08522e52d8290c5c498ce435fa51f0)
func ArcColor ¶
ArcColor draws arc with blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a461b8ac31e00306aee5f8a4c242671d2)
func ArcRGBA ¶
ArcRGBA draws arc with blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a2aff993d0d8d64564e16145f401d3cf1)
func BezierColor ¶
BezierColor draws a bezier curve with alpha blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#adfe8f9c42d29a090aae15eeb19b80d51)
func BezierRGBA ¶
BezierRGBA draws a bezier curve with alpha blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a4b7fbf6cc366abdf345a25308d53e125)
func BoxColor ¶
BoxColor draws box (filled rectangle) with blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a6bb30dfc32d0aee20271a0356a2e2fd0)
func BoxRGBA ¶
BoxRGBA draws box (filled rectangle) with blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a1864b3062793a7f7dd81aaf8c8abd6b0)
func CharacterColor ¶
CharacterColor draws a character of the currently set font. On first call for a particular character and color combination, the function needs to generate the character surface (slower). Subsequent calls blit a cached surface (fast). Uses alpha blending if A<255 in color. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#aef5fdeb16c4578d8cd50e106299e993e)
func CharacterRGBA ¶
CharacterRGBA draws a character of the currently set font. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a96379d2ce808aa642afb57bced0c670e)
func CircleColor ¶
CircleColor draws circle with blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#aa99bd361cc947b448142720f2ca3320e)
func CircleRGBA ¶
CircleRGBA draws circle with blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a7fe51d4c9426c8795e58c7ddd313b0a4)
func EllipseColor ¶
EllipseColor draws ellipse with blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a476cff7702f4be9090871e35859782f0)
func EllipseRGBA ¶
EllipseRGBA draws ellipse with blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a18c8a26c9009482eec40f9f4a6945fd1)
func FilledCircleColor ¶
FilledCircleColor draws filled circle with blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a39147d1282ec814a1b9e31243aad0359)
func FilledCircleRGBA ¶
FilledCircleRGBA draws filled circle with blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a562ba6b18fb70547cd50cb3bb0f70272)
func FilledEllipseColor ¶
FilledEllipseColor draws filled ellipse with blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a8fed50800f2f1bdfaa048698f5052f25)
func FilledEllipseRGBA ¶
FilledEllipseRGBA draws filled ellipse with blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a33595ad996dd0dcccde3abbcef540eec)
func FilledPieColor ¶
FilledPieColor draws filled pie with alpha blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a2c30ee985b2513dc58d9b19d4e71562b)
func FilledPieRGBA ¶
FilledPieRGBA draws filled pie with alpha blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a4ffdfd2834f3ef0fd0ee622b5f1d16b8)
func FilledPolygonColor ¶
FilledPolygonColor draws filled polygon with alpha blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#af22692175cb73329410cbcc7d7491c4d)
func FilledPolygonRGBA ¶
FilledPolygonRGBA draws filled polygon with alpha blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a40ef0b898905c190c193f0f55deb5a6c)
func FilledTrigonColor ¶
FilledTrigonColor draws filled trigon (triangle) with alpha blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a78d4ed2372527f3b78f5893928b0f519)
func FilledTrigonRGBA ¶
FilledTrigonRGBA draws filled trigon (triangle) with alpha blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a8f318d776ff1e3c6790405e0e59e5356)
func FramerateDelay ¶
func FramerateDelay(manager *FPSmanager) uint32
FramerateDelay delays execution to maintain a constant framerate and calculate fps. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__framerate_8c.html#afce13fa3dd37130deb4975d8b230c3ba)
func GetFramecount ¶
func GetFramecount(manager *FPSmanager) (int, bool)
GetFramecount returns the current framecount. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__framerate_8c.html#a96b13e26f8436222e866904a592a6eec)
func GetFramerate ¶
func GetFramerate(manager *FPSmanager) (int, bool)
GetFramerate returns the current target framerate in Hz. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__framerate_8c.html#a575bb511d6f817ad846a788cbd08ae91)
func HlineColor ¶
HlineColor draws horizontal line with blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#ac211a904dce45093315e15b10c80d8ac)
func HlineRGBA ¶
HlineRGBA draws horizontal line with blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a6608a0d1d4c7e16fa1afcbd3eb5c3850)
func ImageFilterAbsDiff ¶
ImageFilterAbsDiff filters using AbsDiff: D = | S1 - S2 |. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__image_filter_8c.html#a472909f904274255cd6793c520172e48)
func ImageFilterAdd ¶
ImageFilterAdd filters using Add: D = saturation255(S1 + S2). (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__image_filter_8c.html#a9f06507eb0b63198dbd67495d61c9b20)
func ImageFilterAddByte ¶
ImageFilterAddByte filters using AddByte: D = saturation255(S + C). (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__image_filter_8c.html#a812cb307cb60ef31f1ffe81a9eee6bb1)
func ImageFilterAddUint ¶
ImageFilterAddUint filters using AddUint: D = saturation255((S[i] + Cs[i % 4]), Cs=Swap32((uint)C). (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__image_filter_8c.html#a660543426c47dfec39a349eb3b8f905b)
func ImageFilterBinarizeUsingThreshold ¶
ImageFilterBinarizeUsingThreshold filters using BinarizeUsingThreshold: D = (S >= T) ? 255:0. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__image_filter_8c.html#a951a062e15df290a137428e1e0f4d5ce)
func ImageFilterBitAnd ¶
ImageFilterBitAnd filters using BitAnd: D = S1 & S2. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__image_filter_8c.html#a85837ce1b5de1f907b6b9053922b5cbc)
func ImageFilterBitNegation ¶
ImageFilterBitNegation filters using BitNegation: D = !S. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__image_filter_8c.html#ac3abfaa8ec2e88c3c4893588c5555856)
func ImageFilterBitOr ¶
ImageFilterBitOr filters using BitOr: D = S1 | S2. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__image_filter_8c.html#a5cf1c477f4e32d02f74ee95d9f7b0021)
func ImageFilterClipToRange ¶
ImageFilterClipToRange filters using ClipToRange: D = (S >= Tmin) & (S <= Tmax) S:Tmin | Tmax. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__image_filter_8c.html#ab7224abc4ecc1b8a6f4441ef8379515f)
func ImageFilterDiv ¶
ImageFilterDiv filters using Div: D = S1 / S2. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__image_filter_8c.html#a0ea22f01c6a4724bac307da3e5355f58)
func ImageFilterMMXdetect ¶
func ImageFilterMMXdetect() bool
ImageFilterMMXdetect reports whether MMX check for filter functions is enabled. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__image_filter_8c.html#a798ce71024ee1a1d1b174fd60fe79917)
func ImageFilterMMXoff ¶
func ImageFilterMMXoff()
ImageFilterMMXoff disables MMX check for filter functions and force to use non-MMX C based code. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__image_filter_8c.html#a5dff661660755161bb4aaf6199cd1384)
func ImageFilterMMXon ¶
func ImageFilterMMXon()
ImageFilterMMXon enables MMX check for filter functions and use MMX code if available. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__image_filter_8c.html#a353ee234c3b51b33c4c5c4b30db5832d)
func ImageFilterMean ¶
ImageFilterMean filters using Mean: D = S1/2 + S2/2. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__image_filter_8c.html#ace072118fef77973210eb04fb4bfc779)
func ImageFilterMult ¶
ImageFilterMult filters using Mult: D = saturation255(S1 * S2). (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__image_filter_8c.html#af4633031d40a9ea0956a2f3c6c87a384)
func ImageFilterMultByByte ¶
ImageFilterMultByByte filters using MultByByte: D = saturation255(S * C). (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__image_filter_8c.html#a06f7a19d6e2fc89d7b48cc45d715806d)
func ImageFilterMultDivby2 ¶
ImageFilterMultDivby2 filter using MultDivby2: D = saturation255(S1/2 * S2) (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__image_filter_8c.html#a80737f6427c7bdb30d39a92f6524fc14)
func ImageFilterMultDivby4 ¶
ImageFilterMultDivby4 filters using MultDivby4: D = saturation255(S1/2 * S2/2). (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__image_filter_8c.html#a30e685653eb1050c7d48feaeb8f801a1)
func ImageFilterMultNor ¶
ImageFilterMultNor filters using MultNor: D = S1 * S2. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__image_filter_8c.html#a5f3c9fd40426bb46eba5ac167505dcc5)
func ImageFilterNormalizeLinear ¶
ImageFilterNormalizeLinear filters using NormalizeLinear: D = saturation255((Nmax - Nmin)/(Cmax - Cmin)*(S - Cmin) + Nmin). (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__image_filter_8c.html#ab018ace4db884cac953b06b09c00828b)
func ImageFilterShiftLeft ¶
ImageFilterShiftLeft filters ShiftLeft: D = saturation255(S << N). (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__image_filter_8c.html#a98372fea76310903abef7808db10d226)
func ImageFilterShiftLeftByte ¶
ImageFilterShiftLeftByte filters using ShiftLeftByte: D = (S << N). (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__image_filter_8c.html#a4561a73b249a26babc4c469ffbdae604)
func ImageFilterShiftLeftUint ¶
ImageFilterShiftLeftUint filters using ShiftLeftUint: D = ((uint)S << N). (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__image_filter_8c.html#a250e796fb2db470da0a78b74b78114e8)
func ImageFilterShiftRight ¶
ImageFilterShiftRight filters using ShiftRight: D = saturation0(S >> N). (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__image_filter_8c.html#a68851aed2dcc5dfd2f3b258236f3b88c)
func ImageFilterShiftRightAndMultByByte ¶
ImageFilterShiftRightAndMultByByte filters using ShiftRightAndMultByByte: D = saturation255((S >> N) * C). (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__image_filter_8c.html#a0713d6c267fba9756d6beae81e89f9e4)
func ImageFilterShiftRightUint ¶
ImageFilterShiftRightUint filters using ShiftRightUint: D = saturation0((uint)S[i] >> N). (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__image_filter_8c.html#a540d4625d76bcd03318c2a59ce650fdb)
func ImageFilterSub ¶
ImageFilterSub filters using Sub: D = saturation0(S1 - S2). (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__image_filter_8c.html#a3c01cf8576ea7a0dfc09dbaa953c9287)
func ImageFilterSubByte ¶
ImageFilterSubByte filters using SubByte: D = saturation0(S - C). (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__image_filter_8c.html#a387fb6f0d48cc5d08f37f7f9b92d14b2)
func ImageFilterSubUint ¶
ImageFilterSubUint filters using SubUint: D = saturation0(S[i] - Cs[i % 4]), Cs=Swap32((uint)C). (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__image_filter_8c.html#abb343ef95e22945e1d4d648b2e176e64)
func InitFramerate ¶
func InitFramerate(manager *FPSmanager)
InitFramerate initializes the framerate manager. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__framerate_8c.html#a444ebaaaa6b1ceeafa921562bdab1a44)
func LineColor ¶
LineColor draws line with alpha blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#ad44c550fab3cb736eb049713ede94052)
func LineRGBA ¶
LineRGBA draws line with alpha blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a760139e11a9ae5defeb755ca0c794f5f)
func PieColor ¶
PieColor draws pie (outline) with alpha blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a3c2bc64deabda74933f31daba6bed7be)
func PieRGBA ¶
PieRGBA draws pie (outline) with alpha blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a8442f2c2bedbe27c96d8d44319981992)
func PixelColor ¶
PixelColor pixel draws with blending enabled if a<255. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#ae6f8690e5c5a85d3263c8e16727b34ef)
func PixelRGBA ¶
PixelRGBA pixel draws with blending enabled if a<255. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a7b6f83bdef72f6b356664a93841381c0)
func PolygonColor ¶
PolygonColor draws polygon with alpha blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a2d692dc25f3b579b386dff8dcd9cbc00)
func PolygonRGBA ¶
PolygonRGBA draws polygon with alpha blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#ae55541ec58990420dc6dc6b9d61f33d6)
func RectangleColor ¶
RectangleColor draws rectangle with blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a6ab25c393f6e5f8d68ea3365f6ea98d2)
func RectangleRGBA ¶
RectangleRGBA draws rectangle with blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a40991c6eeb936d35d0a8e8aa95268f72)
func RotateSurface90Degrees ¶
RotateSurface90Degrees rotates a 32 bit surface in increments of 90 degrees. Specialized 90 degree rotator which rotates a 'src' surface in 90 degree increments clockwise returning a new surface. Faster than rotozoomer since not scanning or interpolation takes place. Input surface must be 32 bit. (code contributed by J. Schiller, improved by C. Allport and A. Schiffler) (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__rotozoom_8c.html#a77563d68634cb2624d4f2f0bcdc19e73)
func RotoZoomSurface ¶
RotoZoomSurface rotates and zooms a surface and optional anti-aliasing. Rotates and zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface. 'angle' is the rotation in degrees and 'zoom' a scaling factor. If 'smooth' is set then the destination 32bit surface is anti-aliased. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__rotozoom_8c.html#a5f64ed53eeee5f2667971c857698d1e5)
func RotoZoomSurfaceXY ¶
RotoZoomSurfaceXY rotates and zooms a surface with different horizontal and vertival scaling factors and optional anti-aliasing. Rotates and zooms a 32bit or 8bit 'src' surface to newly created 'dst' surface. 'angle' is the rotation in degrees, 'zoomx and 'zoomy' scaling factors. If 'smooth' is set then the destination 32bit surface is anti-aliased. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__rotozoom_8c.html#aab98b5b0da4ea468bacf47f7b85f0ee2)
func RoundedBoxColor ¶
RoundedBoxColor draws rounded-corner box (filled rectangle) with blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a718c4f31d1e145106959c2a77d5fee9d)
func RoundedBoxRGBA ¶
RoundedBoxRGBA draws rounded-corner box (filled rectangle) with blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#aad706348fec18631d7bc48a2d91f5b4d)
func RoundedRectangleColor ¶
RoundedRectangleColor draws rounded-corner rectangle with blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a830dd9dcfa39f4718aa2c269060326d0)
func RoundedRectangleRGBA ¶
RoundedRectangleRGBA draws rounded-corner rectangle with blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a300272b3b799f09ca6cd5c541b19f07a)
func SetFont ¶
SetFont sets or resets the current global font data. The font data array is organized in follows: [fontdata] = [character 0][character 1]...[character 255] where [character n] = [byte 1 row 1][byte 2 row 1]...[byte {pitch} row 1][byte 1 row 2] ...[byte {pitch} row height] where [byte n] = [bit 0]...[bit 7] where [bit n] = [0 for transparent pixel|1 for colored pixel]. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#afacd57651ec0e0ccab60753636862cd0)
func SetFontRotation ¶
func SetFontRotation(rotation uint32)
SetFontRotation sets current global font character rotation steps. Default is 0 (no rotation). 1 = 90deg clockwise. 2 = 180deg clockwise. 3 = 270deg clockwise. Changing the rotation, will reset the character cache.(http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#aef6796a883f07d31bbf7c7df6d1153d2)
func SetFramerate ¶
func SetFramerate(manager *FPSmanager, rate uint32) bool
SetFramerate sets the framerate in Hz. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__framerate_8c.html#afad4b503cf9719daced45fa4d9653d72)
func ShrinkSurface ¶
ShrinkSurface shrink a surface by an integer ratio using averaging. Shrinks a 32bit or 8bit 'src' surface to a newly created 'dst' surface. 'factorx' and 'factory' are the shrinking ratios (i.e. 2=1/2 the size, 3=1/3 the size, etc.) The destination surface is antialiased by averaging the source box RGBA or Y information. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. The input surface is not modified. The output surface is newly allocated. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__rotozoom_8c.html#aad3bf0cd89cc39ff874ffa778fa1495d)
func StringColor ¶
StringColor draws a string in the currently set font. The spacing between consequtive characters in the string is the fixed number of pixels of the character width of the current global font. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a62d2ba55abc7673f2dfa29e6bbffefdf)
func StringRGBA ¶
StringRGBA draws a string in the currently set font. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a6ca71826e311bdd9acf13b009256aa1c)
func TexturedPolygon ¶
func TexturedPolygon(renderer *sdl.Renderer, vx, vy []int16, surface *sdl.Surface, textureDX, textureDY int) bool
TexturedPolygon draws a polygon filled with the given texture. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a65137af308ea878f28abc95419e8aef5)
func ThickLineColor ¶
ThickLineColor draws a thick line with alpha blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a1494109358b4e4b7ec300d83e3f90300)
func ThickLineRGBA ¶
ThickLineRGBA draws a thick line with alpha blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a8b24d64b51e23592c93abc2aa50c818e)
func TrigonColor ¶
TrigonColor draws trigon (triangle outline) with alpha blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a7465d08ef930ebb5442c7dd246fed4b5)
func TrigonRGBA ¶
TrigonRGBA draws trigon (triangle outline) with alpha blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a45d6a7edcd8b25e1a60e39b7f60bda3f)
func VlineColor ¶
VlineColor draws vertical line with blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a9b45060155a19fee24f998d7790f1d67)
func VlineRGBA ¶
VlineRGBA draws vertical line with blending. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__gfx_primitives_8c.html#a8b79ac1e779755aee92b04f3a6cfc5d7)
func ZoomSurface ¶
ZoomSurface zoom a surface by independent horizontal and vertical factors with optional smoothing. Zooms a 32bit or 8bit 'src' surface to newly created 'dst' surface. 'zoomx' and 'zoomy' are scaling factors for width and height. If 'smooth' is on then the destination 32bit surface is anti-aliased. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. If zoom factors are negative, the image is flipped on the axes. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__rotozoom_8c.html#abdd772b2f6b1f26134e4e90cda657a21)
func ZoomSurfaceSize ¶
ZoomSurfaceSize calculates the size of the target surface for a gfx.ZoomSurface() call. The minimum size of the target surface is 1. The input factors can be positive or negative. (http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__rotozoom_8c.html#a8ba40859c1a977dae87488dd8be1bf9a)