MtgApi

MtgApi

Description:
Source:

The api methods added to the application (MtgApp or MtgAppLecteur, becoming MtgAppApi or MtgAppLecteurApi

Methods

(static) activateTraceMode(bActivate)

Description:
  • activates or deactivates trace mode on the figure syntax activates(true|false) allowed

Source:
Parameters:
Name Type Description
bActivate boolean

true to activate trace mode, false to deactivate trace mode

(static) addAbsMeasure(options) → {CMesureAbscisse}

Description:
  • Adds the measure of length measure of point b in (o, a) (the three points must be aligned) syntax addAbsMeasure(b, o, a) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
b CPt | string

point b the abscissa is wanted from

o CPt | string

origin (abscissa of b in (O, a))

a CPt | string

extremity (abscissa of b in (O, a))

Returns:

the created measure

Type
CMesureAbscisse

(static) addAngleMark(options) → {Promise.<undefined>}

Description:
  • Adds an angle mark syntax allowed addAngleMark(o, a, b, r, addAngleMark(o, a, b, r, color), addAngleMark(o, a, b, r, color, angleMarkStyle) or addAngleMark(o, a, b, r, color, angleMarkStyle, thickness) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
o CPt | string

o point of arc oab (name or tag if name is empty)

a CPt | string

a point of arc oab (name or tag if name is empty)

b CPt | string

b point of arc oab (name or tag if name is empty)

r number

arc radius in pixels

color string <optional>

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

angleMarkStyle string <optional>

Angle mark style (simple|simple-|simple--|simple---|simplex|full|full-|full--|full---|fullx)

lineStyle string <optional>
line

SLine style (line|-|dot|.|dashdash|--|dashdotdot|-..|dashdotdotdot|-...|dashdashdash|---)

thickness number <optional>
1

Thickness of the stroke

hidden boolean <optional>

true to get the angle mark masked

tag string <optional>

Tag to be applied on the angle mark (if present)

Returns:
Type
Promise.<undefined>

(static) addArcDirectOAB(options) → {Promise.<undefined>|CArcDeCercleDirect}

Description:
  • Adds the direct circle arc of center o starting from point a and ending at the intersection point of ray [o;b) and the circle syntax addArcDirectOAB(o, a, b), addArcDirectOAB(o, a, b, color), addArcDirectOAB(o, a, b, color, lineStyle) or addArcDirectOAB(o, a, b, color, lineStyle, thickness) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
o CPt | string

Point or point name of the center point of the arc

a CPt | string

Point or point name of the starting point of the arc

b CPt | string

Point or point name of the point providing the final extremity of the arc (by intersection of a ray of origin o with the circle)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

lineStyle string <optional>
line

Line style (line|-|dot|.|dashdash|--|dashdotdot|-..|dashdotdotdot|-...|dashdashdash|---)

thickness number <optional>
1

Stroke thickness

hidden boolean <optional>
false

true to get the created arc masked

tag string <optional>

Tag to be applied on the created arc (if present)

Returns:

The created arc if isPromiseMode is false or promise that will be resolved when the arc is displayed

Type
Promise.<undefined> | CArcDeCercleDirect

(static) addArcIndirectOAB(options) → {Promise.<undefined>|CArcDeCercleIndirect}

Description:
  • Adds the indirect circle arc of center o starting from point a and ending at the intersection point of ray [o;b) and the circle syntax addArcIndirectOAB(o, a, b), addArcIndirectOAB(o, a, b, color), addArcIndirectOAB(o, a, b, color, lineStyle) or addArcIndirectOAB(o, a, b, color, lineStyle, thickness) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
o CPt | string

Point or point name of the center point of the arc

a CPt | string

Point or point name of the starting point of the arc

b CPt | string

Point or point name of the point providing the final extremity of the arc (by intersection of a ray of origin o with the circle)

color string <optional>

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

lineStyle string <optional>
line

Line style (line|-|dot|.|dashdash|--|dashdotdot|-..|dashdotdotdot|-...|dashdashdash|---)

thickness number <optional>
1

Stroke thickness

hidden boolean <optional>
false

true to get the created arc masked

tag string <optional>

Tag to be applied on the created arc (if present)

Returns:

The created arc if isPromiseMode is false or promise that will be resolved when the arc is displayed

Type
Promise.<undefined> | CArcDeCercleIndirect

(static) addArcMajorOAB(options) → {Promise.<undefined>|CGrandArcDeCercle}

Description:
  • Adds the major circle arc of center o starting from point a and ending at the intersection point of ray [o;b) and the circle syntax addArcMajorOAB(o, a, b), addArcMajorOAB(o, a, b, color), addArcMajorOAB(o, a, b, color, lineStyle) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
o CPt | string

Point or point name of the center point of the arc

a CPt | string

Point or point name of the starting point of the arc

b CPt | string

Point or point name of the point providing the final extremity of the arc (by intersection of ray of origin o with the circle)

lineStyle string <optional>
line

Line style (line|-|dot|.|dashdash|--|dashdotdot|-..|dashdotdotdot|-...|dashdashdash|---)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

thickness number <optional>
1

Stroke thickness

hidden boolean <optional>
false

true to get the created arc masked

tag string <optional>

Tag to be applied on the created arc (if present)

Returns:

The created arc if isPromiseMode is false or promise that will be resolved when the arc is displayed

Type
Promise.<undefined> | CGrandArcDeCercle

(static) addArcMajorOAx(options) → {Promise.<undefined>|CGrandArcDeCercle}

Description:
  • Adds the major circle arc of center o starting from point a and angle x syntax addArcMajorOAx(o, a, x), addArcMajorOAx(o, a, x, color), addArcMajorOAx(o, a, x, color, or addArcMajorOAx(o, a, x, color, lineStyle, thickness)` allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
o CPt | string

Point or point name of the center point of the arc

a CPt | string

Point or point name of the starting point of the arc

x number | string | CValDyn

Angle of the arc in the unity angle of the figure (number or valid formula)

lineStyle string <optional>
line

line style (line|-|dot|.|dashdash|--|dashdotdot|-..|dashdotdotdot|-...|dashdashdash|---)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

thickness number <optional>
1

Stroke thickness

hidden boolean <optional>
false

true to get the created arc masked

tag string <optional>

Tag to be applied on the created arc (if present)

Returns:

The created arc if isPromiseMode is false or promise that will be resolved when the arc is displayed

Type
Promise.<undefined> | CGrandArcDeCercle

(static) addArcOAB(options) → {Promise.<undefined>|CArcDeCercle}

Description:
  • Adds the minor circle arc of center o starting from point a and ending at the intersection point of ray [o;b) and the circle syntax addArcOAB(o, a, b), addArcOAB(o, a, b, color), addArcOAB(o, a, b, color, lineStyle) or addArcOAB(o, a, b, color, lineStyle, thickness) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
o CPt | string

Point or point name of the center of the arc

a CPt | string

Point or point name of the starting point of the arc

b CPt | string

Point or point name of the point providing the final extremity of the arc (by intersection of ray of origin o with the circle)

lineStyle string <optional>
line

Line style (line|-|dot|.|dashdash|--|dashdotdot|-..|dashdotdotdot|-...|dashdashdash|---)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

thickness number <optional>
1

Stroke thickness

hidden boolean <optional>
false

true to get the created arc masked

tag string <optional>

Tag to be applied on the created arc (if present)

Returns:

The created arc if isPromiseMode is false or promise that will be resolved when the arc is displayed

Type
Promise.<undefined> | CArcDeCercle

(static) addArcOAx(options) → {Promise.<undefined>|CArcDeCercle}

Description:
  • Adds the minor circle arc of center o, starting from a and angle x syntax addArcOAx(o, a, x), addArcOAx(o, a, x, color), addArcOAx(o, a, x, color, ineStyle) or addArcOAx(o, a, x, color, lineStyle, thickness) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
o CPt | string

Point or point name of the center point of the arc

a CPt | string

Point or point name of the starting point of the arc

x number | string | CValDyn

Angle of the arc in the unity angle of the figure (number or valid formula)

lineStyle string <optional>
line

Line style (line|-|dot|.|dashdash|--|dashdotdot|-..|dashdotdotdot|-...|dashdashdash|---)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

thickness number <optional>
1

Stroke thickness

hidden boolean <optional>
false

true to get the created arc masked

tag string <optional>

Tag to be applied on the created arc (if present)

Returns:

The created arc if isPromiseMode is false or promise that will be resolved when the arc is displayed

Type
Promise.<undefined> | CArcDeCercle

(static) addBrokenLine(options) → {Promise.<undefined>|CLigneBrisee}

Description:
  • Adds a broken line vertexes of which are given in the array points (array of the vertexes points names) syntax addBrokenLine(points), addBrokenLine(points, color), addBrokenLine(points, color, lineStyle) or addBrokenLine(points, color, lineStyle, thickness) is allowed where points is an array of points or name of points

Source:
Parameters:
Name Type Description
options Object
Properties
Name Type Attributes Default Description
points Array.<string>

array of the vertexes points names of the polygon

lineStyle string <optional>
line

Line style (line|-|dot|.|dashdash|--|dashdotdot|-..|dashdotdotdot|-...|dashdashdash|---)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

thickness number <optional>
1

Stroke thickness

hidden boolean <optional>
false

true to get the polygon masked

tag string <optional>

Tag to be applied on the created broken line (if present)

Returns:

the created polygon if isPromiseMode is false else promise that will be resolved when the object is displayed

Type
Promise.<undefined> | CLigneBrisee

(static) addCalc(options) → {CCalcul}

Description:
  • Adds a real calculation of name nameCalc from formula contained in string formula syntax addCalc(nameCalc, formula) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
nameCalc string

Name of the real calculation to be created

formula string

Formula of the calculation to be created

Returns:

the created measure

Type
CCalcul

(static) addCalcComp(options) → {CCalculComplexe}

Description:
  • Adds a complex calculation of name nameCalc from formula contained in string formula syntax addCalcComp(nameCalc, formula) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
nameCalc string

Name of the complex calculation to be created

formula string

Formula of the complex calculation to be created

Returns:

the created measure

Type
CCalculComplexe

(static) addCalcMat(options) → {CCalcul}

Description:
  • Adds a matricial calculation of name nameCalc from formula contained in string formula syntax addCalcMat(nameCalc, formula) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
nameCalc string

Name of the matricial calculation to be created

formula string

Formula of the matricial calculation to be created

Returns:

the created measure

Type
CCalcul

(static) addCircleIm(options) → {Promise.<undefined>|CDroiteAB}

Description:
  • adds the image of circle (or circle arc) c by transformation transf syntax addCircleIm(c, transf), addCircleIm(c, transf, name), addCircleIm(c, transf, name, color), addCircleIm(c, transf, name, color, lineStyle) or addCircleIm(c, transf, name, color, lineStyle, thickness) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
c CCercle

the circle (or circle arc) that is to be transformed

transf CTransformation

the transformation to aplly on line d

lineStyle string <optional>
line

Line style (line|-|dot|.|dashdash|--|dashdotdot|-..|dashdotdotdot|-...|dashdashdash|---)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

thickness number <optional>
1

Stroke thickness

hidden boolean <optional>
false

true to get the created line masked

hiddenName boolean <optional>

true to get the created line name masked

fontSize number <optional>
16

Font size of the name

tag string <optional>

Tag to be applied on the created line (if present)

Returns:

The created line if isPromiseMode is false or romise that will be resolved when the line is displayed

Type
Promise.<undefined> | CDroiteAB

(static) addCircleOA(options) → {Promise.<undefined>|CCercleOA}

Description:
  • Adds the circle of center o and going through a syntax addCircleOA(o, a), addCircleOA(o, a, color), addCircleOA(o, a, color, lineStyle) or addCircleOA(o, a, color, lineStyle, thickness) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
o CPt | string

Point or point name of the center

a CPt | string

Point or point name of the point the circle is going through

lineStyle string <optional>
line

Line style (line|-|dot|.|dashdash|--|dashdotdot|-..|dashdotdotdot|-...|dashdashdash|---)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

thickness number <optional>
1

Stroke thickness

hidden boolean <optional>
false

true to get the created circle masked

tag string <optional>

Tag to be applied on the created circle (if present)

Returns:

The created circle if isPromiseMode is false or promise that will be resolved when the circle is displayed

Type
Promise.<undefined> | CCercleOA

(static) addCircleOr(options) → {Promise.<undefined>|CCercleOR}

Description:
  • Adds the circle of center o and radius r The figure must have a unity length syntax addCircleOr(o, r), addCircleOr(o, r, color), addCircleOr(o, r, color, lineStyle) or addCircleOr(o, r, color, lineStyle, thickness) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
o CPt | string

Name (or tag if name is empty) of the center

r number | string

Radius of the circle or string giving a valid formula for the radius

lineStyle string <optional>
line

Line style (line|-|dot|.|dashdash|--|dashdotdot|-..|dashdotdotdot|-...|dashdashdash|---)

color string <optional>
black

Color, blck by default

opacity number <optional>

opacity (0 to 1), 1 by default

thickness number <optional>
1

Stroke thickness

hidden boolean <optional>
false

true to get the created circle masked

tag string <optional>

Tag to be applied on the created circle (if present)

Returns:

The created circle if isPromiseMode is false or promise that will be resolved when the circle is displayed

Type
Promise.<undefined> | CCercleOR

(static) addDerivative(options) → {CCalcul}

Description:
  • Adds the derivative function of function calc (function name or function) syntax addDerivative(calc, nameCalc) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
nameCalc string

Name of the derivative function to be created

calc string

Name of the function to be derivated

Returns:

the created measure

Type
CCalcul

(static) addDilation(options) → {CHomothetie}

Description:
  • adds the dilation of center o and ratio x syntax addDilation(o, x) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
o CPt | string

center of the dilation

x number | string | CValDyn

the ratio of the dilation (number, object or string containing a valid formula)

Returns:
Type
CHomothetie

(static) addDuplicatedObject(options) → {Promise.<undefined>|CObjetDuplique}

Description:
  • Adds the duplicated object of object elt syntax addDuplicatedObject(elt) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Description
elt string

Tag of the object to be duplicated

hidden boolean <optional>

true to get the duplicated object masked

Returns:

the created object if isPromiseMode is false else promise that will be resolved when the duplicated object is displayed

Type
Promise.<undefined> | CObjetDuplique

(static) addEltListener(options)

Description:
  • Adds an event listener to a graphical object of the figure The callBack function accepts three parameters (event, x, y) where x and y are the coordinates of the event relative to the svg containing the figure syntax addEltListener(elt, eventName, callBack) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
elt string

Tag of the graphical object the listener is to be added on

eventName string

Name of the event to be listened to

callBack EventSvgCallback

function to be launched when the event is triggered.

(static) addFreePoint(options) → {Promise.<undefined>|CPointBase}

Description:
  • Add a free point Syntax addFreePoint(x, y), addFreePoint(x, y, name), addFreePoint(x, y, name, color), addFreePoint(x, y, name, color, pointStyle) or addFreePoint(x, y, name, color, pointStyle, rep) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
x number | string | CValDyn

starting x-coordinate when the point is created

y number | string | CValDyn

starting y-coordinate when the point is created

name string <optional>

Name of the point (if present)

color string <optional>
black

Color, black by default

pointStyle string <optional>
O

Point style (o|O|OO|x|X|+|<>|[]|.) or (littleround|round|biground|mult|bigmult|cross|diamond|square|pixel|)

offsetX number <optional>

x-shift of the name

offsetY number <optional>

y-shift of the name

absCoord boolean <optional>
false

set to true if x,y should be considered absolute in the svg (in that case rep is ignored), useless if there is no frame (in that case x,y will be considered absolute regardless of this property)

rep string <optional>

tag of the frame (system of coordinates), mandatory only if the figure contains several frames

opacity number <optional>

opacity (0 to 1), 1 by default

hidden boolean <optional>

true to get the point masked

hiddenName boolean <optional>

true to get the name point masked

fontSize number <optional>
16

Font size of the name

tag string <optional>

Tag to be applied on the point (if present)

Returns:

The created point if isPromiseMode is false else promise that will be resolved when the point is displayed

Type
Promise.<undefined> | CPointBase

(static) addFunc(options) → {CCalcul}

Description:
  • Adds a real fonction of variable x named nameCalc from formula contained in string formula syntax addFunc(nameCalc, formula) or addFunc(nameCalc, formula, varName) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
nameCalc string

Name of the function to be created

formula string

Formula of the function to be created (with x as variable)

varName string

Formal variable name used in the formula of the function. 'x' by default.

Returns:

the created measure

Type
CCalcul

(static) addFuncComp(options) → {CCalcul}

Description:
  • Adds a real fonction of variable z named nameCalc from formula contained in string formula syntax addFuncComp(nameCalc, formula) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
nameCalc string

Name of the complex function to be created

formula string

Formula of the calculation to be created (with z as variable)

varName string

Formal variable name used in the formula of the function. 'z' by default.

Returns:

the created measure

Type
CCalcul

(static) addImPointDilation(options) → {Promise.<undefined>|CPointImage}

Description:
  • Adds an image point of a through a dilation of center o and ratio x syntax addImPointDilation(a, o, x), addImPointDilation(a, o, x, name), addImPointDilation(a, o, x, name, color), addImPointDilation(a, o, x, name, color, pointStyle) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
a CPt | string

point that is to be transformed by the dilation (or point name)

o CPt | string

center point of the dilation (or point name)

x number | string | CValDyn

Ratio of the dilation : number or vaid formula

name string <optional>

The name of the point to be created

offsetX number <optional>

x-shift of the name

offsetY number <optional>

y-shift of the name

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

pointStyle string <optional>
O

Point style (o|O|OO|x|X|+|<>|[]|.) or (littleround|round|biground|mult|bigmult|cross|diamond|square|pixel|)

hidden boolean <optional>

true to get the created point masked

hiddenName boolean <optional>

true to get the created point name masked

fontSize number <optional>
16

Font size of the name

tag string <optional>

Tag to be applied on the created point (if present)

Returns:

The created point if isPromiseMode is false or promise that will be resolved when the point is displayed

Type
Promise.<undefined> | CPointImage

(static) addImPointRotation(options) → {Promise.<undefined>|CPointImage}

Description:
  • Adds the image point of a through a rotation of center o and angle x syntax addImPointRotation(a, o, x), addImPointRotation(a, o, x, name), addImPointRotation(a, o, x, name, color) or addImPointRotation(a, o, x, name, color, pointStyle) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
a CPt | string

point that is to be transformed by the rotation

o CPt | string

The rotation center (or point name)

x number | string | CValDyn

Angle of rotation : number or valid formula

name string <optional>

The name of the point to be created

offsetX number <optional>

x-shift of the name

offsetY number <optional>

y-shift of the name

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

pointStyle string <optional>
O

Point style (o|O|OO|x|X|+|<>|[]|.) or (littleround|round|biground|mult|bigmult|cross|diamond|square|pixel|)

hidden boolean <optional>

true to get the created point masked

hiddenName boolean <optional>

true to get the created point name masked

fontSize number <optional>
16

Font size of the name

tag string <optional>

Tag to be applied on the created point (if present)

Returns:

The created point if isPromiseMode is false or promise that will be resolved when the point is displayed

Type
Promise.<undefined> | CPointImage

(static) addImPointSymAx(options) → {Promise.<undefined>|CPointImage}

Description:
  • Adds an image point of a through an axial symmetry of axis d syntax addImPointSymAx(a, d), addImPointSymAx(a, d, name), addImPointSymAx(a, d, name, color) or addImPointSymAx(a, d, name, color, pointStyle) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
a CPt | string

point that is to be transformed by the symmetry (or point name)

d string

The symmetry axis (line, segment or ray)

name string <optional>

The name of the point to be created

offsetX number <optional>

x-shift of the name

offsetY number <optional>

y-shift of the name

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

pointStyle string <optional>
O

Point style (o|O|OO|x|X|+|<>|[]|.) or (littleround|round|biground|mult|bigmult|cross|diamond|square|pixel|)

hidden boolean <optional>

true to get the created point masked

hiddenName boolean <optional>

true to get the created point name masked

fontSize number <optional>
16

Font size of the name

tag string <optional>

Tag to be applied on the created point (if present)

Returns:

The created point if isPromiseMode is false or promise that will be resolved when the point is displayed

Type
Promise.<undefined> | CPointImage

(static) addImPointSymCent(options) → {Promise.<undefined>|CPointImage}

Description:
  • Adds an image point of a through the central symmetry of center o syntax addImPointSymCent(a, o), addImPointSymCent(a, o, name), addImPointSymCent(a, o, name, color) or addImPointSymCent(a, o, name, color, pointStyle) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
o CPt | string

center of the symmetry (or point name)

a CPt | string

point that is to be transformed by the dilation (or point name)

name string <optional>

The name of the point to be created

offsetX number <optional>

x-shift of the name

offsetY number <optional>

y-shift of the name

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

pointStyle string <optional>
O

Point style (o|O|OO|x|X|+|<>|[]|.) or (littleround|round|biground|mult|bigmult|cross|diamond|square|pixel|)

hidden boolean <optional>

true to get the created point masked

hiddenName boolean <optional>

true to get the created point name masked

fontSize number <optional>
16

Font size of the name

tag string <optional>

Tag to be applied on the created point (if present)

Returns:

The created point if isPromiseMode is false or promise that will be resolved when the point is displayed

Type
Promise.<undefined> | CPointImage

(static) addImPointTranslation(options) → {Promise.<undefined>|CPointImage}

Description:
  • Adds an image point of o through a translation of vector ab syntax addImPointTranslation(o, a, b), addImPointTranslation(o, a, b, name), addImPointTranslation(o, a, b, name, color) or addImPointTranslation(o, a, b, name, color, pointStyle) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
o CPt | string

Point (or point name) that is to be transformed by the translation

a CPt | string

Point (or point name) origin of the translation vector

b CPt | string

Point (or point name) extremity of the translation vector

name string <optional>

The name of the point to be created (image point)

offsetX number <optional>

x-shift of the point name

offsetY number <optional>

y-shift of the point name

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

pointStyle string <optional>
O

Point style (o|O|OO|x|X|+|<>|[]|.) or (littleround|round|biground|mult|bigmult|cross|diamond|square|pixel|)

hidden boolean <optional>

true to get the created point masked

hiddenName boolean <optional>

true to get the created point name masked

fontSize number <optional>
16

Font size of the name

tag string <optional>

Tag to be applied on the created point (if present)

Returns:

The created point if isPromiseMode is false or promise that will be resolved when the point is displayed

Type
Promise.<undefined> | CPointImage

(static) addImPointTranslationxy(options) → {Promise.<undefined>|CPointImage}

Description:
  • Adds an image point of a through a translation of vector with coordinates (x, y) syntax addImPointTranslation(a, x, y), addImPointTranslation(a, x, y, name), addImPointTranslation(a, x, y, name, color) or addImPointTranslation(a, x, y, name, color, pointStyle) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
a CPt | string

Point (or point name) that is to be transformed by the translation

x number | string | CValDyn

the first coordinate of the translation vector

y number | string | CValDyn

the second coordinate of the translation vector

name string <optional>

The name of the point to be created (image point)

rep string <optional>

tag of the frame (system of coordinates), mandatory only if the figure contains several frames

offsetX number <optional>

x-shift of the point name

offsetY number <optional>

y-shift of the point name

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

pointStyle string <optional>
O

Point style (o|O|OO|x|X|+|<>|[]|.) or (littleround|round|biground|mult|bigmult|cross|diamond|square|pixel|)

hidden boolean <optional>

true to get the created point masked

hiddenName boolean <optional>

true to get the created point name masked

fontSize number <optional>
16

Font size of the name

tag string <optional>

Tag to be applied on the created point (if present)

Returns:

The created point if isPromiseMode is false or promise that will be resolved when the point is displayed

Type
Promise.<undefined> | CPointImage

(static) addIntCircleCircle(options) → {Promise.<undefined>|Array.<CPointLieBipoint, CPointLieBipoint>}

Description:
  • Adds the intersection between two circles without re-creating an intersection point already created syntax addIntCircleCircle(c, c2), addIntCircleCircle(c, c2, name), addIntCircleCircle(c, c2, name, name2), addIntCircleCircle(c, c2, name, name2, color) or addIntCircleCircle(c, c2, name, name2, color, pointStyle) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
c string

Tag of the first intersection circle (or circle arc)

c2 string

Tag of the second intersection circle (or circle arc)

smartIntersect boolean <optional>
true

Set to false to re-create points seen as already existing in circle intersection (with circle or line)

pointStyle string <optional>
round

Point style (square|round|cross|mult|littleround|diamond|pixel|biground|bigmult)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

hidden boolean <optional>

true to get the intersection points masked

name string <optional>

Name of the first intersection point created

name2 string <optional>

Name of the second intersection point created (if not already present in the figure)

fontSize number <optional>
16

Size of the font used for the created intersection points

hiddenName boolean <optional>

true to get the intersection points name hidden

Returns:

[point1, point2] where point1 and point2 are the intersection points if isPromiseMode is false or promise that will be resolved when the intersection points are displayed. If one of the intersection point exists, point1 is the new created point

Type
Promise.<undefined> | Array.<CPointLieBipoint, CPointLieBipoint>

(static) addIntLineCircle(options) → {Promise.<undefined>|Array.<CPointLieBipoint, CPointLieBipoint>}

Description:
  • Adds the intersection between a line and a circle without re-creating an intersection point already created syntax addIntLineCircle(d, c), addIntLineCircle(d, c, name), addIntLineCircle(d, c, name, name2), addIntLineCircle(d, c, name, name2, color) or addIntLineCircle(d, c, name, name2, color, pointStyle) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
d string

Tag of the first intersection line (or ray or segment)

c string

Tag of the intersection circle (or circle arc)

smartIntersect boolean <optional>
true

Set to false to re-create points seen as already existing in circle intersection (with circle or line)

pointStyle string <optional>
round

Point style (square|round|cross|mult|littleround|diamond|pixel|biground|bigmult)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

hidden boolean <optional>

true to get the intersection points masked

name string <optional>

Name of the first intersection point created

name2 string <optional>

Name of the second intersection point created (if not already present in the figure)

fontSize number <optional>
16

Size of the font used for the created intersection points

hiddenName boolean <optional>

true to get the intersection points name hidden

Returns:

[point1, point2] where point1 and point2 are the intersection points if isPromiseMode is false or promise that will be resolved when the intersection points are displayed. If one of the intersection point exists, point1 is the new created point

Type
Promise.<undefined> | Array.<CPointLieBipoint, CPointLieBipoint>

(static) addIntLineLine(options) → {Promise.<undefined>|CIntDroiteDroite}

Description:
  • Adds the intersection of 2 lines syntax addIntLineLine(d, d2), addIntLineLine(d, d2, name), addIntLineLine(d, d2, name, color) or addIntLineLine(d, d2, name, color, pointStyle) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
d string

Tag of the first intersection line (or ray or segment)

d2 string

Tag of the second intersection line (or ray or segment)

pointStyle string <optional>
round

Point style (square|round|cross|mult|littleround|diamond|pixel|biground|bigmult)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

hidden boolean <optional>

true to get the intersection point masked

name string <optional>

The name of the intersection point

fontSize number <optional>
16

Size of the font used for the intersection point name

hiddenName boolean <optional>

true to get the intersection point name hidden

tag string <optional>

Tag to be applied on the created LaTeX display (if present)

Returns:

The created point if isPromiseMode is false or promise that will be resolved when the intersection point is displayed

Type
Promise.<undefined> | CIntDroiteDroite

(static) addLatex(options) → {Promise.<undefined>}

Description:
  • Adds a LaTeX diplay located at [x,y] syntax addLatex(latex, x, y) or addLatex(latex, x, y, color) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
latex string

The LaTeX code to be displayed

x number

x-coordinate of the location the text is to be displayed at

y number | string | CValDyn

y-coordinate of the location the text is to be displayed at

offsetX number <optional>

x-shift of the LaTeX display

offsetY number <optional>

xy-shift oof the LaTeX display

absCoord boolean <optional>
false

set to true if x,y should be considered absolute in the svg (in that case rep is ignored), useless if there is no frame (in that case x,y will be considered absolute regardless of this property)

rep string <optional>

tag of the frame (system of coordinates), mandatory only if the figure contains several frames

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

hidden boolean <optional>

true to get the created LaTeX display masked

fontSize number <optional>
16

Size of the font used for the display (in pixels)

border string <optional>
none

The border style (none|simple|3D)

opaque boolean <optional>
false

true if the text or LaTeX displays erases its background. If true the color used to erase the background is the backgroundColor if present, else the background color of the figure

backgroundColor string <optional>

Background color if opaque is true

hAlign string <optional>

Horizontal alignment left|center|right

vAlign string <optional>

Vertical alignment top|middle|bottom

tag string <optional>

Tag to be applied on the created LaTeX display (if present)

Returns:

Promise that will be resolved when the LaTeX is displayed

Type
Promise.<undefined>

(static) addLengthMeasure(options) → {CLongueur}

Description:
  • Adds the measure of length measure ab (distance between two points a and b) For this, the figure must have a unity length syntax addLengthMeasure(a, b) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
a CPt | string

point a (or point name) (Measure of length ab)

b CPt | string

point b (or point name) (measure of length ab)

Returns:

the created measure

Type
CLongueur

(static) addLineAB(options) → {Promise.<undefined>|CDroiteAB}

Description:
  • Adds the line going through points a and b syntax addLineAB(a, b), addLineAB(a, b, name), addLineAB(a, b, name, color), addLineAB(a, b, name, color, lineStyle) or addLineAB(a, b, name, color, lineStyle, thickness) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
a CPt | string

First point or point name (or tag if name is empty) the line is going through

b CPt | string

Second poinnt or point name (or tag if name is empty) the line is going through

name string <optional>

Name of the line to be created (if present)

lineStyle string <optional>
line

Line style (line|-|dot|.|dashdash|--|dashdotdot|-..|dashdotdotdot|-...|dashdashdash|---)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

thickness number <optional>
1

Stroke thickness

hidden boolean <optional>
false

true to get the created line masked

hiddenName boolean <optional>

true to get the created line name masked

fontSize number <optional>
16

Font size of the name

tag string <optional>

Tag to be applied on the created line (if present)

Returns:

The created line if isPromiseMode is false or romise that will be resolved when the line is displayed

Type
Promise.<undefined> | CDroiteAB

(static) addLineAx(options) → {Promise.<undefined>|CDroiteOm}

Description:
  • Adds the line going through points a and with line slope x syntax addLineAx(a, x), addLineAx(a, x, name), addLineAx(a, x, name, color), addLineAx(a, x, name, color, lineStyle) or addLineAx(a, x, name, color, lineStyle, thickness) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
a CPt | string

Point or point name the line is going through

x number | string | CValDyn

slope of the line (number or valid formula)

name string <optional>

Name of the line to be created (if present)

lineStyle string <optional>
line

Line style (line|-|dot|.|dashdash|--|dashdotdot|-..|dashdotdotdot|-...|dashdashdash|---)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

thickness number <optional>
1

Stroke thickness

hidden boolean <optional>
false

true to get the created line masked

hiddenName boolean <optional>

true to get the created line name masked

fontSize number <optional>
16

Font size of the name

tag string <optional>

Tag to be applied on the created line (if present)

Returns:

The created line if isPromiseMode is false or romise that will be resolved when the line is displayed

Type
Promise.<undefined> | CDroiteOm

(static) addLineBisAOB(options) → {Promise.<undefined>|CDroiteAB}

Description:
  • Adds the bisector line of angle a o b syntax addLineBisAOB(a, o, b), addLineBisAOB(a, o, b, name), addLineBisAOB(a, o, b, name, color), addLineBisAOB(a, o, b, name, color, lineStyle) or addLineBisAOB(a, o, b, name, color, lineStyle, thickness) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
a CPt | string

Point a or point name for bisector of angle a o b

o CPt | string

Point o or point name for bisector of angle a o b (starting point of the bisector)

b CPt | string

Point b or point name for bisector of angle a o b

name string <optional>

Name of the line to be created (if present)

lineStyle string <optional>
line

Line style (line|-|dot|.|dashdash|--|dashdotdot|-..|dashdotdotdot|-...|dashdashdash|---)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

thickness number <optional>
1

Stroke thickness

hidden boolean <optional>
false

true to get the created line masked

hiddenName boolean <optional>

true to get the created line name masked

fontSize number <optional>
16

Font size of the name

tag string <optional>

Tag to be applied on the created line (if present)

Returns:

The created line if isPromiseMode is false or romise that will be resolved when the line is displayed

Type
Promise.<undefined> | CDroiteAB

(static) addLineHor(options) → {Promise.<undefined>|CDroiteDirectionFixe}

Description:
  • Adds the horizontal line going through point a syntax addLineHor(a), addLineHor(a, name), addLineHor(a, name, color), addLineHor(a, name, color, lineStyle) or addLinePar(a, name, color, lineStyle, thickness) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
a CPt | string

First point or point name (or tag if name is empty) the line is going through

name string <optional>

Name of the line to be created (if present)

lineStyle string <optional>
line

Line style (line|-|dot|.|dashdash|--|dashdotdot|-..|dashdotdotdot|-...|dashdashdash|---)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

thickness number <optional>
1

Stroke thickness

hidden boolean <optional>
false

true to get the created line masked

hiddenName boolean <optional>

true to get the created line name masked

fontSize number <optional>
16

Font size of the name

tag string <optional>

Tag to be applied on the created line (if present)

Returns:

The created line if isPromiseMode is false or romise that will be resolved when the line is displayed

Type
Promise.<undefined> | CDroiteDirectionFixe

(static) addLineIm(options) → {Promise.<undefined>|CDroiteAB}

Description:
  • adds the image of line d by transformation transf syntax addLineIm(d, transf), addLineIm(d, transf, name), addLineIm(d, transf, name, color), addLineIm(d, transf, name, color, lineStyle) or addLineIm(d, transf, name, color, lineStyle, thickness) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
d CDroiteAncetre

the line that is to be transformed

transf CTransformation

the transformation to aplly on line d

name string <optional>

Name of the line to be created (if present)

lineStyle string <optional>
line

Line style (line|-|dot|.|dashdash|--|dashdotdot|-..|dashdotdotdot|-...|dashdashdash|---)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

thickness number <optional>
1

Stroke thickness

hidden boolean <optional>
false

true to get the created line masked

hiddenName boolean <optional>

true to get the created line name masked

fontSize number <optional>
16

Font size of the name

tag string <optional>

Tag to be applied on the created line (if present)

Returns:

The created line if isPromiseMode is false or romise that will be resolved when the line is displayed

Type
Promise.<undefined> | CDroiteAB

(static) addLineMedAB(options) → {Promise.<undefined>|CDroiteAB}

Description:
  • Adds the mediator line of segment [a, b] syntax addLineMedAB(a, b), addLineMedAB(a, b, name), addLineMedAB(a, b, name, color), addLineMedAB(a, b, name, color, lineStyle) or addLineMedAB(a, b, name, color, lineStyle, thickness) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
a CPt | string

First point (or point name) line is mediator of

b CPt | string

Second point (or point name) line is mediator of

name string <optional>

Name of the line to be created (if present)

lineStyle string <optional>
line

Line style (line|-|dot|.|dashdash|--|dashdotdot|-..|dashdotdotdot|-...|dashdashdash|---)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

thickness number <optional>
1

Stroke thickness

hidden boolean <optional>
false

true to get the created line masked

hiddenName boolean <optional>

true to get the created line name masked

fontSize number <optional>
16

Font size of the name

tag string <optional>

Tag to be applied on the created line (if present)

Returns:

The created line if isPromiseMode is false or romise that will be resolved when the line is displayed

Type
Promise.<undefined> | CDroiteAB

(static) addLinePar(options) → {Promise.<undefined>|CDroiteParallele}

Description:
  • Adds the parallel line to d going through a syntax addLinePar(a, d), addLinePar(a, d, name), addLinePar(a, d, name, color), addLinePar(a, d, name, color, lineStyle) and addLinePar(a, d, name, color, lineStyle, thickness) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
a CPt | string

First point or point name (or tag if name is empty) the line is going through

d string

line (or segment or ray) (or tag) the created line must be parallel to

name string <optional>

Name of the line to be created (if present)

lineStyle string <optional>
line

Line style (line|-|dot|.|dashdash|--|dashdotdot|-..|dashdotdotdot|-...|dashdashdash|---)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

thickness number <optional>
1

Stroke thickness

hidden boolean <optional>
false

true to get the created line masked

hiddenName boolean <optional>

true to get the created line name masked

fontSize number <optional>
16

Font size of the name

tag string <optional>

Tag to be applied on the created line (if present)

Returns:

The created line if isPromiseMode is false or promise that will be resolved when the line is displayed

Type
Promise.<undefined> | CDroiteParallele

(static) addLinePerp(options) → {Promise.<undefined>|CDroitePerpendiculaire}

Description:
  • Adds the line perpendicular to d going through a syntax addLinePerp(a, d), addLinePerp(a, d, name), addLinePerp(a, d, name, color), addLinePerp(a, d, name, color, lineStyle), addLinePerp(a, d, name, color, lineStyle, thickness) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
a CPt | string

Point or point name the line is going through

d string

line (or segment or ray) the created line must be perpendicular to

name string <optional>

Name of the line to be created (if present)

lineStyle string <optional>
line

Line style (line|-|dot|.|dashdash|--|dashdotdot|-..|dashdotdotdot|-...|dashdashdash|---)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

thickness number <optional>
1

Stroke thickness

hidden boolean <optional>
false

true to get the created line masked

hiddenName boolean <optional>

true to get the created line name masked

fontSize number <optional>
16

Font size of the name

tag string <optional>

Tag to be applied on the created line (if present)

Returns:

The created line if isPromiseMode is false or promise that will be resolved when the line is displayed

Type
Promise.<undefined> | CDroitePerpendiculaire

(static) addLineVer(options) → {Promise.<undefined>|CDroiteDirectionFixe}

Description:
  • Adds the vertical line going through point a syntax addLineVer(a), addLineVer(a, name), addLineVer(a, name, color), addLineVer(a, name, color, lineStyle) or addLineVer(a, name, color, lineStyle, thickness) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
a CPt | string

First point or point name (or tag if name is empty) the line is going through

name string <optional>

Name of the line to be created (if present)

lineStyle string <optional>
line

Line style (line|-|dot|.|dashdash|--|dashdotdot|-..|dashdotdotdot|-...|dashdashdash|---)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

thickness number <optional>
1

Stroke thickness

hidden boolean <optional>
false

true to get the created line masked

hiddenName boolean <optional>

true to get the created line name masked

fontSize number <optional>
16

Font size of the name

tag string <optional>

Tag to be applied on the created line (if present)

Returns:

The created line if isPromiseMode is false or romise that will be resolved when the line is displayed

Type
Promise.<undefined> | CDroiteDirectionFixe

(static) addLinkedLatex(options) → {Promise.<undefined>}

Description:
  • Adds a LaTeX display linked to a point a syntax addLinkedLatex(latex, a) or addLinkedLatex(latex, a, color) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
latex string

The LaTeX code to be displayed

a CPt | string

Name (or tag if name is empty) of the point the text display is linked to

offsetX number <optional>

x-shift of the LaTeX display

offsetY number <optional>

y-shift of the LaTeX display

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

hidden boolean <optional>

true to get the created LaTeX display masked

fontSize number <optional>
16

Size of the font used for the display (in pixels)

border string <optional>
none

The border style (none|simple|3D)

opaque boolean <optional>
false

true if the text or LaTeX displays erases its background. If true the color used to erase the background is the backgroundColor if present, else the background color of the figure

backgroundColor string <optional>

Background color if opaque is true * @param {string} [options.hAlign] Horizontal alignment left|center|right

vAlign string <optional>

Vertical alignment top|middle|bottom

tag string <optional>

Tag to be applied on the created LaTeX display (if present)

Returns:

Promise that will be resolved when the LaTeX is displayed

Type
Promise.<undefined>

(static) addLinkedPointCircle(options) → {Promise.<undefined>|CPointLieCercle}

Description:
  • Adds a point linked to a circle (or a circle arc) syntax addLinkedPointCircle(c, x, y), addLinkedPointCircle(c, x, y, name), addLinkedPointCircle(c, x, y, name, color), addLinkedPointCircle(c, x, y, name, color, pointStyle) or addLinkedPointCircle(c, x, y, name, color, pointStyle, rep) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
c string

The tag of the circle the created point is to be linked to

x number | string | CValDyn

x-coordinate of the point that is to be joined from the circle center to get the starting position of the linked point

y number | string | CValDyn

y-coordinate of the point that is to be joined from the circle center to get the starting position of the linked point

absCoord boolean <optional>
false

set to true if x,y should be considered absolute in the svg (in that case rep is ignored), useless if there is no frame (in that case x,y will be considered absolute regardless of this property)

rep string <optional>

tag of the frame (system of coordinates), mandatory only if the figure contains several frames

pointStyle string <optional>
round

Points style (square|round|cross|mult|littleround|diamond|pixel|biground|bigmult)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

hidden boolean <optional>

true to get the created linked point mased

name string <optional>

Name of the linked point to be created

offsetX number <optional>

x-shift of the linked point name

offsetY number <optional>

y-shift of the linked point name

fontSize number <optional>
16

Size of the font used for the point name

hiddenName boolean <optional>

true to get the linked point name masked

tag string <optional>

Tag to be applied on the created point (if present)

Returns:

The created point if isPromiseMode is false or promise that will be resolved when the point is displayed

Type
Promise.<undefined> | CPointLieCercle

(static) addLinkedPointLine(options) → {Promise.<undefined>|CPointLieCercle}

Description:
  • Adds a point linked to a line (or ray or segment) syntax addLinkedPointLine(d, x, y), addLinkedPointLine(d, x, y, name), addLinkedPointLine(d, x, y, name, color), addLinkedPointLine(d, x, y, name, color, pointStyle) or addLinkedPointLine(d, x, y, name, color, pointStyle, rep) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
d string

Tag of the line (or ray or segment) the point is to be linked to

x number | string | CValDyn

x-coordinate of the point used to establish the starting position of the linked point ((by orthogonal projection on the line)

y number | string | CValDyn

y-coordinate of the point used to establish the starting position of the linked point ((by orthogonal projection on the line)

absCoord boolean <optional>
false

set to true if x,y should be considered absolute in the svg (in that case rep is ignored), useless if there is no frame (in that case x,y will be considered absolute regardless of this property)

rep string <optional>

tag of the frame (system of coordinates), mandatory only if the figure contains several frames

pointStyle string <optional>
round

Point style (square|round|cross|mult|littleround|diamond|pixel|biground|bigmult)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

hidden boolean <optional>

true to get the created point masked

name string <optional>

Name of the linked point to be created

offsetX number <optional>

x-shift of the linked point name

offsetY number <optional>

y-shift of the linked point name

fontSize number <optional>
16

Size of the font used for the point name

hiddenName boolean <optional>

true to get the linked point name masked

tag string <optional>

Tag to be applied on the created point (if present)

Returns:

The created point if isPromiseMode is false or promise that will be resolved when the point is displayed

Type
Promise.<undefined> | CPointLieCercle

(static) addLinkedPointLocus(options) → {Promise.<undefined>|CPointLieCercle}

Description:
  • Adds a point linked to a line (or ray or segment) syntax addLinkedPointLocus(elt, x, y), addLinkedPointLocus(elt, x, y, name), addLinkedPointLocus(elt, x, y, name, color) , addLinkedPointLocus(elt, x, y, name, color, pointStyle) or addLinkedPointLocus(elt, x, y, name, color, pointStyle, rep) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
elt string | CLieuDePoints

point locus the point is to be linked to (or its tag)

x number

x-coordinate of the point used to establish the starting position of the linked point ((by orthogonal projection on the line)

y number

y-coordinate of the point used to establish the starting position of the linked point ((by orthogonal projection on the line)

absCoord boolean <optional>
false

set to true if x,y should be considered absolute in the svg (in that case rep is ignored), useless if there is no frame (in that case x,y will be considered absolute regardless of this property)

rep string <optional>

tag of the frame (system of coordinates), mandatory only if the figure contains several frames

pointStyle string <optional>
round

Point style (square|round|cross|mult|littleround|diamond|pixel|biground|bigmult)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

hidden boolean <optional>

true to get the created point masked

name string <optional>

Name of the linked point to be created

offsetX number <optional>

x-shift of the linked point name

offsetY number <optional>

y-shift of the linked point name

fontSize number <optional>
16

Size of the font used for the point name

hiddenName boolean <optional>

true to get the linked point name masked

tag string <optional>

Tag to be applied on the created point (if present)

Returns:

The created point if isPromiseMode is false or promise that will be resolved when the point is displayed

Type
Promise.<undefined> | CPointLieCercle

(static) addLinkedText(options) → {Promise.<undefined>}

Description:
  • Adds a text display linked to a point a syntax addLinkedText(text, a) or addLinkedText(text, a, color) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
text string

The text to be displayed

a CPt | string

Name (or tag if name is empty) of the point the text display must be linked to

offsetX number <optional>

x-shift of the text display

offsetY number <optional>

y-shift of the text display

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

hidden boolean <optional>

true to get the created text display masked

fontSize number <optional>
16

Size of the font used for the display (in pixels)

border string <optional>
none

The border style (none|simple|3D)

opaque boolean <optional>
false

true if the text or LaTeX displays erases its background. If true the color used to erase the background is the backgroundColor if present, else the background color of the figure

backgroundColor string <optional>

Background color if opaque is true

hAlign string <optional>

Horizontal alignment left|center|right

vAlign string <optional>

Vertical alignment top|middle|bottom

tag string <optional>

Tag to be applied on the created text display (if present)

Returns:

Promise that will be resolved when the text is displayed

Type
Promise.<undefined>

(static) addMatrix(options) → {CMatrice}

Description:
  • adds a real matrix of name calc syntax addMatrix(nameCalc, mat) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
mat Array.<(Array.<string>|Array.<number>|Array.<CElementBase>)>

array containing the lines of the matrix, each line beeing an array containing either a number, a dynamic real object or a string containing a valid formula

Returns:
Type
CMatrice

(static) addMidpoint(options) → {Promise.<undefined>|CMilieu}

Description:
  • Adds the midpoint of [a; b] syntax addMidpoint(a, b), addMidpoint(a, b, name), addMidpoint(a, b, name, color) or addMidpoint(a, b, name, color, pointStyle) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
a CPt | string

First point a or point name (or tag if name is empty) (to create midpoint of [a; b])

b CPt | string

Second point b or point name (or tag if name is empty) (to create midpoint of [a; b])

name string <optional>

Name of the midpoint to be created

offsetX number <optional>

x-shift of the point name

offsetY number <optional>

y-shift of the point name

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

pointStyle string <optional>
round

Point style (square|round|cross|mult|littleround|diamond|pixel|biground|bigmult)

hidden boolean <optional>

true to get the created point masked

hiddenName boolean <optional>

true to get the created point name masked

fontSize number <optional>
16

Font size of the name

tag string <optional>

Tag to be applied on the created point (if present)

Returns:

The created point if isPromiseMode is false or promise that will be resolved when the point is displayed

Type
Promise.<undefined> | CMilieu

(static) addObjectLocus(options, options) → {Promise.<undefined>|CLieuObjetParPtLie}

Description:
  • Adds the oject locus of elt generated by the positions of linked point a syntax addObjectLocus(elt, a, x) or addObjectLocus(elt, a, x, color) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
options
Properties
Name Type Attributes Default Description
elt CElementGraphique

the graphical element traces are generated from

a CPt | string

linked point (or point name) positions of which will generate the point locus

color string <optional>
black

Color, black by default

Returns:
Type
Promise.<undefined> | CLieuObjetParPtLie

(static) addPointIm(options) → {Promise.<undefined>|CPointImage}

Description:
  • adds the image of point a by transformation transf syntax addPointIm(a, transf), addPointIm(a, transf, name), addPointIm(a, transf, name, color) or addPointIm(a, transf, name, color, pointStyle) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
d CDroiteAncetre

the line that is to be transformed

transf CTransformation

the transformation to aplly on line d

name string <optional>

The name of the point to be created

offsetX number <optional>

x-shift of the name

offsetY number <optional>

y-shift of the name

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

pointStyle string <optional>
O

Point style (o|O|OO|x|X|+|<>|[]|.) or (littleround|round|biground|mult|bigmult|cross|diamond|square|pixel|)

hidden boolean <optional>

true to get the created point masked

hiddenName boolean <optional>

true to get the created point name masked

fontSize number <optional>
16

Font size of the name

tag string <optional>

Tag to be applied on the created point (if present)

Returns:

The created point if isPromiseMode is false or promise that will be resolved when the point is displayed

Type
Promise.<undefined> | CPointImage

(static) addPointLocus(options) → {Promise.<undefined>|CLieuDePoints}

Description:
  • Adds the point locus of point a generated by the positions of linked point b syntax addPointLocus(a, b, x), addPointLocus(a, b, x, color), addPointLocus(a, b, x, color, lineStyle) or addPointLocus(a, b, x, color, lineStyle, thickness) allowed

Source:
Properties:
Name Type Attributes Description
tag string <optional>

Tag to be associated to the object created

Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
a CPt | string

Point (or point name) traces of which will generate the point locus

b CPt | string

Linked point (or point name) positions of which will generate the point locus

x number

number of the positions of point a generating the point locus

thickness number <optional>

Thickness of the stroke

lineStyle string <optional>
line

Line style (line|-|dot|.|dashdash|--|dashdotdot|-..|dashdotdotdot|-...|dashdashdash|---)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

hidden boolean <optional>

true to get the point locus masked

closed boolean <optional>

true to set the point locus closed

Returns:

the created object locus if isPromiseMode is false else promise that will be resolved when the duplicated object is displayed

Type
Promise.<undefined> | CLieuDePoints

(static) addPointXY(options) → {Promise.<undefined>|CPointDansRepere}

Description:
  • Adds a point defined by (x; y) coordinates in a frame rep (system of axis). For a free point use addFreePoint and specify options.rep) syntax addPointXY(x, y), addPointXY(x, y, name), addPointXY(x, y, name, color), addPointXY(x, y, name, color, pointStyle) or addPointXY(x, y, name, color, pointStyle, rep) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
x number | string | CValDyn

x-coordinate of the point : number or valid formula

y number | string | CValDyn

y-coordinate of the point : number or valid formula

name string <optional>

Name of the point to be created

rep string <optional>

tag of the frame (system of coordinates), mandatory only if the figure contains several frames

offsetX number <optional>

x-shift of the name

offsetY number <optional>

y-shift of the name

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

pointStyle string <optional>
O

Point style (o|O|OO|x|X|+|<>|[]|.) or (littleround|round|biground|mult|bigmult|cross|diamond|square|pixel|)

hidden boolean <optional>

true to get the created point masked

hiddenName boolean <optional>

true to get the created point name masked

fontSize number <optional>
16

Font size of the name

tag string <optional>

Tag to be applied on the point (if present)

Returns:

The created point if isPromiseMode is false else promise that will be resolved when the point is displayed

Type
Promise.<undefined> | CPointDansRepere

(static) addPointZ(options) → {Promise.<undefined>|CPointParAffixe}

Description:
  • Adds a point defined by its complex affix in a frame rep (system of axis). syntax addPointZ(z), addPointZ(z, name), addPointZ(z, name, color) and addPointZ(z, name, color, pointStyle) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
z number | string | CValDyn

affix of the point : number or valid formula or complex calculation

name string <optional>

Name of the point to be created

absCoord boolean <optional>
false

set to true if x,y should be considered absolute in the svg (in that case rep is ignored), useless if there is no frame (in that case x,y will be considered absolute regardless of this property)

rep string <optional>

tag of the frame (system of coordinates), mandatory only if the figure contains several frames

offsetX number <optional>

x-shift of the name

offsetY number <optional>

y-shift of the name

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

pointStyle string <optional>
O

Point style (o|O|OO|x|X|+|<>|[]|.) or (littleround|round|biground|mult|bigmult|cross|diamond|square|pixel|)

hidden boolean <optional>

true to get the created point masked

hiddenName boolean <optional>

true to get the created point name masked

fontSize number <optional>
16

Font size of the name

tag string <optional>

Tag to be applied on the point (if present)

Returns:

The created point if mtgOptions.isPromiseMode is false else promise that will be resolved when the point is displayed

Type
Promise.<undefined> | CPointParAffixe

(static) addPolygon(options) → {Promise.<undefined>|CPolygone}

Description:
  • Adds a polygon vertexes of which are given in the array points (array of the vertexes points names) syntax addPolygon(points), addPolygon(points, color), addPolygon(points, color, lineStyle) or addPolygon(points, color, lineStyle, thickness) is allowed where points is an array of points or name of points

Source:
Parameters:
Name Type Description
options Object
Properties
Name Type Attributes Default Description
points Array.<string>

array of the vertexes points names of the polygon

lineStyle string <optional>
line

Line style (line|-|dot|.|dashdash|--|dashdotdot|-..|dashdotdotdot|-...|dashdashdash|---)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

thickness number <optional>
1

Stroke thickness

hidden boolean <optional>
false

true to get the polygon masked

tag string <optional>

Tag to be applied on the created polygon (if present)

Returns:

the created polygon if isPromiseMode is false else promise that will be resolved when the object is displayed

Type
Promise.<undefined> | CPolygone

(static) addRay(options) → {Promise.<undefined>|CDemiDroite}

Description:
  • Adds the ray [o,a) syntax addRay(o, a), addRay(o, a, color), addRay(o, a, color, lineStyle) or addRay(o, a, color, lineStyle, thickness) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
o CPt | string

Point or point name of the starting edge of the ray

a CPt | string

Point or point name the ray is going through

lineStyle string <optional>
line

Line style (line|-|dot|.|dashdash|--|dashdotdot|-..|dashdotdotdot|-...|dashdashdash|---)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

thickness number <optional>
1

Stroke thickness

hidden boolean <optional>
false

true to get the created ray masked

tag string <optional>

Tag to be applied on the created vector (if present)

Returns:

The created ray if isPromiseMode is false or promise that will be resolved when the ray is displayed

Type
Promise.<undefined> | CDemiDroite

(static) addRayIm(options) → {Promise.<undefined>|CDroiteAB}

Description:
  • adds the image of ray d by transformation transf syntax addRayIm(d, transf), addRayIm(d, transf, name), addRayIm(d, transf, name, color), addRayIm(d, transf, name, color, lineStyle) or addRayIm(d, transf, name, color, lineStyle, thickness) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
d CDemiDroite

the ray that is to be transformed

transf CTransformation

the transformation to aplly on ray d

lineStyle string <optional>
line

Line style (line|-|dot|.|dashdash|--|dashdotdot|-..|dashdotdotdot|-...|dashdashdash|---)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

thickness number <optional>
1

Stroke thickness

hidden boolean <optional>
false

true to get the created line masked

hiddenName boolean <optional>

true to get the created line name masked

fontSize number <optional>
16

Font size of the name

tag string <optional>

Tag to be applied on the created line (if present)

Returns:

The created line if isPromiseMode is false or romise that will be resolved when the line is displayed

Type
Promise.<undefined> | CDroiteAB

(static) addRotation(options) → {CRotation}

Description:
  • adds the rotation of center o and angle x syntax addRotation(o, x) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
o CPt | string

center of the rotation

x number | string | CValDyn

the angle of the rotation (number, object or string containing a valid formula)

Returns:
Type
CRotation

(static) addSegment(options) → {Promise.<undefined>|CSegment}

Description:
  • Adds the segment of extremities a et b syntax addSegment(a, b), addSegment(a, b, color), addSegment(a, b, color, lineStyle) or addSegment(a, b, color, lineStyle, thickness) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
a CPt | string

Point or point name of the first extremity of the segment

b CPt | string

Point or point name of the second extremity of the segment

lineStyle string <optional>
line

Line style (line|-|dot|.|dashdash|--|dashdotdot|-..|dashdotdotdot|-...|dashdashdash|---)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

thickness number <optional>
1

Stroke thickness

hidden boolean <optional>

true to get the created segment masked

tag string <optional>

Tag to be applied on the created segment (if present)

Returns:

The created segment if isPromiseMode is false or promise that will be resolved when the segment is displayed

Type
Promise.<undefined> | CSegment

(static) addSegmentMark(options) → {Promise.<undefined>}

Description:
  • Add a segment mark syntax addSegmentMark(elt, color), addSegmentMark(elt, color, segmentMarkStyle) or addSegmentMark(elt, color, segmentMarkStyle, thickness) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
elt string

The tag of the segment the mark will be applied on

color string <optional>

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

segmentMarkStyle string <optional>

Angle mark style (-|--|---|x)

lineStyle string <optional>
line

Line style (line|-|dot|.|dashdash|--|dashdotdot|-..|dashdotdotdot|-...|dashdashdash|---)

thickness number <optional>
1

thickness of the stroke

hidden boolean <optional>

true to get the mark masked

tag string <optional>

Tag to be applied on the mark (if present)

Returns:

The created point if isPromiseMode is false else promise that will be resolved when the mark is displayed

Type
Promise.<undefined>

(static) addSimilitude(options) → {CSimilitude}

Description:
  • adds the direct similitude of center o, angle x and ratio y syntax addSimilitude(o, x, y) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
o CPt | string

center of the similitude

x number | string | CValDyn

the angle of the similitude (number, object or string containing a valid formula)

y number | string | CValDyn

the ration of the similitude (number, object or string containing a valid formula)

Returns:
Type
CSimilitude

(static) addSurface(options) → {Promise.<undefined>|CSurfacePolygone}

Description:
  • Adds a surface delimited by a polygon, a circle or an arc of circle syntax addSurface(edge), addSurface(edge, color) or addSurface(edge, color, fillStyle) or addSurface(edge, color, fillStyle, opacity) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
edge string

Tag or object (polygon, circle or circle arc or point locus)

fillStyle string <optional>
transp

Filling style (transp|fill|-|vert|hor|/|)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

hidden boolean <optional>
false

true to get the created surface masked

tag string <optional>

The tag to be applied on the created surface

Returns:

the created surface if isPromiseMode is false else promise that will be resolved when the object is displayed

Type
Promise.<undefined> | CSurfacePolygone

(static) addSurfaceCircle(options) → {Promise.<undefined>|CSurfaceDisque|CSurfaceSecteurCirculaire}

Description:
  • Adds a surface delimited by a circle or a circle arc (slice of pie) syntax addSurfaceCircle(c) or addSurfaceCircle(c, color) or or addSurfaceCircle(c, color, fillStyle) or addSurfaceCircle(c, color, fillStyle, opacity) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
c string

Tag of the circle (or the circle arc)

fillStyle string <optional>
transp

Filling style (transp|fill|-|vert|hor|/|)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

hidden boolean <optional>
false

true to get the created surface masked

tag string <optional>

The tag to be applied on the created surface

Returns:

the created surface if isPromiseMode is false else promise that will be resolved when the object is displayed

Type
Promise.<undefined> | CSurfaceDisque | CSurfaceSecteurCirculaire

(static) addSurfacePoly(options) → {Promise.<undefined>|CSurfacePolygone}

Description:
  • Adds a surface delimited by a polygon syntax addSurfacePoly(poly) or addSurfacePoly(poly, color) or or addSurfacePoly(poly, color, fillStyle) or addSurfacePoly(poly, color, fillStyle, opacity) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
poly string

Tag of the polygon

fillStyle string <optional>
transp

Filling style (transp|fill|-|vert|hor|/|)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

hidden boolean <optional>
false

true to get the created surface masked

tag string <optional>

The tag to be applied on the created surface

Returns:

the created surface if isPromiseMode is false else promise that will be resolved when the object is displayed

Type
Promise.<undefined> | CSurfacePolygone

(static) addSvgListener(options)

Description:
  • Adds a listener on the doc (svg) owning the figure The callBack function accepts three parameters (event, x, y) where x and y are the coordinates of the event relative to the svg containing the figure syntax addSvgListener(eventName, callBack) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
eventName string

Name of the event the listener is to be created on

callBack EventSvgCallback

Function to be launched when the event is triggered

(static) addSymAx(options) → {CSymetrieAxiale}

Description:
  • adds the axial symmetry of center o syntax addSymAx(d) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
d CDroite | string

symmetry axis

Returns:
Type
CSymetrieAxiale

(static) addSymCent(options) → {CSymetrieCentrale}

Description:
  • adds the central symmetry of center o syntax addSymCent(o) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
o CPt | string

center of the dilation

Returns:
Type
CSymetrieCentrale

(static) addSystemOfAxis(options) → {Promise.<undefined>|CRepere}

Description:
  • Adds a system of axis defined by points o, a and b (the origin will be o) syntax addSystemOfAxis(o, a, b), addSystemOfAxis(o, a, b, color), addSystemOfAxis(o, a, b, color, lineStyle), addSystemOfAxis(o, a, b, color, lineStyle, verticalGrid), addSystemOfAxis(o, a, b, color, lineStyle, verticalGrid, horizontalGrid), addSystemOfAxis(o, a, b, , color, lineStyle, verticalGrid, horizontalGrid, hidden), allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
o CPt | string

Name (or tag if name is empty) of the point origin of the system of axis

a CPt | string

Name (or tag if name is empty) of the point of coordinates (1; 0) in the system of axis

b CPt | string

Name (or tag if name is empty) of the point of coordinates (0; 1) in the system of axis

thickness number <optional>

Thickness of the stroke

lineStyle string <optional>
line

Line style (line|-|dot|.|dashdash|--|dashdotdot|-..|dashdotdotdot|-...|dashdashdash|---)

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

hidden boolean <optional>

true to get the system of axis masked

tag string <optional>

Tag to be associated to the object created

Returns:

the created object if isPromiseMode is false else promise that will be resolved when the duplicated object is displayed

Type
Promise.<undefined> | CRepere

(static) addTest(options) → {CTestExistence}

Description:
  • Adds a existence test of a MathGraph32 dynamic real value x. This object will return 1 if x exists and 0 otherwise syntax addTest(nameCalc, x) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
nameCalc string

Name of the existence test to be created

x CValDyn | string

The numerical object existence of is to tested

Returns:

the created measure

Type
CTestExistence

(static) addTestComp(options) → {CTestExistence}

Description:
  • Adds a existence test of a MathGraph32 dynamic real value x. This object will return 1 if x exists and 0 otherwise syntax addTest(nameCalc, z) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
nameCalc string

Name of the existence test to be created

z CValDyn | string

The numerical complex object existence of is to tested

Returns:

the created measure

Type
CTestExistence

(static) addText(options) → {Promise.<undefined>}

Description:
  • Adds a text diplay located at [x,y] syntax addText(text, x, y) or addText(text, x, y, color) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
text string

The text to be displayed

x number

x-coordinate of the location the text is to be displayed at

y number | string | CValDyn

y-coordinate of the location the text is to be displayed at

offsetX number <optional>

x-shift oof the text display

offsetY number <optional>

y-shift oof the text display

absCoord boolean <optional>
false

set to true if x,y should be considered absolute in the svg (in that case rep is ignored), useless if there is no frame (in that case x,y will be considered absolute regardless of this property)

rep string <optional>

tag of the frame (system of coordinates), mandatory only if the figure contains several frames

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

hidden boolean <optional>

true to get the created text display masked

fontSize number <optional>
16

Size of the font used for the display (in pixels)

border string <optional>
none

The border style (none|simple|3D)

opaque boolean <optional>
false

true if the text or LaTeX displays erases its background. If true the color used to erase the background is the backgroundColor if present, else the background color of the figure

backgroundColor string <optional>

Background color, white by default

hAlign string <optional>

Horizontal alignment left|center|right

vAlign string <optional>

Vertical alignement top|middle|bottom

tag string <optional>

Tag to be applied on the created text display (if present)

Returns:

Promise that will be resolved when the text is displayed

Type
Promise.<undefined>

(static) addTimerButton(options)

Description:
  • adds to the top right corner of the figure two zoom buttons syntax addTimerButton(callBack, k) or addTimerButton(callBack, k, x, y) allowed where k is the increase ratio (k > 1) and callBack the used function

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Description
callBack function

function to be called by the timer

k string

Frequency of the timer to be set (in seconds)

x number | string | CValDyn <optional>

x coordinate of the top button zoom in svg coordinates

y number | string | CValDyn <optional>

y coordinate of the top button zoom in svg coordinates

tag string <optional>

Tag to be applied on the created text display (if present) returns {CCommentaire}

(static) addTranslation(options) → {CTranslation}

Description:
  • adds the translation of vector a b syntax addTranslation(a, b) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
a

origin point of the translation vector

b

ending point of the translation vector

Returns:
Type
CTranslation

(static) addTranslationxy(options) → {CTranslation}

Description:
  • adds the translation of vector with coordinates (x, y) syntax addTranslation(x, y) or addTranslation(x, y, rep) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Description
x number | string | CValDyn

origin point of the translation vector

y number | string | CValDyn

ending point of the translation vector

rep string <optional>

frame (system of coordinates) or tag of the frame, mandatory only if the figure contains several frames

Returns:
Type
CTranslation

(static) addVariable(options) → {CVariableBornee}

Description:
  • adds a variable of name nameCalc syntax addVariable(nameCalc, val, min, max, step) | `addVariable(nameCalc, val, min, max, step, dialog) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
nameCalc string

Name of the variable to be created

val number

current value of the variable

min number

mini value of the variable

max number

maxi value of the variable

step number

step value of the variable

dialog boolean

true to associate to the variable a pane with buttons +, - and =

Returns:
Type
CVariableBornee

(static) addVector(options) → {Promise.<undefined>|CVecteur}

Description:
  • Adds vector ab syntax addVector(a, b), addVector(a, b, color), addVector(a, b, color, lineStyle) or addVector(a, b, color, lineStyle, thickness) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
a CPt | string

Point or point name of the origin of the vector

b CPt | string

Point or point name of the extremety of the vector

color string <optional>
black

Color, black by default

opacity number <optional>

opacity (0 to 1), 1 by default

arrowStyle string <optional>
longfull

Arrox style (short|long|shortfull|longfull)

lineStyle string <optional>
line

Line style (line|-|dot|.|dashdash|--|dashdotdot|-..|dashdotdotdot|-...|dashdashdash|---)

thickness number <optional>
1

Stroke thickness

hidden boolean <optional>
false

true to get the created vector masked

tag string <optional>

Tag to be applied on the created vector (if present)

Returns:

The created point if isPromiseMode is false or promise that will be resolved when the vector is displayed

Type
Promise.<undefined> | CVecteur

(static) addXMeasure(options) → {CMesureX}

Description:
  • Adds the x-coordinate measure of point a in frame rep (system of coordinates) syntax addXMeasure(a, nameCalc) or addXMeasure(a, nameCalc, rep) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Description
a CPt | string

Name (or tag if name is empty) of the point the x-coordinate is wanted from

rep string <optional>

tag of the frame (system of coordinates), mandatory only if the figure contains several frames

nameCalc string

Name of the created calculation (the x-coordinate measure))

Returns:

the created measure

Type
CMesureX

(static) addYMeasure(options) → {CMesureY}

Description:
  • Adds the y-coordinate measure of point a in frame rep (system of coordinates) syntax addYMeasure(a, nameCalc) or addYMeasure(a, nameCalc, rep) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Description
a CPt | string

Name (or tag if name is empty) of the point the y-coordinate is wanted from

nameCalc string

Name of the created calculation (the y-coordinate measure))

rep string <optional>

tag of the frame (system of coordinates), mandatory only if the figure contains several frames

Returns:

the created measure

Type
CMesureY

(static) addZMeasure(options) → {CMesureAffixe}

Description:
  • Adds the affix measure of point a in frame rep (system of coordinates) syntax addZMeasure(a, nameCalc) or addZMeasure(a, nameCalc, rep) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Description
a CPt | string

Name (or tag if name is empty) of the point the affix is wanted from

rep string <optional>

tag of the frame (system of coordinates), mandatory only if the figure contains several frames

nameCalc string

Name of the created calculation (the affix measure))

