Documentation
¶
Index ¶
- func Add(a, b color.Color) color.Color
- func Draw(dst image.Image, r image.Rectangle, src image.Image, sp image.Point, op Op)
- func DrawMask(dst image.Image, r image.Rectangle, src image.Image, sp image.Point, ...)
- func LinearGradient(start, end color.Color, width, height int, mode int) *image.RGBA
- func LinearGradientHollowMask(start, end, hollow color.Color, width, height, mode, border int, ...) *image.RGBA
- func Mul(src color.Color, num float64) color.Color
- func Resize(newSize image.Point, src image.Image) image.Image
- func RevertX(src image.Image) image.Image
- type CircleMask
- type Op
- type RoundedRectMask
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Draw ¶
Draw calls DrawMask with a nil mask.
func DrawMask ¶
func LinearGradient ¶
LinearGradient 线性渐变 mode 为方向, 0 - x轴, 1 - y轴, 2 - 左上到右下, 3 - 右上到左下 | 其他值无效
Types ¶
type CircleMask ¶
type CircleMask struct {
Radius int
}
CircleMask 圆形遮罩
func (CircleMask) At ¶
func (c CircleMask) At(x, y int) color.Color
func (CircleMask) Bounds ¶
func (c CircleMask) Bounds() image.Rectangle
func (CircleMask) ColorModel ¶
func (c CircleMask) ColorModel() color.Model
type RoundedRectMask ¶
RoundedRectMask 圆角矩形遮罩
func (RoundedRectMask) At ¶
func (r RoundedRectMask) At(x, y int) color.Color
func (RoundedRectMask) Bounds ¶
func (r RoundedRectMask) Bounds() image.Rectangle
func (RoundedRectMask) ColorModel ¶
func (r RoundedRectMask) ColorModel() color.Model
Source Files
¶
- draw.go
- gradient.go
- mask.go
- revert.go
- scale.go
Click to show internal directories.
Click to hide internal directories.