/usr/share/ncarg/nclex/textitem/tx04n.ncl is in libncarg-data 6.1.2-7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 | ;
; $Id: tx04n.ncl,v 1.11 2010-03-15 22:49:24 haley Exp $
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; ;
; Copyright (C) 1995 ;
; University Corporation for Atmospheric Research ;
; All Rights Reserved ;
; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; File: tx04c.c
;
; Author: Jeff Boote
; National Center for Atmospheric Research
; PO 3000, Boulder, Colorado
;
; Date: Tue Jan 24 10:44:51 MST 1995
;
; Description: Demonstrates TextItem object.
;
;
; Begin NCL script.
;
begin
;
; Create an application context. Set the app dir to the current directory
; so the application looks for the resource file the directory it executes
; from.
;
app_id = create "tx04" appClass defaultapp
"appDefaultParent" : True
"appUsrDir" : "./"
end create
;
; Default output is to an X workstation.
;
wks_type = "x11"
if (str_lower(wks_type).eq."ncgm") then
;
; Create an ncgmWorkstation object.
;
workstation_id = create "tx04Work" ncgmWorkstationClass defaultapp
"wkMetaName" : "tx04n.ncgm"
end create
end if
if (str_lower(wks_type).eq."x11") then
;
; Create an X11 workstation.
;
workstation_id = create "tx04Work" windowWorkstationClass defaultapp
"wkPause" : True
end create
end if
if (str_lower(wks_type).eq."oldps") then
;
; Create an older-style PostScript workstation.
;
workstation_id = create "tx04Work" psWorkstationClass defaultapp
"wkPSFileName" : "tx04n.ps"
end create
end if
if (str_lower(wks_type).eq."oldpdf") then
;
; Create an older-style PDF workstation.
;
workstation_id = create "tx04Work" pdfWorkstationClass defaultapp
"wkPDFFileName" : "tx04n.pdf"
end create
end if
if (str_lower(wks_type).eq."pdf".or.str_lower(wks_type).eq."ps") then
;
; Create a cairo PS/PDF Workstation object.
;
workstation_id = create "tx04Work" documentWorkstationClass defaultapp
"wkFileName" : "tx04n"
"wkFormat" : wks_type
end create
end if
if (str_lower(wks_type).eq."png") then
;
; Create a cairo PNG Workstation object.
;
workstation_id = create "tx04Work" imageWorkstationClass defaultapp
"wkFileName" : "tx04n"
"wkFormat" : wks_type
end create
end if
;
; This is the only creation of a text object for this entire program.
;
text_item_id = create "tx04TextItem" textItemClass workstation_id
"txJust" : 4
"txFont" : 25
"txFontHeightF" : .03
"txString" : "TextItem - VARIOUS CAPABILITIES"
"txPosXF" : .5
"txPosYF" : .95
end create
draw(text_item_id)
setvalues text_item_id
"txFontHeightF" : .015
"txPosXF" : .7
"txPosYF" : .86
"txString" : "HIGH-QUALITY CHARACTERS USED BELOW"
end setvalues
draw(text_item_id)
setvalues text_item_id
"txPosXF" : .7
"txPosYF" : .5
"txString" : "MEDIUM-QUALITY CHARACTERS USED BELOW"
end setvalues
draw(text_item_id)
setvalues text_item_id
"txPosXF" : .58
"txPosYF" : .81
"txString" : "NhlNtxString"
end setvalues
draw(text_item_id)
setvalues text_item_id
"txPosYF" : .46
end setvalues
draw(text_item_id)
setvalues text_item_id
"txPosXF" : .82
"txPosYF" : .81
"txString" : "RESULT"
end setvalues
draw(text_item_id)
setvalues text_item_id
"txPosYF" : .46
end setvalues
draw(text_item_id)
setvalues text_item_id
"txPosXF" : .82
"txPosYF" : .78
"txString" : "------"
end setvalues
draw(text_item_id)
setvalues text_item_id
"txPosYF" : .43
end setvalues
draw(text_item_id)
setvalues text_item_id
"txPosXF" : .58
"txPosYF" : .78
"txString" : "------------"
end setvalues
draw(text_item_id)
setvalues text_item_id
"txPosYF" : .43
end setvalues
draw(text_item_id)
;
; Below are examples using the function control characters. In each iteration
; of the loop a new string is set using NhlSetValues. In order to demonstrate
; what the value of NhlNtxString is the function code is temporarily changed
; causing the entire contents of NhlNtxString to be drawn
;
do i=0,11
if (i .eq. 0)
setvalues text_item_id
"txString" : "~L~A"
end setvalues
end if
if (i .eq. 1)
setvalues text_item_id
"txString" : "~IGL~A"
end setvalues
end if
if (i .eq. 2)
setvalues text_item_id
"txString" : "A~S~2~N~+B~S~2~N~"
end setvalues
end if
if (i .eq. 3)
setvalues text_item_id
"txString" : "A~S~B"
end setvalues
end if
if (i .eq. 4)
setvalues text_item_id
"txString" : "A~SPU~B"
end setvalues
end if
if (i .eq. 5)
setvalues text_item_id
"txString" : "~GIU~+"
end setvalues
end if
if (i .eq. 6)
setvalues text_item_id
"txString" : "~1045~"
end setvalues
end if
if (i .eq. 7)
setvalues text_item_id
"txString" : "10~S~10~S~100"
end setvalues
end if
if (i .eq. 8)
setvalues text_item_id
"txString" : "X~B1~2~S1~3"
end setvalues
end if
if (i .eq. 9)
setvalues text_item_id
"txString" : "X~B1~2~S~3~N~Y~S~2"
end setvalues
end if
if (i .eq. 10)
setvalues text_item_id
"txString" : "X~S~A~B~1~NN~ABC"
end setvalues
end if
if (i .eq. 11)
setvalues text_item_id
"txString" : "1.3648~L1~410~S~-13"
end setvalues
end if
;
; Change function code so full string will be drawn
;
setvalues text_item_id
"txFuncCode" : "$"
"txFontHeightF" : .01
"txPosXF" : .58
"txPosYF" : .78 - (i+1) * .02
end setvalues
draw(text_item_id)
;
; Change function code back so result string will be drawn
;
setvalues text_item_id
"txFuncCode" : "~"
"txPosXF" : .82
end setvalues
draw(text_item_id)
;
; Change to medium font quality and set function code so full string will be
; drawn
;
setvalues text_item_id
"txFontQuality" : "Medium"
"txFuncCode" : "$"
"txPosXF" : .58
"txPosYF" : .42 - (i+1) * .02
end setvalues
draw(text_item_id)
;
; Change function code back to get result string to draw
;
setvalues text_item_id
"txFuncCode" : "~"
"txPosXF" : .82
end setvalues
draw(text_item_id)
setvalues text_item_id
"txFontQuality" : "High"
end setvalues
end do
;
; Examples of setting font height.
;
setvalues text_item_id
"txPosXF" : .25
"txPosYF" : .86
"txFontHeightF" : .01
"txString" : "NhlNtxFontHeightF = .01"
end setvalues
draw(text_item_id)
setvalues text_item_id
"txPosXF" : .25
"txPosYF" : .84
"txFontHeightF" : .015
"txString" : "NhlNtxFontHeightF = .015"
end setvalues
draw(text_item_id)
setvalues text_item_id
"txPosXF" : .25
"txPosYF" : .80
"txFontHeightF" : .02
"txString" : "NhlNtxFontHeightF = .02"
end setvalues
draw(text_item_id)
setvalues text_item_id
"txPosXF" : .25
"txPosYF" : .75
"txFontHeightF" : .025
"txString" : "NhlNtxFontHeightF = .025"
end setvalues
draw(text_item_id)
;
; Examples setting the rotation angle of the text
;
setvalues text_item_id
"txPosXF" : .26
"txPosYF" : .47
"txFontHeightF" : .015
"txJust" :1
"txString" : "NhlNtxAngleF = 0.0"
"txAngleF" : 0.0
end setvalues
draw(text_item_id)
setvalues text_item_id
"txPosXF" : .26
"txPosYF" : .5
"txString" : "NhlNtxAngleF = 45.0"
"txAngleF" : 45.0
end setvalues
draw(text_item_id)
setvalues text_item_id
"txPosXF" : .23
"txPosYF" : .50
"txString" : "NhlNtxAngleF = 90.0"
"txAngleF" : 90.0
end setvalues
draw(text_item_id)
setvalues text_item_id
"txPosXF" : .20
"txPosYF" : .5
"txString" : "NhlNtxAngleF = 135.0"
"txAngleF" : 135.0
end setvalues
draw(text_item_id)
setvalues text_item_id
"txPosXF" : .20
"txPosYF" : .47
"txString" : "NhlNtxAngleF = 180.0"
"txAngleF" : 180.0
end setvalues
draw(text_item_id)
setvalues text_item_id
"txPosXF" : .20
"txPosYF" : .44
"txString" : "NhlNtxAngleF = 225.0"
"txAngleF" : 225.0
end setvalues
draw(text_item_id)
setvalues text_item_id
"txPosXF" : .23
"txPosYF" : .44
"txString" : "NhlNtxAngleF = 270.0"
"txAngleF" :270.0
end setvalues
draw(text_item_id)
setvalues text_item_id
"txPosXF" : .26
"txPosYF" : .44
"txString" : "NhlNtxAngleF = 315.0"
"txAngleF" :315.0
end setvalues
draw(text_item_id)
setvalues text_item_id
"txAngleF" : 0.0
"txPosXF" : .25
"txPosYF" : .15
"txJust" : 4
"txString" : "NhltxJust = 4"
end setvalues
draw(text_item_id)
setvalues text_item_id
"txAngleF" : 0.0
"txPosXF" : .25
"txPosYF" : .18
"txJust" : 1
"txString" : "NhltxJust = 1"
end setvalues
draw(text_item_id)
setvalues text_item_id
"txAngleF" : 0.0
"txPosXF" : .25
"txPosYF" : .12
"txJust" : 7
"txString" : "NhlNtxJust = 7"
end setvalues
draw(text_item_id)
;
; End of first frame
;
frame(workstation_id)
;
; Remainder of calls demonstrate the various fonts available for use
; with the text item. Note that the NhlNtxString values demonstrate a
; mid-string font change
;
j = 0.027
setvalues text_item_id
"txFuncCode" : "$"
"txFont" : 0
"txJust" : 4
"txFontHeightF" : .02
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "pwritx database : $F21$NhlNtxFont = 0"
end setvalues
j = j + 0.027
draw(text_item_id)
setvalues text_item_id
"txFont" : 1
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "default : $F21$NhlNtxFont = 1"
end setvalues
j = j + .027
draw(text_item_id)
setvalues text_item_id
"txFont" : 2
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "cartographic roman : $F21$NhlNtxFont = 2"
end setvalues
j = j + .027
draw(text_item_id)
setvalues text_item_id
"txFont" : 3
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "cartographic greek : $F21$NhlNtxFont = 3"
end setvalues
j = j + .027
draw(text_item_id)
setvalues text_item_id
"txFont" : 4
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "simplex roman: $F21$NhlNtxFont = 4"
end setvalues
j = j + .027
draw(text_item_id)
setvalues text_item_id
"txFont" : 5
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "simplex greek: $F21$NhlNtxFont = 5"
end setvalues
j = j + .027
draw(text_item_id)
setvalues text_item_id
"txFont" : 6
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "simplex script: $F21$NhlNtxFont = 6"
end setvalues
j = j + .027
draw(text_item_id)
setvalues text_item_id
"txFont" : 7
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "complex roman: $F21$NhlNtxFont = 7"
end setvalues
j = j + .027
draw(text_item_id)
setvalues text_item_id
"txFont" : 8
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "complex greek: $F21$NhlNtxFont = 8"
end setvalues
j = j + .027
draw(text_item_id)
setvalues text_item_id
"txFont" : 9
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "complex script: $F21$NhlNtxFont = 9"
end setvalues
j = j + .027
draw(text_item_id)
setvalues text_item_id
"txFont" : 10
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "complex script: $F21$NhlNtxFont = 10"
end setvalues
j = j + .027
draw(text_item_id)
setvalues text_item_id
"txFont" : 11
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "complex cyrillic: $F21$NhlNtxFont = 11"
end setvalues
j = j + .027
draw(text_item_id)
setvalues text_item_id
"txFont" : 12
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "duplex roman: $F21$NhlNtxFont = 12"
end setvalues
j = j + .027
draw(text_item_id)
setvalues text_item_id
"txFont" : 13
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "triplex roman: $F21$NhlNtxFont = 13"
end setvalues
j = j + .027
draw(text_item_id)
setvalues text_item_id
"txFont" : 14
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "triplex italic: $F21$NhlNtxFont = 14"
end setvalues
j = j + .027
draw(text_item_id)
setvalues text_item_id
"txFont" : 15
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "gothic german: $F21$NhlNtxFont = 15"
end setvalues
j = j + .027
draw(text_item_id)
setvalues text_item_id
"txFont" : 16
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "gothic english: $F21$NhlNtxFont = 16"
end setvalues
j = j + .027
draw(text_item_id)
setvalues text_item_id
"txFont" : 17
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "gothic italian: $F21$NhlNtxFont = 17"
end setvalues
j = j + .027
draw(text_item_id)
setvalues text_item_id
"txFont" : 18
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "math symbols: $F21$NhlNtxFont = 18"
end setvalues
j = j + .027
draw(text_item_id)
setvalues text_item_id
"txFont" : 19
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "symbols set1: $F21$NhlNtxFont = 19"
end setvalues
j = j + .027
draw(text_item_id)
setvalues text_item_id
"txFont" : 20
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "symbols set2: $F21$NhlNtxFont = 20"
end setvalues
j = j + .027
draw(text_item_id)
setvalues text_item_id
"txFont" : 21
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "helvetica: $F21$NhlNtxFont = 21"
end setvalues
j = j + .027
draw(text_item_id)
setvalues text_item_id
"txFont" : 22
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "helvetica bold: $F21$NhlNtxFont = 22"
end setvalues
j = j + .027
draw(text_item_id)
setvalues text_item_id
"txFont" : 25
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "times-roman : $F21$NhlNtxFont = 25"
end setvalues
j = j + .027
draw(text_item_id)
setvalues text_item_id
"txFont" : 26
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "times-roman bold : $F21$NhlNtxFont = 26"
end setvalues
j = j + .027
draw(text_item_id)
setvalues text_item_id
"txFont" : 29
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "courier : $F21$NhlNtxFont = 29"
end setvalues
j = j + .027
draw(text_item_id)
setvalues text_item_id
"txFont" : 30
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "courier bold : $F21$NhlNtxFont = 30"
end setvalues
j = j + .027
draw(text_item_id)
setvalues text_item_id
"txFont" : 33
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "greek : $F21$NhlNtxFont = 33"
end setvalues
j = j + .027
draw(text_item_id)
setvalues text_item_id
"txFont" : 34
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "math-symbols : $F21$NhlNtxFont = 34"
end setvalues
j = j + .027
draw(text_item_id)
setvalues text_item_id
"txFont" : 35
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "text-symbols : $F21$NhlNtxFont = 35"
end setvalues
j = j + .027
draw(text_item_id)
setvalues text_item_id
"txFont" : 36
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "weather1 : $F21$NhlNtxFont = 36"
end setvalues
j = j + .027
draw(text_item_id)
setvalues text_item_id
"txFont" : 37
"txPosXF" : .5
"txPosYF" : .95 - j
"txString" : "weather2 : $F21$NhlNtxFont = 37"
end setvalues
draw(text_item_id)
;
; End of second and final frame
;
frame(workstation_id)
;
; clean up and close hlu library
;
delete(text_item_id)
delete(workstation_id)
delete(app_id)
;
; End NCL script.
;
end
|