Returns:

the created measure

Type
CMesureAffixe

(static) addZoomButtons(options)

Description:
  • adds to the top right corner of the figure two zoom buttons syntax addZoomButtons(k) allowed where k is the increase ratio (k > 1)

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
k string

Increase zoom ratio (k > 1)

(static) deleteAfter(options) → {Promise.<undefined>|void}

Description:
  • Destroys all objets form elt, including display of the destroyed objects syntax deleteAfter(elt) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Description
elt string

Tag of the element objects following will be destroyed

x number | string | CValDyn <optional>

optional delay (in seconds) in the display before destroying the elements

Returns:
Type
Promise.<undefined> | void

(static) deleteElt(options)

Description:
  • Destroys the graphical object of tag elt (along with objects depending on it) syntax deleteElt(elt) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
elt string

Tag of the graphical object to be destroyed

(static) deleteObj(obj)

Description:
  • destroys object obj alons with its dependant objects and their graphical implementation syntax deleteObj(obj) allowed

Source:
Parameters:
Name Type Description
obj

the ojject to be destroyed (an object created via MathGraph32 API)

(static) displayOnTop(options) → {Promise.<void>}

Description:
  • Reclasses the graphic representation on elt at the top of the displayed elements syntax displayOnTop(elt) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
elt string

