// // time: Fri Aug 30 14:37:06 1996 // // version: 3.0.0 (format), 3.1.2 (DX) // // // Begin MDF // MODULE ScaleBar // CATEGORY Annotation // DESCRIPTION Displays a scale bar with an object. // INPUT scale_length; value list or field; 1.0; // INPUT text_scale; object; 1.0; // INPUT text; object; {" 0"," 50"," 100km"}; // INPUT font; object; "variable"; // INPUT color; object; "white"; // INPUT label_offset; object; [0,0,0]; // OUTPUT scalebar; group; // End MDF // // comment: ScaleBar macro // comment: ------------- // comment: // comment: (C) Duncan Galloway 1996 // comment: duncang@ibm590.aims.gov.au // comment: // comment: This macro creates a scale bar of user-defined length which can be incorporated into an image. The scalebar is 10 units long and has labels (which can be changed by the user) at each end and in the middle. The base colour can also be changed. // workspace: width = 625, height = 1361 // layout: snap = 0, width = 50, height = 50, align = UL // macro ScaleBar( scale_length = 1.0 ,text_scale = 1.0 ,text = {" 0"," 50"," 100km"} ,font = "variable" ,color = "white" ,label_offset = [0,0,0] ) -> ( scalebar ) { // // node Construct[1]: x = 27, y = 0, inputs = 4, label = Construct // input[1]: defaulting = 0, visible = 1, type = 16777224, value = {[0,0]} // input[2]: defaulting = 0, visible = 1, type = 16777224, value = {[-0.033,0],[0,0.1]} // input[3]: defaulting = 0, visible = 1, type = 8, value = [3 11] // input[4]: defaulting = 0, visible = 1, type = 16777245, value = {0.0 1.0 0.0 1.0 0.0 1.0 0.0 1.0 0.0 1.0 1.0 0.0 1.0 0.0 1.0 0.0 1.0 0.0 1.0 0.0} // ScaleBar_Construct_1_out_1 = Construct( {[0,0]}, {[-0.033,0],[0,0.1]}, [3 11], {0.0 1.0 0.0 1.0 0.0 1.0 0.0 1.0 0.0 1.0 1.0 0.0 1.0 0.0 1.0 0.0 1.0 0.0 1.0 0.0} ) [instance: 1, cache: 1]; // // node Mark[13]: x = 66, y = 83, inputs = 2, label = Mark // input[2]: defaulting = 0, visible = 1, type = 32, value = "positions" // ScaleBar_Mark_13_out_1 = Mark( ScaleBar_Construct_1_out_1, "positions" ) [instance: 13, cache: 1]; // // node Input[1]: x = 148, y = 16, inputs = 0, label = Input // parameter: position = 1, name = 'scale_length', value = '1.0', descriptive = 0, description = ' ', required = 0, visible = 1 // ScaleBar_Input_1_out_1 = scale_length; // // node Compute[109]: x = 83, y = 156, inputs = 3, label = Compute // input[1]: defaulting = 0, visible = 0, type = 32, value = "$0*$1" // expression: value = a*b // name[2]: value = a // name[3]: value = b // ScaleBar_Compute_109_out_1 = Compute( "$0*$1", ScaleBar_Mark_13_out_1, ScaleBar_Input_1_out_1 ) [instance: 109, cache: 1]; // // node Unmark[9]: x = 68, y = 235, inputs = 2, label = Unmark // input[2]: defaulting = 0, visible = 1, type = 32, value = "positions" // ScaleBar_Unmark_9_out_1 = Unmark( ScaleBar_Compute_109_out_1, "positions" ) [instance: 9, cache: 1]; // // node Input[5]: x = 463, y = 16, inputs = 0, label = Input // parameter: position = 5, name = 'color', value = '"white"', descriptive = 0, description = ' ', required = 0, visible = 1 // ScaleBar_Input_5_out_1 = color; // // node Transmitter[16]: x = 461, y = 130, inputs = 1, label = color // color = ScaleBar_Input_5_out_1; // // node Receiver[16]: x = 255, y = 217, inputs = 1, label = color // ScaleBar_Receiver_16_out_1 = color; // // node Color[6]: x = 80, y = 323, inputs = 5, label = Color // ScaleBar_Color_6_out_1 = Color( ScaleBar_Unmark_9_out_1, ScaleBar_Receiver_16_out_1, NULL, NULL, NULL ) [instance: 6, cache: 1]; // // node Replace[10]: x = 58, y = 417, inputs = 4, label = Replace // input[3]: defaulting = 0, visible = 1, type = 32, value = "data" // input[4]: defaulting = 0, visible = 1, type = 32, value = "opacities" // ScaleBar_Replace_10_out_1 = Replace( ScaleBar_Color_6_out_1, ScaleBar_Color_6_out_1, "data", "opacities" ) [instance: 10, cache: 1]; // // node ShowConnections[2]: x = 185, y = 321, inputs = 1, label = ShowConnections // ScaleBar_ShowConnections_2_out_1 = ShowConnections( ScaleBar_Unmark_9_out_1 ) [instance: 2, cache: 1]; // // node Color[5]: x = 239, y = 406, inputs = 5, label = Color // ScaleBar_Color_5_out_1 = Color( ScaleBar_ShowConnections_2_out_1, ScaleBar_Receiver_16_out_1, NULL, NULL, NULL ) [instance: 5, cache: 1]; // // node Collect[6]: x = 113, y = 515, inputs = 2, label = Collect // ScaleBar_Collect_6_out_1 = Collect( ScaleBar_Replace_10_out_1, ScaleBar_Color_5_out_1 ) [instance: 6, cache: 1]; // // node Input[3]: x = 302, y = 16, inputs = 0, label = Input // parameter: position = 3, name = 'text', value = '{" 0"," 50"," 100km"}', descriptive = 0, description = ' ', required = 0, visible = 1 // ScaleBar_Input_3_out_1 = text; // // node Transmitter[14]: x = 312, y = 136, inputs = 1, label = text // text = ScaleBar_Input_3_out_1; // // node Receiver[14]: x = 169, y = 665, inputs = 1, label = text // ScaleBar_Receiver_14_out_1 = text; // // node Post[2]: x = 181, y = 517, inputs = 2, label = Post // ScaleBar_Post_2_out_1 = Post( ScaleBar_Replace_10_out_1, NULL ) [instance: 2, cache: 1]; // // node Slab[1]: x = 159, y = 598, inputs = 4, label = Slab // input[2]: defaulting = 0, visible = 1, type = 1, value = NULL // input[3]: defaulting = 0, visible = 1, type = 1, value = 0 // input[4]: defaulting = 0, visible = 1, type = 1, value = 0 // ScaleBar_Slab_1_out_1 = Slab( ScaleBar_Post_2_out_1, NULL, 0, 0 ) [instance: 1, cache: 1]; // // node Reduce[1]: x = 209, y = 667, inputs = 2, label = Reduce // input[2]: defaulting = 0, visible = 1, type = 16777221, value = { 3.666667 } // ScaleBar_Reduce_1_out_1 = Reduce( ScaleBar_Slab_1_out_1, { 3.666667 } ) [instance: 1, cache: 1]; // // node Replace[9]: x = 193, y = 738, inputs = 4, label = Replace // input[3]: visible = 0 // input[4]: visible = 0 // ScaleBar_Replace_9_out_1 = Replace( ScaleBar_Receiver_14_out_1, ScaleBar_Reduce_1_out_1, NULL, NULL ) [instance: 9, cache: 1]; // // node Mark[14]: x = 174, y = 833, inputs = 2, label = Mark // input[2]: defaulting = 0, visible = 1, type = 32, value = "positions" // ScaleBar_Mark_14_out_1 = Mark( ScaleBar_Replace_9_out_1, "positions" ) [instance: 14, cache: 1]; // // node Input[6]: x = 544, y = 14, inputs = 0, label = Input // parameter: position = 6, name = 'label_offset', value = '[0,0,0]', descriptive = 0, description = ' ', required = 0, visible = 1 // ScaleBar_Input_6_out_1 = label_offset; // // node Transmitter[17]: x = 544, y = 129, inputs = 1, label = label_offset // label_offset = ScaleBar_Input_6_out_1; // // node Receiver[18]: x = 248, y = 805, inputs = 1, label = label_offset // ScaleBar_Receiver_18_out_1 = label_offset; // // node Compute[110]: x = 181, y = 901, inputs = 3, label = Compute // input[1]: defaulting = 0, visible = 0, type = 32, value = "[$0.x,$0.y,0]+$1" // expression: value = [a.x,a.y,0]+b // name[2]: value = a // name[3]: value = b // ScaleBar_Compute_110_out_1 = Compute( "[$0.x,$0.y,0]+$1", ScaleBar_Mark_14_out_1, ScaleBar_Receiver_18_out_1 ) [instance: 110, cache: 1]; // // node Unmark[10]: x = 175, y = 977, inputs = 2, label = Unmark // input[2]: defaulting = 0, visible = 1, type = 32, value = "positions" // ScaleBar_Unmark_10_out_1 = Unmark( ScaleBar_Compute_110_out_1, "positions" ) [instance: 10, cache: 1]; // // node Input[4]: x = 373, y = 18, inputs = 0, label = Input // parameter: position = 4, name = 'font', value = '"variable"', descriptive = 0, description = ' ', required = 0, visible = 1 // ScaleBar_Input_4_out_1 = font; // // node Transmitter[15]: x = 372, y = 136, inputs = 1, label = font // font = ScaleBar_Input_4_out_1; // // node Receiver[15]: x = 297, y = 884, inputs = 1, label = font // ScaleBar_Receiver_15_out_1 = font; // // node Format[1]: x = 275, y = 970, inputs = 3, label = Format // input[1]: defaulting = 0, visible = 1, type = 32, value = "text font=%s" // ScaleBar_Format_1_out_1 = Format( "text font=%s", ScaleBar_Receiver_15_out_1, NULL ) [instance: 1, cache: 1]; // // node Input[2]: x = 217, y = 19, inputs = 0, label = Input // parameter: position = 2, name = 'text_scale', value = '1.0', descriptive = 0, description = ' ', required = 0, visible = 1 // ScaleBar_Input_2_out_1 = text_scale; // // node Transmitter[13]: x = 210, y = 126, inputs = 1, label = textscale // textscale = ScaleBar_Input_2_out_1; // // node Receiver[13]: x = 395, y = 975, inputs = 1, label = textscale // ScaleBar_Receiver_13_out_1 = textscale; // // node Glyph[3]: x = 257, y = 1060, inputs = 7, label = Glyph // ScaleBar_Glyph_3_out_1 = Glyph( ScaleBar_Unmark_10_out_1, ScaleBar_Format_1_out_1, NULL, ScaleBar_Receiver_13_out_1, NULL, NULL, NULL ) [instance: 3, cache: 1]; // // node Receiver[17]: x = 477, y = 1013, inputs = 1, label = color // ScaleBar_Receiver_17_out_1 = color; // // node Color[7]: x = 321, y = 1138, inputs = 5, label = Color // ScaleBar_Color_7_out_1 = Color( ScaleBar_Glyph_3_out_1, ScaleBar_Receiver_17_out_1, NULL, NULL, NULL ) [instance: 7, cache: 1]; // // node Collect[7]: x = 229, y = 1225, inputs = 2, label = Collect // ScaleBar_Collect_7_out_1 = Collect( ScaleBar_Collect_6_out_1, ScaleBar_Color_7_out_1 ) [instance: 7, cache: 1]; // // node Output[2]: x = 236, y = 1298, inputs = 1, label = Output // parameter: position = 1, name = 'scalebar', value = ' ', descriptive = 0, description = ' ', required = 0, visible = 1 // scalebar = ScaleBar_Collect_7_out_1; // network: end of macro body } ScaleBar_Construct_1_out_1 = NULL; ScaleBar_Mark_13_out_1 = NULL; ScaleBar_Input_1_out_1 = NULL; ScaleBar_Compute_109_out_1 = NULL; ScaleBar_Unmark_9_out_1 = NULL; ScaleBar_Input_5_out_1 = NULL; ScaleBar_Transmitter_16_out_1 = NULL; ScaleBar_Receiver_16_out_1 = NULL; ScaleBar_Color_6_out_1 = NULL; ScaleBar_Replace_10_out_1 = NULL; ScaleBar_ShowConnections_2_out_1 = NULL; ScaleBar_Color_5_out_1 = NULL; ScaleBar_Collect_6_out_1 = NULL; ScaleBar_Input_3_out_1 = NULL; ScaleBar_Transmitter_14_out_1 = NULL; ScaleBar_Receiver_14_out_1 = NULL; ScaleBar_Post_2_out_1 = NULL; ScaleBar_Slab_1_out_1 = NULL; ScaleBar_Reduce_1_out_1 = NULL; ScaleBar_Replace_9_out_1 = NULL; ScaleBar_Mark_14_out_1 = NULL; ScaleBar_Input_6_out_1 = NULL; ScaleBar_Transmitter_17_out_1 = NULL; ScaleBar_Receiver_18_out_1 = NULL; ScaleBar_Compute_110_out_1 = NULL; ScaleBar_Unmark_10_out_1 = NULL; ScaleBar_Input_4_out_1 = NULL; ScaleBar_Transmitter_15_out_1 = NULL; ScaleBar_Receiver_15_out_1 = NULL; ScaleBar_Format_1_out_1 = NULL; ScaleBar_Input_2_out_1 = NULL; ScaleBar_Transmitter_13_out_1 = NULL; ScaleBar_Receiver_13_out_1 = NULL; ScaleBar_Glyph_3_out_1 = NULL; ScaleBar_Receiver_17_out_1 = NULL; ScaleBar_Color_7_out_1 = NULL; ScaleBar_Collect_7_out_1 = NULL;