Documentation

LearnPen Drawing

Description

Note: To successfully use this module, you need the LearnPen hardware developed by Learnetic. If you do not possess this pen, please use the Drawing module instead.

The LearnPen Drawing module allows users to draw images on a digital canvas using LearnPen. It is possible to define the line thickness, color, and opacity in the editor.

Properties

The list starts with the common properties. Learn more about them by visiting the Modules description section. The other available properties are described below.

Property name Description
LearnPen When this option is selected, registering from the squeeze and pressure sensors is on.
Colors If LearnPen is on, color is specified by function (more information below), otherwise the color of the pencil is specified in '#RRGGBB' notation or by name, e.g., "pink".
Thickness If LearnPen is on, thickness is specified by function (more information below), otherwise the width of the pencil is defined by a number between 1 and 40.
Opacity If LearnPen is on, opacity is specified by function (more information below), otherwise it's a number between 0 and 1.
Squeeze limits Property which defines the squeezes' range. Two numbers (value from and to in percentage) separated with a semicolon, e.g., "54;69".
Squeeze limits interpretation Defines how the 'Squeeze limits' property should be interpreted.
Pressure limits Property which defines the pressure's range. Two numbers (value from and to in percentage) separated with a semicolon, e.g., "34;90".
Events In this property, you can define custom events and decide whether they are to be sent. Every event has 5 properties:
  • Sensor - the list is below,
  • Reaction scope - defines the range of reaction. Two numbers separated with a semicolon, e.g., "78;82",
  • Item - Item field in the event,
  • Value - Value field in the event,
  • Score - Score field in the event,
Mirror When this option is selected, every point and line will be reflected to the other side of a digital canvas.
Background color Color of the background.

Sensors list

  • SQUEEZE_A
  • SQUEEZE_B
  • SQUEEZE_C
  • SQUEEZE_SUM
  • SQUEEZE_MAX
  • PRESSURE
  • ALL

Function as an argument

If LearnPen is on, the properties 'Colors', 'Thickness', and 'Opacity' are specified by function. In the first line, type one element from the Sensors list (above). In the following lines, use proper values (depending on the property) and a number between 1 and 100. Samples:

Property Colors:

SQUEEZE_C
33% red
66% green
100% blue

Now the color depends on the sensor squeeze C: <0%,33%> red, <34%,66%> green, <67%,100%> blue.

Property Thickness:

PRESSURE
50% 15
100% 25

Property Opacity:

ALL
100% 1

Supported commands

Command name Params Description
hide --- Hides the module if it is visible.
show --- Shows the module if it is hidden.
setColor color name or RGB Change color and switch from eraser to pencil.
setThickness number between 1 and 40 Change thickness.
setEraserOn --- Switch from pencil to eraser.

Advanced Connector integration

Each command supported by the LearnPen Drawing module can be used in the Advanced Connector module's scripts. The below example shows how to change color (to green) and thickness (to 13) when the Image Source is selected and Text module's gap content changes.

EVENTSTART
Name:ItemSelected
Item:green
SCRIPTSTART

var learnpendrawing = presenter.playerController.getModule('LearnPen1');
learnpendrawing.setColor('green');

SCRIPTEND
EVENTEND


EVENTSTART
Source:Text1
Item:1
Value:^medium$
SCRIPTSTART

var learnpendrawing = presenter.playerController.getModule('LearnPen1');
learnpendrawing.setThickness(13);

SCRIPTEND
EVENTEND

To turn on the eraser, you have to use the function:

learnpendrawing.setEraserOn();

To set the eraser's thickness, use the function:

learnpendrawing.setEraserThickness(10);

To turn off the eraser, just set the pencil color, e.g.:

learnpendrawing.setColor('pink');

Demo presentation

Demo presentation contains examples on how to use the LearnPen Drawing module.