object (or tag) display si to be reclassed on top

Returns:
Type
Promise.<void>

(static) fixPoint(options)

Description:
  • Pins (fixes) point a so that this point is no longer movable with the mouse syntax fixPoint(a) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
a CPt | string

Name (or tag if name is empty) of the point to be pinned

(static) getBase64Code() → {string}

Description:
  • Returns the Base 64 code of the current figure For the player use setApiDoc if more than one figure is used

Source:
Returns:
Type
string

(static) getCalcName(calc) → {string}

Description:
  • returns the name of a calculation, measure or function calc

Source:
Parameters:
Name Type Description
calc Object

The calculation, measure or function object (not a string)

Returns:

the name of the calculation, measure or function

Type
string

(static) getFuncImage(options) → {number}

Description:
  • Returns the image of number x through function calc syntax getFuncImage(calc, x) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
x string

Value the image of is to be returned (lust be a number)

calc string

Name of the function used to calculate the iamge of x

Returns:

the iage of x through function calc

Type
number

(static) getMatValue(mat) → {Array.<Array.<number>>}

Description:
  • syntax getValue(x) allowed

Source:
Parameters:
Name Type Description
mat

a MathGraph32 matrix object

Returns:

an array of array of numbers representing the matrix value

Type
Array.<Array.<number>>

