iotmaker_platform_IDraw

package
v0.0.0-...-a8ee3e7 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

README

iotmaker.platform.IDraw

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ICanvasGradient

type ICanvasGradient interface {

	// AddColorStopPosition
	// en: Specifies the colors and stop positions in a gradient object
	//     gradient: A gradient object created by CreateLinearGradient() or
	//    CreateRadialGradient() methods
	//     stopPosition: A value between 0.0 and 1.0 that represents the position
	//     between start (0%) and end (100%) in a gradient
	//     color: A color RGBA value to display at the stop position
	//
	//     Note: You can call the addColorStopPosition() method multiple times to
	//     change a gradient. If you omit this method for gradient objects, the
	//     gradient will not be visible. You need to create at least one color stop to
	//     have a visible gradient.
	//
	// pt_br: Especifica a cor e a posição final para a cor dentro do gradiente
	//     gradient: Objeto de gradiente criado pelos métodos CreateLinearGradient() ou
	//     CreateRadialGradient()
	//     stopPosition: Um valor entre 0.0 e 1.0 que representa a posição entre o
	//     início (0%) e o fim (100%) dentro do gradiente
	//     color: Uma cor no formato RGBA para ser mostrada na posição determinada
	//
	//     Nota: Você pode chamar o método AddColorStopPosition() várias vezes para
	//     adicionar várias cores ao gradiente, porém, se você omitir o método, o
	//     gradiente não será visivel. Você tem a obrigação de chamar o método pelo
	//     menos uma vez com uma cor para que o gradiente seja visível.
	AddColorStopPosition(gradient interface{}, stop float64, color color.RGBA)

	// CreateLinearGradient
	// en: This method of the Canvas 2D API creates a gradient along the line
	// connecting two given coordinates, starting at (x0, y0) point and ending at
	// (x1, y1) point
	//     x0: The x-coordinate of the start point of the gradient
	//     y0: The y-coordinate of the start point of the gradient
	//     x1: The x-coordinate of the end point of the gradient
	//     y1: The y-coordinate of the end point of the gradient
	//
	//     The createLinearGradient() method creates a linear gradient object for be
	//     used with methods AddColorStopPosition(), SetFillStyle() and
	//     SetStrokeStyle().
	//     The gradient can be used to fill rectangles, circles, lines, text, etc.
	//     Tip: Use this object as the value to the strokeStyle() or fillStyle()
	//     methods
	//     Tip: Use the addColorStopPosition() method to specify different colors, and
	//     where to position the colors in the gradient object.
	//
	// pt_br: Este método do canvas 2D cria um gradiente ao longo de uma linha
	// conectando dois pontos, iniciando no ponto (x0, y0) e terminando no ponto
	// (x1, y1)
	//     x0: Coordenada x do ponto inicial do gradiente
	//     y0: Coordenada y do ponto inicial do gradiente
	//     x1: Coordenada x do ponto final do gradiente
	//     y1: Coordenada y do ponto final do gradiente
	//
	//     O método CreateLinearGradient() cria um objeto de gradiente linear para ser
	//     usado em conjunto com os métodos AddColorStopPosition(), SetFillStyle() e
	//     SetStrokeStyle().
	//     O gradiente pode ser usado para preencher retângulos, circulos, linhas,
	//     textos, etc.
	//     Dica: Use este objeto como valor passados aos métodos strokeStyle() ou
	//     fillStyle()
	//     Dica: Use o método addColorStopPosition() para especificar diferentes cores
	//     para o gradiente e a posição de cada cor
	CreateLinearGradient(x0, y0, x1, y1 interface{}) interface{}

	// CreateRadialGradient
	// en: Creates a radial gradient (to use on canvas content). The parameters
	// represent two circles, one with its center at (x0, y0) and a radius of r0, and
	// the other with its center at (x1, y1) with a radius of r1.
	//     x0: The x-coordinate of the starting circle of the gradient
	//     y0: The y-coordinate of the starting circle of the gradient
	//     r0: The radius of the starting circle. Must be non-negative and finite.
	//         (note: radius is a width, not a degrees angle)
	//     x1: The x-coordinate of the ending circle of the gradient
	//     y1: The y-coordinate of the ending circle of the gradient
	//     r1: The radius of the ending circle. Must be non-negative and finite.
	//         (note: radius is a width, not a degrees angle)
	//
	// pt_br: Este método cria um gradiente radial (para ser usado com o canvas 2D). Os
	// parâmetros representam dois círculos, um com o centro no ponto (x0, y0) e raio
	// r0, e outro com centro no ponto (x1, y1) com raio r1
	//     x0: Coordenada x do circulo inicial do gradiente
	//     y0: Coordenada y do circulo inicial do gradiente
	//     r0: Raio do círculo inicial. Deve ser um valor positivo e finito.
	//     (nota: o raio é um comprimento e não um ângulo)
	//     x1: Coordenada x do circulo final do gradiente
	//     y1: Coordenada y do circulo final do gradiente
	//     r1: Raio do círculo final. Deve ser um valor positivo e finito.
	//     (nota: o raio é um comprimento e não um ângulo)
	CreateRadialGradient(x0, y0, r0, x1, y1, r1 interface{}) interface{}

	// SetFillStyle
	// en: Sets the color, gradient, or pattern used to fill the drawing
	//     value: a valid JavaScript value or a color.RGBA{} struct
	//     Default value:	#000000
	//
	// pt_br: Define a cor, gradiente ou padrão usado para preencher o desenho
	//     value: um valor JavaScript valido ou um struct color.RGBA{}
	//     Valor padrão: #000000
	SetFillStyle(value interface{})

	// SetStrokeStyle
	// en: Sets the color, gradient, or pattern used for strokes
	//     value: a valid JavaScript value or a color.RGBA{} struct
	//     Default value: #000000
	//
	// pt_br: Define a cor, gradiente ou padrão usado para o contorno
	//     value: um valor JavaScript valido ou um struct color.RGBA{}
	//     Valor padrão: #000000
	SetStrokeStyle(value interface{})

	// Fill
	// en: The fill() method fills the current drawing (path). The default color is
	// black.
	//     Tip: Use the fillStyle property to fill with another color/gradient.
	//     Note: If the path is not closed, the fill() method will add a line from the
	//     last point to the start point of the
	//     path to close the path (like closePath()), and then fill the path.
	// pt_br: O método fill() preenche e pinta do desenho (caminho). A cor padrão é
	// preto.
	//     Dica: Use a propriedade fillStyle para adicionar uma cor ou gradient.
	//     Nota: Se o caminho não estiver fechado, o método fill() irá adicioná uma
	//     linha do último ao primeiro ponto do
	//     caminho para fechar o caminho (semelhante ao método closePath()) e só então
	//     irá pintar
	Fill()

	// Stroke
	// en: The stroke() method actually draws the path you have defined with all those
	// moveTo() and lineTo() methods. The default color is black.
	//     Tip: Use the strokeStyle property to draw with another color/gradient.
	//
	// pt_br: O método stroke() desenha o caminho definido com os métodos moveTo() e
	// lineTo() usando a cor padrão, preta.
	//     Dica: Use a propriedade strokeStyle para desenhar com outra cor ou usar um
	//     gradiente
	Stroke()
}

type ICanvasShadow

type ICanvasShadow interface {

	// SetShadowBlur
	// en: Sets the blur level for shadows
	//     Default value: 0
	//
	// pt_br: Define o valor de borrão da sombra
	//     Valor padrão: 0
	SetShadowBlur(value interface{})

	// SetShadowColor
	// en: Sets the color to use for shadows
	//     Note: Use the shadowColor property together with the shadowBlur property to
	//     create a shadow.
	//     Tip: Adjust the shadow by using the shadowOffsetX and shadowOffsetY
	//     properties.
	//     Default value: #000000
	//
	// pt_br: Define a cor da sombra
	//     Nota: Use a propriedade shadowColor em conjunto com a propriedade shadowBlur
	//     para criar a sombra
	//     Dica: Ajuste o local da sombra usando as propriedades shadowOffsetX e
	//     shadowOffsetY
	//     Valor padrão: #000000
	SetShadowColor(value color.RGBA)

	// ShadowOffsetX
	// en: Sets the horizontal distance of the shadow from the shape
	//     shadowOffsetX = 0 indicates that the shadow is right behind the shape.
	//     shadowOffsetX = 20 indicates that the shadow starts 20 pixels to the right
	//     (from the shape's left position).
	//     shadowOffsetX = -20 indicates that the shadow starts 20 pixels to the left
	//     (from the shape's left position).
	//     Tip: To adjust the vertical distance of the shadow from the shape, use the
	//     shadowOffsetY property.
	//     Default value: 0
	//
	// pt_br: Define a distância horizontal entre a forma e a sua sombra
	//     shadowOffsetX = 0 indica que a forma e sua sombra estão alinhadas uma em
	//     cima da outra.
	//     shadowOffsetX = 20 indica que a forma e a sua sombra estão 20 pixels
	//     afastadas a direita (em relação a parte mais a esquerda da forma)
	//     shadowOffsetX = -20 indica que a forma e a sua sombra estão 20 pixels
	//     afastadas a esquerda (em relação a parte mais a esquerda da forma)
	//     Dica: Para ajustar a distância vertical, use a propriedade shadowOffsetY
	//     Valor padrão: 0
	ShadowOffsetX(value int)

	// ShadowOffsetY
	// en: Sets or returns the vertical distance of the shadow from the shape
	//     The shadowOffsetY property sets or returns the vertical distance of the
	//     shadow from the shape.
	//     shadowOffsetY = 0 indicates that the shadow is right behind the shape.
	//     shadowOffsetY = 20 indicates that the shadow starts 20 pixels below the
	//     shape's top position.
	//     shadowOffsetY = -20 indicates that the shadow starts 20 pixels above the
	//     shape's top position.
	//     Tip: To adjust the horizontal distance of the shadow from the shape, use the
	//     shadowOffsetX property.
	//     Default value: 0
	//
	// pt_br: Define a distância vertical entre a forma e a sua sombra
	//     shadowOffsetY = 0 indica que a forma e sua sombra estão alinhadas uma em
	//     cima da outra.
	//     shadowOffsetY = 20 indica que a forma e a sua sombra estão 20 pixels
	//     afastadas para baixo (em relação a parte mais elevada da forma)
	//     shadowOffsetY = -20 indica que a forma e a sua sombra estão 20 pixels
	//     afastadas para cima (em relação a parte mais elevada da forma)
	//     Dica: Para ajustar a distância horizontal, use a propriedade shadowOffsetX
	//     Valor padrão: 0
	ShadowOffsetY(value int)
}

type IFilterGradientInterface

type IFilterGradientInterface interface {
	SetP0(point interface{})
	SetP1(point interface{})
	PrepareFilter(platform ICanvasGradient)

	// Fill
	// en: The fill() method fills the current drawing (path). The default color is
	//     black.
	//     Tip: Use the fillStyle property to fill with another color/gradient.
	//     Note: If the path is not closed, the fill() method will add a line from the
	//     last point to the start point of the path to close the path (like
	//     closePath()), and then fill the path.
	//
	// pt_br: O método fill() preenche e pinta do desenho (caminho). A cor padrão é
	//     preto.
	//     Dica: Use a propriedade fillStyle para adicionar uma cor ou gradient.
	//     Nota: Se o caminho não estiver fechado, o método fill() irá adicioná uma
	//     linha do último ao primeiro ponto do caminho para fechar o caminho
	//     (semelhante ao método closePath()) e só então irá pintar
	Fill(gradient interface{})

	// Stroke
	// en: The stroke() method actually draws the path you have defined with all those
	//     moveTo() and lineTo() methods. The default color is black.
	//     Tip: Use the strokeStyle property to draw with another color/gradient.
	//
	// pt_br: O método stroke() desenha o caminho definido com os métodos moveTo() e
	//     lineTo() usando a cor padrão, preta.
	//     Dica: Use a propriedade strokeStyle para desenhar com outra cor ou usar um
	//     gradiente
	Stroke(gradient interface{})
}

type IFilterShadowInterface

type IFilterShadowInterface interface {
	PrepareFilter(platform ICanvasShadow)
}

type IHtml

type IHtml interface {
	NewImage(parent interface{}, propertiesList map[string]interface{}, waitLoad bool) html.Image
	Append(document, element interface{})
	Remove(document, element interface{})
	GetDocumentWidth(document interface{}) int
	GetDocumentHeight(document interface{}) int
}

Jump to

Keyboard shortcuts

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