README: format a bit better for readability
This commit is contained in:
parent
4aca12b6e7
commit
ffcad95337
|
@ -30,6 +30,7 @@ DBus Interface
|
||||||
|
|
||||||
The following interfaces are provided:
|
The following interfaces are provided:
|
||||||
|
|
||||||
|
````
|
||||||
org.freedesktop.tuhi1.Manager
|
org.freedesktop.tuhi1.Manager
|
||||||
|
|
||||||
Property: Devices (ao)
|
Property: Devices (ao)
|
||||||
|
@ -98,6 +99,7 @@ org.freedesktop.tuhi1.Device
|
||||||
|
|
||||||
Returns a string representing the JSON data from the last drawings or
|
Returns a string representing the JSON data from the last drawings or
|
||||||
the empty string if no data is available or the index is invalid.
|
the empty string if no data is available or the index is invalid.
|
||||||
|
````
|
||||||
|
|
||||||
JSON File Format
|
JSON File Format
|
||||||
----------------
|
----------------
|
||||||
|
@ -106,6 +108,7 @@ Below is the example file format (with comments, not present in the real
|
||||||
files). The JSON objects are "drawing" (the root object), "strokes",
|
files). The JSON objects are "drawing" (the root object), "strokes",
|
||||||
"points". Pseudo-code is used to illustrate the objects in the file.
|
"points". Pseudo-code is used to illustrate the objects in the file.
|
||||||
|
|
||||||
|
````
|
||||||
class Drawing {
|
class Drawing {
|
||||||
version: uint32
|
version: uint32
|
||||||
devicename: string
|
devicename: string
|
||||||
|
@ -113,21 +116,26 @@ class Drawing {
|
||||||
timestamp: uint64
|
timestamp: uint64
|
||||||
strokes: [ Stroke, Stroke, ...]
|
strokes: [ Stroke, Stroke, ...]
|
||||||
}
|
}
|
||||||
|
````
|
||||||
|
|
||||||
The **strokes** list contains all strokes of a single drawing, each stroke
|
The **strokes** list contains all strokes of a single drawing, each stroke
|
||||||
consisting of a number of **points**.
|
consisting of a number of **points**.
|
||||||
|
|
||||||
|
````
|
||||||
class Stroke {
|
class Stroke {
|
||||||
points: [Point, Point, ...]
|
points: [Point, Point, ...]
|
||||||
}
|
}
|
||||||
|
````
|
||||||
|
|
||||||
The **points** list contains the actual pen data.
|
The **points** list contains the actual pen data.
|
||||||
|
|
||||||
|
````
|
||||||
class Point {
|
class Point {
|
||||||
toffset: uint32
|
toffset: uint32
|
||||||
position: [uint32, uint32]
|
position: [uint32, uint32]
|
||||||
pressure: uint32
|
pressure: uint32
|
||||||
}
|
}
|
||||||
|
````
|
||||||
|
|
||||||
An expanded file looks like this:
|
An expanded file looks like this:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue