Documentation ¶
Index ¶
- Constants
- type ColorM
- func (c *ColorM) Add(other ColorM)
- func (c *ColorM) ChangeHSV(hueTheta float64, saturationScale float64, valueScale float64)
- func (c *ColorM) Concat(other *ColorM)
- func (c *ColorM) Equals(other *ColorM) bool
- func (c *ColorM) Reset()
- func (c *ColorM) RotateHue(theta float64)
- func (c *ColorM) Scale(r, g, b, a float64)
- func (c *ColorM) SetElement(i, j int, element float64)
- func (c *ColorM) Translate(r, g, b, a float64)
- func (c *ColorM) UnsafeElements() []float64
- type GeoM
- func (g *GeoM) Add(other GeoM)
- func (g *GeoM) Concat(other *GeoM)
- func (g *GeoM) Elements() (a, b, c, d, tx, ty float64)
- func (g *GeoM) Reset()
- func (g *GeoM) Rotate(theta float64)
- func (g *GeoM) Scale(x, y float64)
- func (g *GeoM) SetElement(i, j int, element float64)
- func (g *GeoM) Translate(tx, ty float64)
Constants ¶
const ColorMDim = 5
ColorMDim is a dimension of a ColorM.
const GeoMDim = 3
GeoMDim is a dimension of a GeoM.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColorM ¶
type ColorM struct {
// contains filtered or unexported fields
}
A ColorM represents a matrix to transform coloring when rendering an image.
A ColorM is applied to the source alpha color while an Image's pixels' format is alpha premultiplied. Before applying a matrix, a color is un-multiplied, and after applying the matrix, the color is multiplied again.
The initial value is identity.
func Monochrome ¶
func Monochrome() ColorM
Monochrome returns a color matrix to make an image monochrome.
func ScaleColor ¶
ScaleColor is deprecated as of 1.2.0-alpha. Use Scale instead.
func TranslateColor ¶
TranslateColor is deprecated as of 1.2.0-alpha. Use Translate instead.
func (*ColorM) ChangeHSV ¶
ChangeHSV changes HSV (Hue-Saturation-Value) elements. hueTheta is a radian value to ratate hue. saturationScale is a value to scale saturation. valueScale is a value to scale value (a.k.a. brightness).
This conversion uses RGB to/from YCrCb conversion.
func (*ColorM) Concat ¶
Concat multiplies a color matrix with the other color matrix. This is same as muptiplying the matrix other and the matrix c in this order.
func (*ColorM) SetElement ¶
SetElement sets an element at (i, j).
func (*ColorM) UnsafeElements ¶
type GeoM ¶
type GeoM struct {
// contains filtered or unexported fields
}
A GeoM represents a matrix to transform geometry when rendering an image.
The initial value is identity.
func TranslateGeo ¶
TranslateGeo is deprecated as of 1.2.0-alpha. Use Translate instead.
func (*GeoM) Concat ¶
Concat multiplies a geometry matrix with the other geometry matrix. This is same as muptiplying the matrix other and the matrix g in this order.
func (*GeoM) SetElement ¶
SetElement sets an element at (i, j).