(static) getPointPosition(options) → {Point}

Description:
  • returns (sync) the coordinates of point a in the frame rep (system of coordinates) if provided, otherwise in the svg coordinate system syntax getPointPosition(a) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
a CPt | string

Name (or tag if name is empty) of point a coordinates are wanted from

absCoord boolean <optional>
false

set to true if x,y should be considered absolute in the svg (in that case rep is ignored), useless if there is no frame (in that case x,y will be considered absolute regardless of this property)

rep string <optional>

tag of the frame (system of coordinates), mandatory only if the figure contains several frames

Returns:
Type
Point

(static) getValue(calcObjOrName) → {number}

Description:
  • returns the value of the real value x (calculation or measure or other real value of the figure)

Source:
Parameters:
Name Type Description
calcObjOrName string | CValDyn

The object of a real calculation or measure, or its name

Returns:
Type
number

(static) giveFormulaTo(options) → {promise}

Description:
  • give to the calculation (or function) of name nameCalc the formula formula syntax giveFormulaTo(calc, formula) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
calc string

Name of the calculation or function formula is to be modified or calculation itself

formula string

formula to be given to calculation (or function) nameCal

Returns:

the promis executed once the objects dependant on the calculation are redisplayed

Type
promise

(static) recalculate(bRandomopt)

Description:
  • Recalculates the figure

Source:
Parameters:
Name Type Attributes Default Description
bRandom boolean <optional>
false

if true random calculations are reset

(static) reclassAfter(options) → {Promise.<unknown>}

Description:
  • Reclasses object elt after object elt2 (if the reclassement is possible) elt must be defined before elt2 syntax reclassAfter(elt, elt2) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
elt string

object (or tag) to be reclassed after elt2

elt2 string

object (or tag) that is to be reclassed after

Returns:
Type
Promise.<unknown>

(static) reclassBefore(options) → {Promise.<unknown>}

Description:
  • Reclasses object elt before object elt2 (if the reclassement is possible) elt must be defined after elt2 syntax reclassBefore(elt, elt2) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
elt string

object (or tag) to be reclassed before elt2

elt2 string

object (or tag) elt ist to be reclassed before

Returns:
Type
Promise.<unknown>

(static) reclassMax(options) → {Promise.<unknown>}

Description:
  • Reclasses object of tag elt as far as possible towards the end of the list of created objects syntax reclassMax(elt) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
elt string

object (or tag) to be reclassed

Returns:
Type
Promise.<unknown>

(static) reclassMin(options) → {Promise.<unknown>}

Description:
  • Reclasses object of tag elt as far as possible towards the beginning of the list of created objects syntax reclassMin(elt) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
elt string

Tobject (or tag) to be reclassed

Returns:
Type
Promise.<unknown>

(static) releasePoint(options)

Description:
  • Releases a point that was pinned before (so the point can be captured with the mouse) syntax releasePoint(a) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
a CPt | string

Name (or tag if name is empty) of the point to be unpinned

(static) removeEltListener(options)

Description:
  • Removes an event listener from a graphical object of the figure syntax removeEltListener(elt, eventName) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
elt string

Tag of the graphical object the listener is to be removed from

eventName string

Name of the event

Description:
  • Withdraw the link of linked point a (thus a become a free point) syntax removePointLink(a) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
a CPt | string

Name (or tag if name is empty) of the point to be unlinked

(static) removeSvgListener(options)

Description:
  • Removes a listener from the doc (svg) owning the figure syntax removeSvgListener(eventName) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
eventName string

Name of the event the listener is to be removed from

(static) setApiDoc(idDocopt) → {void}

Description:
  • Change the current figure (the figure the following api methods will apply on), only for the MtgAppLecteurApi

Source:
Parameters:
Name Type Attributes Description
idDoc string <optional>

If idDoc is not given, the first doc is taken

Returns:
Type
void

(static) setBackgroundColor(options, options)

Description:
  • Assigns a background color to a text or LaTeX display syntax setBackgroundColor(elt, backgroundColor) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
