LazyBrush

package
v0.0.0-...-4336dc7 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LazyBrush

type LazyBrush struct {
	Radius float64

	Pointer LP.LazyPoint
	Brush   LP.LazyPoint

	Angle    float64
	Distance float64
	// contains filtered or unexported fields
}

*

  • constructor *
  • @param {object} settings
  • @param {number} settings.radius The radius for the lazy area
  • @param {boolean} settings.enabled

func Init

func Init() LazyBrush

func (*LazyBrush) BrushHasMoved

func (l *LazyBrush) BrushHasMoved() bool

*

  • Return if the previous update has moved the brush. *
  • @returns {boolean} Whether the brush moved previously.

func (*LazyBrush) Disable

func (l *LazyBrush) Disable()

*

  • Disable lazy brush calculations. *

func (*LazyBrush) Enable

func (l *LazyBrush) Enable()

*

  • Enable lazy brush calculations. *

func (*LazyBrush) GetAngle

func (l *LazyBrush) GetAngle() float64

*

  • Return the angle between pointer and brush *
  • @returns {number} Angle in radians

func (*LazyBrush) GetBrush

func (l *LazyBrush) GetBrush() LP.LazyPoint

*

  • Return the brush as a LazyPoint *
  • @returns {LazyPoint}

func (*LazyBrush) GetBrushCoordinates

func (l *LazyBrush) GetBrushCoordinates() map[string]int

*

  • Return the brush coordinates as a simple object *
  • @returns {object}

func (*LazyBrush) GetDistance

func (l *LazyBrush) GetDistance() float64

*

  • Return the distance between pointer and brush *
  • @returns {number} Distance in pixels

func (*LazyBrush) GetPointer

func (l *LazyBrush) GetPointer() LP.LazyPoint

*

  • Return the pointer as a LazyPoint *
  • @returns {LazyPoint}

func (*LazyBrush) GetPointerCoordinates

func (l *LazyBrush) GetPointerCoordinates() map[string]int

*

  • Return the pointer coordinates as a simple object *
  • @returns {object}

func (*LazyBrush) GetRadius

func (l *LazyBrush) GetRadius() float64

*

  • Return the current radius *
  • @returns {number}

func (*LazyBrush) IsEnabled

func (l *LazyBrush) IsEnabled() bool

*

  • @returns {boolean}

func (*LazyBrush) SetRadius

func (l *LazyBrush) SetRadius(r float64)

*

  • Update the radius *
  • @param {number} radius

func (*LazyBrush) Update

func (l *LazyBrush) Update(newPointerPoint P.Point, both bool) bool

*

  • Updates the pointer point and calculates the new brush point. *
  • @param {Point} newPointerPoint
  • @param {Object} options
  • @param {Boolean} options.both Force update pointer and brush
  • @returns {Boolean} Whether any of the two points changed

Jump to

Keyboard shortcuts

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