2019-01-28 23:09:52 +00:00
|
|
|
package widgets
|
|
|
|
|
|
|
|
import (
|
|
|
|
"image"
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
xBrailleMultiplier = 2
|
|
|
|
yBrailleMultiplier = 4
|
|
|
|
)
|
|
|
|
|
2019-01-31 00:02:38 +00:00
|
|
|
func braillePoint(point image.Point) image.Point {
|
2019-01-28 23:09:52 +00:00
|
|
|
return image.Point{X: point.X * xBrailleMultiplier, Y: point.Y * yBrailleMultiplier}
|
|
|
|
}
|
|
|
|
|
2019-01-31 00:02:38 +00:00
|
|
|
func debraillePoint(point image.Point) image.Point {
|
2019-01-28 23:09:52 +00:00
|
|
|
return image.Point{X: point.X / xBrailleMultiplier, Y: point.Y / yBrailleMultiplier}
|
|
|
|
}
|