Documentation
¶
Index ¶
- type Picture
- func (pic *Picture) At(x, y int) color.RGBA
- func (pic *Picture) ContainsSubPicture(other *Picture) (int, int)
- func (pic *Picture) CreateImageRGBAFromPicture() *image.RGBA
- func (pic *Picture) Equals(other *Picture) bool
- func (pic *Picture) NewImageRGBAFromPicture() *image.RGBA
- func (pic *Picture) SubPicture(rect image.Rectangle) *Picture
- func (pic *Picture) SubPictureRelative(rect image.Rectangle) *Picture
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Picture ¶
type Picture struct {
Orig *Picture
Rect image.Rectangle
Pix []byte
Stride int
// contains filtered or unexported fields
}
Picture is an alternative to the official *image.RGBA.
func CreatePictureFromRGBA ¶
CreatePictureFromRGBA creates a new picture from the given RGBA image with copying the data.
func NewPictureFromRGBA ¶
NewPictureFromRGBA creates a new picture from the given RGBA image without copying the data.
func (*Picture) ContainsSubPicture ¶
ContainsSubPicture returns the coordinates of the upper-left-most entry of the specified subpicture in the given picture, or (-1; -1) if the given picture doesn't contain the subpicture.
func (*Picture) CreateImageRGBAFromPicture ¶
CreateImageRGBAFromPicture creates a new instance of *image.RGBA and copies the data of the original picture to the new image.
func (*Picture) Equals ¶
Equals returns 'true' if the picture equals another one, and 'false' otherwise.
func (*Picture) NewImageRGBAFromPicture ¶
NewImageRGBAFromPicture creates a new instance of *image.RGBA without copying the data of the original picture.
func (*Picture) SubPicture ¶
SubPicture returns a new picture based on the given picture.
Copies the data of the original picture to the derivative one.
The new picture will not have any connection to the base one.