Documentation ¶
Index ¶
Constants ¶
View Source
const ( // MaxWidth is the display width of the reMArkable tablet. MaxWidth = 1404 // MaxHeight is the display height of the reMArkable tablet. MaxHeight = 1872 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BrushColor ¶
type BrushColor uint32
BrushColor defines the color of the brush (black, gray, white).
const ( Black BrushColor = 0 Gray BrushColor = 1 White BrushColor = 2 )
type BrushType ¶
type BrushType uint32
BrushType is one of the predefined brush types. The brush types are different between V3 and V5 of the rm format.
const ( PaintBrush BrushType = 0 Pencil BrushType = 1 Ballpoint BrushType = 2 Marker BrushType = 3 Fineliner BrushType = 4 Highlighter BrushType = 5 Eraser BrushType = 6 MechanicalPencil BrushType = 7 EraseArea BrushType = 8 PaintBrushV5 BrushType = 12 MechanicalPencilV5 BrushType = 13 PencilV5 BrushType = 14 BallpointV5 BrushType = 15 MarkerV5 BrushType = 16 FinelinerV5 BrushType = 17 HighlighterV5 BrushType = 18 CalligraphyV5 BrushType = 21 )
type Dot ¶
type Dot struct { // X is the x-coordinate for this dot. X float32 // Y is the -ycoordinate for this dot. Y float32 // Speed is the speed with which the stylus moved across the screen. Speed float32 // Tilt is the angle at which the stylus is positioned against // the screen. The angle is given in radians. Tilt float32 // Width is the effective width of the brush. Width float32 // Pressure is the amount of pressure applied to the stylus. // Value range is 0.0 trough 1.0 Pressure float32 }
Dot is a single point from a stroke.
type Drawing ¶
Drawing represents a single page with drawings.
func ReadDrawing ¶
ReadDrawing creates a new reMarkable drawing from the given reader.
func (*Drawing) MarshalBinary ¶
MarshalBinary returns the byte representation of the drawing.
func (*Drawing) UnmarshalBinary ¶
UnmarshalBinary reads a reMarkable drawing from the given bytes.
type Stroke ¶
type Stroke struct { // BrushType is one of the predefined pencil types, e.g. "Ballpoint" or "PaintBrush" BrushType BrushType // BrushColor is one of the three available colors. BrushColor BrushColor // Padding - we do not know what this means and it seems to be "0" all the time. Padding uint32 // BrushSize is the base size of the Brush (small, medium, large) BrushSize BrushSize // Unknown is ...well: unkown. Unknown float32 // Dots are the coordionate points that make up this stroke. Dots []Dot }
Stroke is a single continous brush stroke.
Click to show internal directories.
Click to hide internal directories.