Add some descriptive labels to the test pattern
This commit is contained in:
parent
921df08a61
commit
8e3ef0d2e4
1 changed files with 17 additions and 2 deletions
|
@ -5,6 +5,16 @@ var testDialog = {
|
|||
.setColorFill(0,0,0)
|
||||
.setColor(0,0,0);
|
||||
},
|
||||
label: func(cDefaultGroup,desc,posx,posy,rot=0) {
|
||||
cDefaultGroup.createChild("text", desc)
|
||||
.setRotation(rot*0.0174532925)
|
||||
.setTranslation(posx,posy)
|
||||
.setAlignment("center-top")
|
||||
.setFont("typewriter.txf")
|
||||
.setFontSize(40,1.5)
|
||||
.setColor(0,0,0)
|
||||
.setText(desc);
|
||||
},
|
||||
create_tbl: func(needle_tbl) {
|
||||
# hash table for needle positions
|
||||
for (var i=1; i<21; i = i+1) {
|
||||
|
@ -183,6 +193,11 @@ var testDialog = {
|
|||
var needles = testDialog.shape(cDefaultGroup);
|
||||
testDialog.draw_vario(needles,needle_tbl,400,500);
|
||||
|
||||
testDialog.label(cDefaultGroup,"TOP",400,5,0.0);
|
||||
testDialog.label(cDefaultGroup,"LEFT",5,500,-90.0);
|
||||
testDialog.label(cDefaultGroup,"RIGHT",795,500,90.0);
|
||||
testDialog.label(cDefaultGroup,"BOTTOM",400,995,180.0);
|
||||
|
||||
return m;
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue