Documentation ¶
Index ¶
Constants ¶
const ( HeaderV3 = "reMarkable .lines file, version=3 " HeaderV5 = "reMarkable .lines file, version=5 " HeaderLen = 43 )
Header starting a .rm binary file. This can help recognizing a .rm file.
const ( Width int = 1404 Height int = 1872 )
Width and Height of the device in pixels.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BrushColor ¶
type BrushColor uint32
BrushColor defines the 3 colors of the brush.
const ( Black BrushColor = 0 Grey BrushColor = 1 White BrushColor = 2 )
Mapping of the three colors.
type BrushType ¶
type BrushType uint32
BrushType respresents the type of brush.
The different types of brush are explained here: https://blog.remarkable.com/how-to-find-your-perfect-writing-instrument-for-notetaking-on-remarkable-f53c8faeab77
const ( BallPoint BrushType = 2 Marker BrushType = 3 Fineliner BrushType = 4 SharpPencil BrushType = 7 TiltPencil BrushType = 1 Brush BrushType = 0 Highlighter BrushType = 5 Eraser BrushType = 6 EraseArea BrushType = 8 // v5 brings new brush type IDs BallPointV5 BrushType = 15 MarkerV5 BrushType = 16 FinelinerV5 BrushType = 17 SharpPencilV5 BrushType = 13 TiltPencilV5 BrushType = 14 BrushV5 BrushType = 12 HighlighterV5 BrushType = 18 )
Mappings for brush types.
type Line ¶
type Line struct { BrushType BrushType BrushColor BrushColor Padding uint32 Unknown float32 BrushSize BrushSize Points []Point }
A Line is composed of points.
type Point ¶
type Point struct { X float32 Y float32 Speed float32 Direction float32 Width float32 Pressure float32 }
A Point has coordinates.
type Rm ¶
A Rm represents an entire .rm file and is composed of layers.
func New ¶
func New() *Rm
New helps creating an empty Rm page. By mashaling an empty Rm page and exporting it to the device, we should generate an empty page as if it were created using the device itself. TODO
func (Rm) String ¶
String implements the fmt.Stringer interface The aim is to create a textual representation of a page as in the following image. https://plasma.ninja/blog/assets/reMarkable/2017_12_21_reMarkableAll.png TODO
func (*Rm) UnmarshalBinary ¶
UnmarshalBinary implements encoding.UnmarshalBinary for transforming bytes into a Rm page