skia

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2019 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

* Copyright 2015 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlphaType

type AlphaType uint32
const (
	OPAQUE_ALPHATYPE   AlphaType = 0x0
	PREMUL_ALPHATYPE   AlphaType = 0x1
	UNPREMUL_ALPHATYPE AlphaType = 0x2
)

type Canvas

type Canvas struct {
	// contains filtered or unexported fields
}

//////////////////////////////////////////////////////////////////////// Canvas ////////////////////////////////////////////////////////////////////////

func (*Canvas) DrawOval

func (c *Canvas) DrawOval(rect *Rect, paint *Paint)

func (*Canvas) DrawPaint

func (c *Canvas) DrawPaint(paint *Paint)

func (*Canvas) DrawPath

func (c *Canvas) DrawPath(path *Path, paint *Paint)

func (*Canvas) DrawRect

func (c *Canvas) DrawRect(rect *Rect, paint *Paint)

type Color

type Color uint32

type ColorType

type ColorType uint32
const (
	UNKNOWN_COLORTYPE   ColorType = 0x0
	RGBA_8888_COLORTYPE ColorType = 0x1
	BGRA_8888_COLORTYPE ColorType = 0x2
	ALPHA_8_COLORTYPE   ColorType = 0x3
)

func GetDefaultColortype

func GetDefaultColortype() ColorType

Utility functions.

type Image

type Image struct {
	// contains filtered or unexported fields
}

//////////////////////////////////////////////////////////////////////// Image ////////////////////////////////////////////////////////////////////////

func (*Image) WritePNG

func (i *Image) WritePNG(w io.Writer) error

type ImageInfo

type ImageInfo struct {
	Width     int32
	Height    int32
	ColorType ColorType
	AlphaType AlphaType
}

type Paint

type Paint struct {
	// contains filtered or unexported fields
}

//////////////////////////////////////////////////////////////////////// Paint ////////////////////////////////////////////////////////////////////////

func NewPaint

func NewPaint() *Paint

func (*Paint) SetAntiAlias

func (p *Paint) SetAntiAlias(antiAlias bool)

func (*Paint) SetColor

func (p *Paint) SetColor(color Color)

func (*Paint) SetStroke

func (p *Paint) SetStroke(val bool)

func (*Paint) SetStrokeWidth

func (p *Paint) SetStrokeWidth(width float32)

type Path

type Path struct {
	// contains filtered or unexported fields
}

//////////////////////////////////////////////////////////////////////// Path ////////////////////////////////////////////////////////////////////////

func NewPath

func NewPath() *Path

func (*Path) Close

func (p *Path) Close()

func (*Path) ConicTo

func (p *Path) ConicTo(x0, y0, x1, y1, w float32)

func (*Path) CubicTo

func (p *Path) CubicTo(x0, y0, x1, y1, x2, y2 float32)

func (*Path) LineTo

func (p *Path) LineTo(x, y float32)

func (*Path) MoveTo

func (p *Path) MoveTo(x, y float32)

func (*Path) QuadTo

func (p *Path) QuadTo(x0, y0, x1, y1 float32)

type PixelGeometry

type PixelGeometry uint32
const (
	UNKNOWN_SK_PIXELGEOMETRY PixelGeometry = 0x0
	RGB_H_SK_PIXELGEOMETRY   PixelGeometry = 0x1
	BGR_H_SK_PIXELGEOMETRY   PixelGeometry = 0x2
	RGB_V_SK_PIXELGEOMETRY   PixelGeometry = 0x3
	BGR_V_SK_PIXELGEOMETRY   PixelGeometry = 0x4
)

type Rect

type Rect struct {
	Left   float32
	Top    float32
	Right  float32
	Bottom float32
}

func NewRect

func NewRect(left, top, right, bottom float32) *Rect

NewRect is a convenience function to define a Rect in a single line.

type Surface

type Surface struct {
	// contains filtered or unexported fields
}

//////////////////////////////////////////////////////////////////////// Surface ////////////////////////////////////////////////////////////////////////

func NewRasterSurface

func NewRasterSurface(imgInfo *ImageInfo) (*Surface, error)

func NewRasterSurface(width, height int32, alphaType AlphaType) (*Surface, error) {

func (*Surface) Canvas

func (s *Surface) Canvas() *Canvas

func (*Surface) Image

func (s *Surface) Image() *Image

type SurfaceProps

type SurfaceProps struct {
	PixelGeometry PixelGeometry
}

Jump to

Keyboard shortcuts

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