CG

package
v0.0.0-...-5fbe47b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2016 License: MIT, MIT Imports: 5 Imported by: 0

Documentation

Rendered for darwin/amd64

Index

Constants

This section is empty.

Variables

View Source
var AffineTransformIdentity = AffineTransform{
	1, 0, 0, 1, 0, 0,
}

AffineTransformIdentity represents the identity matrix.

https://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CGAffineTransform/index.html#//apple_ref/doc/constant_group/CGAffineTransformIdentity

Functions

This section is empty.

Types

type AffineTransform

type AffineTransform struct {
	A  Float
	B  Float
	C  Float
	D  Float
	Tx Float
	Ty Float
}

The CGAffineTransform struct is a Go equivalent to the type of the same name provided by Core Graphics.

https://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CGAffineTransform/index.html#//apple_ref/doc/c_ref/CGAffineTransform

type Float

type Float float64

Float is a floating point type used to represent numberic values in Core Graphics.

https://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CGGeometry/#//apple_ref/c/tdef/CGFloat

type ImageRef

type ImageRef CF.TypeRef

The ImageRef type is a reference to a Core Graphics image object.

https://developer.apple.com/library/ios/documentation/GraphicsImaging/Reference/CGImage/#//apple_ref/c/tdef/CGImageRef

func ImageCreate

func ImageCreate(img image.Image) ImageRef

ImageCreate creates a new Core Graphics image object that represents the same content than the Go image passed as argument.

The image content is copied by the funciton, it's the program's responsibility to free the resources allocated by the returned ImageRef with a call to CFRelease.

The function supports any image types defined in the standard image package, but will panic if the program attempts to create a ImageRef from an unsupported value.

https://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CGImage/

func ImageCreateNoCopy

func ImageCreateNoCopy(img image.Image) ImageRef

ImageCreateNoCopy creates a new Core Graphics image object that represents the same content than the Go image passed as argument.

The image content is shared between the Go and Core Graphics images, so the program must ensure that the image.Image value it passed to the function is referenced and unmodified for as long as the returned ImageRef is in use. It's the program's responsibility to free the resources allocated by the returned ImageRef with a call to CFRelease.

The function supports any image types defined in the standard image package, but will panic if the program attempts to create a ImageRef from an unsupported value.

https://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CGImage/

func (ImageRef) Release

func (img ImageRef) Release()

Release decreases the reference counter of the Core Graphics image passed as argument.

https://developer.apple.com/library/mac/documentation/CoreFoundation/Reference/CFTypeRef/#//apple_ref/c/func/CFRelease

func (ImageRef) Retain

func (img ImageRef) Retain()

Retain increases the refence counter of the Core Graphics image passed as argument.

https://developer.apple.com/library/mac/documentation/CoreFoundation/Reference/CFTypeRef/#//apple_ref/c/func/CFRetain

func (ImageRef) String

func (img ImageRef) String() string

String satisfies the fmt.Stringer interface.

type Point

type Point struct {
	X Float
	Y Float
}

Point is a Go equivalent to the type of the same name provided by Core Graphics.

https://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CGGeometry/#//apple_ref/c/tdef/CGPoint

type Rect

type Rect struct {
	Origin Point
	Size   Size
}

Rect is a Go equivalent to the type of the same name provided by Core Graphics.

https://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CGGeometry/#//apple_ref/c/tdef/CGRect

type Size

type Size struct {
	Width  Float
	Height Float
}

Size is a Go equivalent to the type of the same name provided by Core Graphics.

https://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CGGeometry/#//apple_ref/c/tdef/CGSize

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL