dpi

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: Apache-2.0 Imports: 1 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogicalPosition

type LogicalPosition[T constraints.Integer | constraints.Float] struct {
	X, Y T
}

func (LogicalPosition[T]) ToLogical

func (s LogicalPosition[T]) ToLogical(scaleFactor float64) LogicalPosition[T]

func (LogicalPosition[T]) ToPhysical

func (s LogicalPosition[T]) ToPhysical(scaleFactor float64) PhysicalPosition[T]

type LogicalSize

type LogicalSize[T constraints.Integer | constraints.Float] struct {
	Width, Height T
}

func (LogicalSize[T]) ToLogical

func (s LogicalSize[T]) ToLogical(scaleFactor float64) LogicalSize[T]

func (LogicalSize[T]) ToPhysical

func (s LogicalSize[T]) ToPhysical(scaleFactor float64) PhysicalSize[T]

type PhysicalPosition

type PhysicalPosition[T constraints.Integer | constraints.Float] struct {
	X, Y T
}

type PhysicalSize

type PhysicalSize[T constraints.Integer | constraints.Float] struct {
	Width, Height T
}

func (PhysicalSize[T]) ToLogical

func (s PhysicalSize[T]) ToLogical(scaleFactor float64) LogicalSize[T]

func (PhysicalSize[T]) ToPhysical

func (s PhysicalSize[T]) ToPhysical(scaleFactor float64) PhysicalSize[T]

type Position

type Position[T constraints.Integer | constraints.Float] interface {
	// contains filtered or unexported methods
}

type Size

type Size[T constraints.Integer | constraints.Float] interface {
	ToLogical(scaleFactor float64) LogicalSize[T]
	ToPhysical(scaleFactor float64) PhysicalSize[T]
	// contains filtered or unexported methods
}

func CastSize

func CastSize[I, O constraints.Integer | constraints.Float](size Size[I]) Size[O]

Jump to

Keyboard shortcuts

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