elt string

object (or tag) backgroundColor is to be applied on

backgroundColor Color

The background color to be applied on the object

options

(static) setColor(options)

Description:
  • Assigns a color to an object syntax setColor(elt, color) or setColor(elt, color, opacity) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Description
elt string

object (or tag) color must be applied on

color Color

The color to be applied on the object

opacity number <optional>

opacity (0 to 1), 1 by default

(static) setFig(optionsopt) → {Promise.<void>}

Description:
  • Load a new figure (empty if not provided)

Source:
Parameters:
Name Type Attributes Description
options Object <optional>
Properties
Name Type Attributes Default Description
container HTMLElement <optional>

The container bound to contain the created svg (mandatory for the mtgApp player if id isn't given, when there is not yet any document, ignored otherwise)

id string <optional>

id (MtgApp player only) id of the figure to be replaced or created

fig string <optional>

The base 64 code of the figure

removeAllDoc boolean <optional>
false

true to delete all the alredy existing figures of a MtgAp player before the creation of this one (nor accounted for in case of an MtgApp)

width number <optional>
500
height number <optional>
300
Returns:

Promise that will be resolved when the new figure is displayed

Type
Promise.<void>

(static) setFreePointPosition(options)

Description:
  • Gives to the free point named a the coordinates x, y syntax setFreePointPosition(a, x, y) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
a CPt | string

Name of the free point coordinates are to be changed

x number

Value of the new x coordinate of the free point in the svg

y number | string | CValDyn

Value of the new y coordinate of the free point in the svg

(static) setHidden(options)

Description:
  • Set the object of tag elt masked (if not already masked) syntax setHidden(elt) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
elt string

Tag of the object taht is to become massked

(static) setLineStyle(options)

Description:
  • Assigns a line style to an object syntax setLineStyle(elt, lineStyle) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
elt string

Tag of the object line style of which is to be changed

lineStyle string

Line style to be applied on the object (line|-|dot|.|dashdash|--|dashdotdot|-..|dashdotdotdot|-...|dashdashdash|---)

(static) setLinkPointPoint(options)

Description:
  • Replaces a free point by a point linked to another existing point syntax setLinkPointPoint(a, b) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
a CPt | string

Name (or tag if name is empty) of the free point that is to be linked to another point

b CPt | string

Name (or tag if name is empty) of the point the free point is to be linked to

(static) setMarked(options)

Description:
  • once executed, point a will leave a trace of its positions (if trace mode is acivated) syntax setMarked(a) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
a CPt | string

Point (or point name) that is bound to leave a trace of its positions

(static) setPointNameOffset(options)

Description:
  • modify the name position of point a (the default position is under the point, the right and under the point syntax setPointNameOffset(a, offsetX, offsetY) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
a CPt | string

name (or tag if name is empty) of the point name of which is to be repositionned

offsetX number

new x-shift of the name

offsetY number

new x-shift of the name

(static) setPointStyle(options)

Description:
  • gives to point a the point style point style syntax setPointStyle(a, pointStyle) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
a CPt | string

name (or tag if name is empty) of the point pointStyle is to be assigned to

pointStyle string <optional>
O

the point style (o|O|OO|x|X|+|<>|[]|.) or (littleround|round|biground|mult|bigmult|cross|diamond|square|pixel|)

(static) setThickness(options)

Description:
  • Assigns a stroke thickness to an object syntax setThickness(elt, thickness) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
elt string

Tag of the object thickness of which is to be changed

thickness number

Stroke thickness to be applied on the object

(static) setUnity(options)

Description:
  • Adds a unity length to the figure (throws an error if a unity length is already present in the figure) Once a unity length is present in the figure, you can create length measures, circles by radius syntax setUnity(a, b) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
a CPt | string

Name (or tag if name is empty) of point a (first extremity of the unity length)

b CPt | string

Name (or tag if name is empty) of point b (second extremity of the unity length)

(static) setVisible(options)

Description:
  • Set the object of tag elt visible (if not already visible) syntax setVisible(elt) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
elt string

Tag of the object taht is to become visible

(static) translateFig(options)

Description:
  • Translates all the figure with a vector of coordinates (x; y) syntax translateFig(x, y) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Description
x number

x-coordinate of the translation (svg coordinates)

y number | string | CValDyn

y-coordinate of the translation (svg coordinates)

(static) updateDependantDisplay(obj)

Description:
  • Re-displays the figure elements depending on elt syntax updateDependantDisplay(elt) allowed

Source:
Parameters:
Name Type Description
obj CElementBase

(static) updateFigDisplay()

Description:
  • Re-displays the elements of the figure.

Source:

(static) zoomFig(options)

Description:
  • Modifies the framing of the figure (by zooming from a point with a given ratio) syntax zoom(x, y, k) allowed

Source:
Parameters:
Name Type Description
options ApiOptions
Properties
Name Type Attributes Default Description
x number

x-coordinate of the center for zooming-unzooming

y number | string | CValDyn

y-coordinate of the center for zooming-unzooming

k number

zoom ratio

absCoord boolean <optional>
false

set to true if x,y should be considered absolute in the svg (in that case rep is ignored), useless if there is no frame (in that case x,y will be considered absolute regardless of this property). Useless if the figure has no frame.

rep string <optional>

tag of the frame (system of coordinates), mandatory only if the figure contains several frames