Hello,
Firstly, I am working with the version 3.4.
We want to code 2 things with the ScriptHelper class in javascript :
1°) A Customized DashStyle for a pen like this :
private Pen formeLien (VgLien lie) {
Pen stylo = new Pen();
DashStyle d = null;
if (lie.getReel().equals("1")) {
d = new DashStyle (new float []{3,3}, 0);
stylo.setDashStyle(d);
} else if (lie.getReel().equals("2")) {
d = new DashStyle (new float []{2,2}, 0);
stylo.setDashStyle(d);
} else if (lie.getReel().equals("3")) {
d = new DashStyle (new float []{4,2,4}, 0);
stylo.setDashStyle(d);
}
if (lie.getCritique() == 2) {
stylo.setWidth(3);
} else if (grapheImage) {
stylo.setWidth(1);
} else {
stylo.setWidth(0);
}
stylo.setColor(invertColor (lie.getCouleur()));
return stylo;
}
2°) An AnchorPattern with specifics AnchorPoints like this :
AnchorPattern apat = new AnchorPattern(new AnchorPoint[] {new AnchorPoint(5, 0),new AnchorPoint(20, 0),
new AnchorPoint(45, 0),new AnchorPoint(50, 0),new AnchorPoint(55, 0),
new AnchorPoint(80, 0),new AnchorPoint(95, 0),
new AnchorPoint(30, 100),new AnchorPoint(45, 100),new AnchorPoint(50, 100),
new AnchorPoint(55, 100),new AnchorPoint(70, 100)}, "Process");
Is it possible with the ScriptHelper class, have we to use another class or is it impossible ?
Regards
Juan