remarkablepage

package
v0.0.0-...-48c4628 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: Unlicense Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VERSION   = "0.3"
	REV_DATE  = "2023-04-08"
	X_MAX     = 1404.0
	Y_MAX     = 1872.0
	HEADER_V5 = "reMarkable .lines file, version=5          "
)

Constants

Variables

This section is empty.

Functions

func BuildBooleanMatrix

func BuildBooleanMatrix(img *image.Gray) [][]bool

func CreateRmDoc

func CreateRmDoc(rmName string, rmData [][]byte) (*bytes.Buffer, string)

func DebugPrint

func DebugPrint(info string, opt ...error)

func DrawLines

func DrawLines(lines LineList, width, height float32) []byte

DrawLines detects white pixels in a grayscale image and adds them to a reMarkable page

func GetFileNameWithoutExtension

func GetFileNameWithoutExtension(filePath string) string

func LaplacianEdgeDetection

func LaplacianEdgeDetection(imagePath string) []byte

Types

type LineList

type LineList struct {
	Lines []float32
	Size  int
}

func HandleNewFile

func HandleNewFile(directory, filename string) LineList

type ReMarkableAPIrmdoc

type ReMarkableAPIrmdoc struct {
	Content          string   `json:"content"`
	NotebookMetadata string   `json:"notebookmetadata"`
	Metadata0rm      string   `json:"metadata0rm"`
	Rmdata           [][]byte `json:"-"`
	Time             int64    `json:"time"`
	// contains filtered or unexported fields
}

ReMarkableAPIrmdoc representa la estructura para empaquetar archivos .rm en un .rmdoc

func NewReMarkableAPIrmdoc

func NewReMarkableAPIrmdoc(zipfile string, rmdata [][]byte) *ReMarkableAPIrmdoc

NewReMarkableAPIrmdoc crea una nueva instancia de ReMarkableAPIrmdoc

type ReMarkablePage

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

ReMarkablePage represents a page for the reMarkable tablet

func NewReMarkablePage

func NewReMarkablePage() *ReMarkablePage

NewReMarkablePage creates a new reMarkable page

func (*ReMarkablePage) AddLine

func (page *ReMarkablePage) AddLine() *rmLine

AddLine adds a new line to the page

func (*ReMarkablePage) AddPixel

func (page *ReMarkablePage) AddPixel(x, y float32)

AddPixel adds a pixel to the page

func (*ReMarkablePage) DrawBezierCurve

func (page *ReMarkablePage) DrawBezierCurve(p0, p1, p2, p3 rmPoint)

DrawBezierCurve draws a Bezier curve on the page

func (*ReMarkablePage) DrawFilledRectangle

func (page *ReMarkablePage) DrawFilledRectangle(x1, y1, x2, y2 float32)

DrawFilledRectangle draws a filled rectangle on the page

func (*ReMarkablePage) Export

func (page *ReMarkablePage) Export() []byte

Export writes the content of the page to the output file

Jump to

Keyboard shortcuts

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