Making some progress: presets allow to generate some complex stuff:
Now, one last question, should the thickness of the lines be expressed as an absolute size , for instance 5px, or should it be a ratio of the spacing? Since everything that defines the dash patterns is expressed as a ratio of the thickness, having the thickness expressed as as ratio of the spacing would make the whole preset scalable by just changing the spacing.
Donning my spanish cardinal hat: one more last question: the presets are kept in a file which is loosely based on the .ini but it is not very practical. Would JSON format be too technical? All decent text editors support it:
Current INI:
The equivalent JSON would look like:
One benefit of JSON is that if you use several dash patterns you don't have to keep track of their index which is implicitly determined by their position.
Basically a "style" is an angle, a spacing and a thickness. In addition one of more dash patterns can be applied cyclically to the lines. Values can be left unspecified so that they take their value from the parameter dialog. So you can for instance have a style that is always at 45° and another one that takes whatever angle is specified in the UI.
Now, one last question, should the thickness of the lines be expressed as an absolute size , for instance 5px, or should it be a ratio of the spacing? Since everything that defines the dash patterns is expressed as a ratio of the thickness, having the thickness expressed as as ratio of the spacing would make the whole preset scalable by just changing the spacing.
Donning my spanish cardinal hat: one more last question: the presets are kept in a file which is loosely based on the .ini but it is not very practical. Would JSON format be too technical? All decent text editors support it:
Current INI:
Code:
[Complex]
angle: 45
dashPeriod1: 20
dashPeriod2: 4
dashPeriod3: 20
dashPeriod4: 4
dashPeriod5: 20
dashRatio1: 100
dashRatio5: 100
dashRatio2: 50
dashRatio3: 50
dashRatio4: 50
dashOffset1: 0
dashOffset2: 0
dashOffset3: 0
dashOffset4: 0
dashOffset5: 0
The equivalent JSON would look like:
Code:
{
"Name":"Complex",
"Angle": 45,
"Dashes": [
{
"dashPeriod":20,
"dashRatio":100,
"dashOffset":0
},
{
"dashPeriod":4,
"dashRatio":50,
"dashOffset":0
},
{
"dashPeriod":20,
"dashRatio":50,
"dashOffset":0
},
{
"dashPeriod":4,
"dashRatio":50,
"dashOffset":0
},
{
"dashPeriod":20,
"dashRatio":100,
"dashOffset":0
}
]
}
One benefit of JSON is that if you use several dash patterns you don't have to keep track of their index which is implicitly determined by their position.