Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bolknote/go-gd
/ functions
Functions
325 in github.com/bolknote/go-gd
⨍
Functions
325
◇
Types & classes
37
↓ 170 callers
Method
cptr
()
pkg/gd/gd.go:89
↓ 71 callers
Method
Close
Close releases the underlying gdImagePtr. Close is idempotent. After Close, methods that read state return their documented closed-image value (Width
pkg/gd/gd.go:118
↓ 34 callers
Method
Width
Width returns the image width in pixels, or 0 if the image is closed.
pkg/gd/gd.go:147
↓ 33 callers
Method
Height
Height returns the image height in pixels, or 0 if the image is closed.
pkg/gd/gd.go:156
↓ 32 callers
Function
allocColor
(t *testing.T, im *Image, r, g, b int)
pkg/gd/io_extra_test.go:30
↓ 31 callers
Function
SupportsFormat
(format Format, writing bool)
pkg/gd/features.go:47
↓ 30 callers
Function
wrapDecodedImage
(ptr C.gdImagePtr)
pkg/gd/gd.go:77
↓ 27 callers
Function
newTrueColor
(t *testing.T, w, h int)
pkg/gd/io_extra_test.go:12
↓ 24 callers
Method
cptr
()
pkg/gd/ioctx.go:81
↓ 21 callers
Method
Fill
(x, y int, color Color)
pkg/gd/draw.go:166
↓ 19 callers
Function
boolInt
(v bool)
pkg/gd/color.go:281
↓ 16 callers
Function
imageBytes
(ptr unsafe.Pointer, size C.int)
pkg/gd/io.go:223
↓ 15 callers
Function
SupportsFileType
(filename string, writing bool)
pkg/gd/features.go:51
↓ 14 callers
Function
withReadFile
withReadFile invokes fn with an opened-for-read C FILE and always closes it afterwards, returning fn's error and ignoring close errors (the data, if a
pkg/gd/io.go:179
↓ 13 callers
Function
decodeBuffer
(data []byte, fn func(C.int, unsafe.Pointer) C.gdImagePtr)
pkg/gd/io.go:216
↓ 13 callers
Function
wrapImage
(ptr C.gdImagePtr)
pkg/gd/gd.go:70
↓ 12 callers
Method
c
()
pkg/gd/transform.go:304
↓ 12 callers
Function
withWriteFile
withWriteFile invokes fn with an opened-for-write C FILE and propagates close errors so that buffered I/O failures (ENOSPC, EIO, ...) reach the caller
pkg/gd/io.go:193
↓ 11 callers
Method
AllocateColor
(r, g, b int)
pkg/gd/color.go:44
↓ 11 callers
Function
must
(err error)
examples/basic/main.go:34
↓ 10 callers
Function
NewTrueColor
NewTrueColor creates a truecolor image.
pkg/gd/gd.go:105
↓ 9 callers
Function
affineFromC
(in [6]C.double)
pkg/gd/transform.go:312
↓ 9 callers
Function
assertRGB
(t *testing.T, got RGBA, r, g, b int)
pkg/gd/wrapper_coverage_test.go:33
↓ 8 callers
Function
newPalette
(t *testing.T, w, h int)
pkg/gd/io_extra_test.go:21
↓ 7 callers
Function
BuiltinFont
(size FontSize)
pkg/gd/text.go:81
↓ 7 callers
Method
TrueColor
TrueColor reports whether the image is truecolor rather than palette-based. Returns false for a closed image.
pkg/gd/gd.go:172
↓ 6 callers
Method
ColorsTotal
ColorsTotal returns the number of palette colors, or 0 for a closed image.
pkg/gd/gd.go:181
↓ 6 callers
Method
Concat
Concat returns the composition a ∘ other.
pkg/gd/transform.go:238
↓ 6 callers
Method
Line
(x1, y1, x2, y2 int, color Color)
pkg/gd/draw.go:94
↓ 6 callers
Function
NewPalette
NewPalette creates a palette image with up to 256 colors.
pkg/gd/gd.go:97
↓ 6 callers
Method
SetPixel
(x, y int, color Color)
pkg/gd/draw.go:52
↓ 6 callers
Method
cptr
()
pkg/gd/text.go:98
↓ 6 callers
Function
defaultJPEGOptions
(opts *JPEGOptions)
pkg/gd/io.go:69
↓ 5 callers
Method
Extract
Extract returns the bytes accumulated by a dynamic write context and consumes the context. The returned context is closed; Extract may not be called o
pkg/gd/ioctx.go:120
↓ 5 callers
Method
FilledRectangle
(x1, y1, x2, y2 int, color Color)
pkg/gd/draw.go:121
↓ 5 callers
Method
Has
Has reports whether all bits in flag are present. Has(0) is always false so that callers can safely test individual constants without special-casing t
pkg/gd/compare.go:25
↓ 5 callers
Function
NewDynamicWriteContext
NewDynamicWriteContext creates a gdIOCtx backed by libgd-managed memory that grows as encoders write to it. Use Extract to retrieve the bytes.
pkg/gd/ioctx.go:48
↓ 5 callers
Method
String
String draws Latin-1 text with a built-in bitmap font.
pkg/gd/text.go:132
↓ 5 callers
Function
defaultHEIFOptions
defaultHEIFOptions fills in the structural defaults (libgd codec/chroma enums must be non-zero). Quality is left untouched: callers that pass HEIFOpti
pkg/gd/io.go:94
↓ 5 callers
Function
pixelRGBA
(t *testing.T, im *Image, x, y int)
pkg/gd/wrapper_coverage_test.go:11
↓ 4 callers
Method
Close
Close releases the libgd resources backing the context. For file-backed contexts the underlying FILE is also closed and any pending I/O error is repo
pkg/gd/ioctx.go:92
↓ 4 callers
Method
EncodePNGFile
(path string, opts *PNGOptions)
pkg/gd/io.go:278
↓ 4 callers
Function
defaultPNGOptions
(opts *PNGOptions)
pkg/gd/io.go:76
↓ 4 callers
Function
palettePixelRGBA
(t *testing.T, im *Image, x, y int)
pkg/gd/wrapper_coverage_test.go:20
↓ 3 callers
Function
NewDynamicReadContext
NewDynamicReadContext creates a gdIOCtx that reads from a copy of data.
pkg/gd/ioctx.go:33
↓ 3 callers
Method
SetClip
(rect Rect)
pkg/gd/draw.go:241
↓ 3 callers
Method
TransparentColor
TransparentColor returns the transparent palette index or -1 (also for a closed image).
pkg/gd/gd.go:191
↓ 3 callers
Function
TrueColorAlpha
TrueColorAlpha composes a truecolor value using libgd channel semantics.
pkg/gd/color.go:29
↓ 3 callers
Function
cPoints
(points []Point)
pkg/gd/draw.go:184
↓ 3 callers
Function
defaultAVIFOptions
(opts *AVIFOptions)
pkg/gd/io.go:108
↓ 3 callers
Function
defaultBMPOptions
(opts *BMPOptions)
pkg/gd/io.go:115
↓ 3 callers
Function
defaultWebPOptions
(opts *WebPOptions)
pkg/gd/io.go:83
↓ 3 callers
Function
openFile
openFile opens path through C fopen and returns the FILE pointer along with a closer that flushes the stream and reports any deferred I/O error. The c
pkg/gd/io.go:132
↓ 3 callers
Function
withIOContextFinalizer
(ctx *IOContext)
pkg/gd/ioctx.go:76
↓ 2 callers
Function
AffineScale
AffineScale returns an affine transform that scales by (scaleX, scaleY).
pkg/gd/transform.go:170
↓ 2 callers
Method
BoundsSafe
(x, y int)
pkg/gd/draw.go:77
↓ 2 callers
Method
ClearTile
ClearTile detaches any tile previously registered via SetTile.
pkg/gd/draw.go:354
↓ 2 callers
Method
ColorRGBA
(color Color)
pkg/gd/color.go:133
↓ 2 callers
Method
Crop
Crop returns a copy of the image cropped to rect.
pkg/gd/crop.go:29
↓ 2 callers
Function
DecodeJPEGFile
(path string, opts *JPEGOptions)
pkg/gd/io.go:301
↓ 2 callers
Function
DecodePNG
(data []byte)
pkg/gd/io.go:253
↓ 2 callers
Function
DecomposeTrueColor
DecomposeTrueColor decomposes a truecolor value.
pkg/gd/color.go:34
↓ 2 callers
Method
EncodeXBMContext
(ctx *IOContext, name string, foreground Color)
pkg/gd/ioctx.go:374
↓ 2 callers
Method
Equal
(other Affine)
pkg/gd/transform.go:255
↓ 2 callers
Method
Expansion
()
pkg/gd/transform.go:245
↓ 2 callers
Method
FilledEllipse
(cx, cy, width, height int, color Color)
pkg/gd/draw.go:157
↓ 2 callers
Method
Interlaced
Interlaced reports whether interlacing is enabled. Returns false for a closed image.
pkg/gd/gd.go:201
↓ 2 callers
Method
ReplaceColorArray
(src, dst []Color)
pkg/gd/color.go:259
↓ 2 callers
Method
Resolution
Resolution returns horizontal and vertical DPI, or (0, 0) for a closed image.
pkg/gd/gd.go:211
↓ 2 callers
Function
RuntimeFeatures
()
pkg/gd/features.go:72
↓ 2 callers
Method
SetStyle
(style []Color)
pkg/gd/draw.go:299
↓ 2 callers
Method
SetTile
SetTile registers tile as the source image for libgd's tile-fill operations. libgd does not copy tile internally, so the caller must keep it alive fo
pkg/gd/draw.go:339
↓ 2 callers
Method
ShearHorizontal
ShearHorizontal composes the receiver with a horizontal shear by angle (degrees). Returns ErrInvalidArgument if libgd rejects the shear angle (e.g. ±9
pkg/gd/transform.go:208
↓ 2 callers
Method
ShearVertical
ShearVertical composes the receiver with a vertical shear by angle (degrees). Returns ErrInvalidArgument if libgd rejects the shear angle (e.g. ±90°).
pkg/gd/transform.go:218
↓ 2 callers
Method
String16
String16 draws horizontal Unicode (UCS-2) text with a built-in bitmap font. An empty s is a no-op rather than an error, matching the behaviour of Stri
pkg/gd/text.go:184
↓ 2 callers
Method
StringUp16
StringUp16 draws vertical Unicode (UCS-2) text with a built-in bitmap font.
pkg/gd/text.go:202
↓ 2 callers
Method
TransformBoundingBox
TransformBoundingBox returns the bounding rect that contains src after applying the affine transform.
pkg/gd/transform.go:297
↓ 2 callers
Function
Version
()
pkg/gd/features.go:37
↓ 2 callers
Function
affineShearHorizontal
(angle float64)
pkg/gd/transform.go:320
↓ 2 callers
Function
affineShearVertical
(angle float64)
pkg/gd/transform.go:328
↓ 2 callers
Function
closeFile
(path string, file *C.FILE)
pkg/gd/io.go:140
↓ 2 callers
Function
defaultGD2Options
(opts *GD2Options)
pkg/gd/io.go:122
↓ 2 callers
Function
existingHeaders
(candidates []string)
pkg/gd/api_coverage_test.go:66
↓ 2 callers
Function
fopen
(path, mode string)
pkg/gd/io.go:156
↓ 2 callers
Function
latin1CString
(s string)
pkg/gd/text.go:169
↓ 2 callers
Function
withAppendFile
withAppendFile is the equivalent of withWriteFile but uses append mode.
pkg/gd/io.go:205
↓ 2 callers
Function
withImageFinalizer
(im *Image)
pkg/gd/gd.go:84
↓ 1 callers
Method
AABlend
()
pkg/gd/draw.go:85
↓ 1 callers
Method
AdjustColor
(r, g, b, a int)
pkg/gd/filter.go:162
↓ 1 callers
Function
AffineIdentity
AffineIdentity returns the identity affine transform.
pkg/gd/transform.go:163
↓ 1 callers
Function
AffineRotate
AffineRotate returns an affine transform that rotates by angle (degrees).
pkg/gd/transform.go:177
↓ 1 callers
Function
AffineTranslate
AffineTranslate returns an affine transform that translates by (offsetX, offsetY).
pkg/gd/transform.go:184
↓ 1 callers
Method
AllocateColorAlpha
(r, g, b, a int)
pkg/gd/color.go:56
↓ 1 callers
Function
AlphaBlend
(dest, src Color)
pkg/gd/misc.go:33
↓ 1 callers
Method
AlphaBlending
(blend bool)
pkg/gd/draw.go:272
↓ 1 callers
Method
AlphaBlendingEffect
(effect AlphaEffect)
pkg/gd/misc.go:53
↓ 1 callers
Method
ApplyToPoint
ApplyToPoint applies the affine transform to src.
pkg/gd/transform.go:191
↓ 1 callers
Method
Arc
(cx, cy, width, height, start, end int, color Color)
pkg/gd/draw.go:130
↓ 1 callers
Method
Bounds
Bounds returns a rectangle covering the full image. Returns the zero Rect when the image is closed.
pkg/gd/gd.go:166
↓ 1 callers
Method
Brightness
(value int)
pkg/gd/filter.go:140
next →
1–100 of 325, ranked by callers