📄 text.hasm
字号:
;; @(#)text.hasm 1.1 92/07/30 17:42:08;; Copyright (c) 1990 by Sun Microsystems, Inc.;#include "hasm_public.h";; Text test file;; Tests nearly all attributes of regular text.;; set_attribute hk_view; .fword -0.5, 0.5, 0.5, 0.5; .matrix_pair \ ; VT and IVT; < < 1.0, 0.0, 0.0, 0.0 > , \; < 0.0, 1.0, 0.0, 0.0 > , \; < 0.0, 0.0, 1.0, 0.0 > , \; < 0.0, 0.0, 0.0, 1.0 > > set_attribute hk_load_lmt .scale 0.98 ; Leave a border set_attribute hk_line_antialiasing .word TRUE set_attribute hk_text_antialiasing .word TRUE set_attribute hk_marker_antialiasing .word TRUE; set_attribute hk_z_buffer_compare .word FALSE set_attribute hk_z_buffer_update .word HK_Z_UPDATE_NONE; set_attribute hk_line_color .rgb < 0.1, 0.1, 0.3 > set_attribute hk_text_font_table .word hasm_font1 set_attribute hk_text_character_set .word 0 .word 0 set_attribute hk_text_font .word 0 .word 0; set_attribute hk_text_line_width .word 1.0 set_attribute hk_text_cap .word HK_CAP_ROUND ; Not working yet set_attribute hk_text_join .word HK_JOIN_BEVEL; set_attribute hk_text_expansion_factor .word 1.0 set_attribute hk_text_spacing .word 0.0 set_attribute hk_rtext_up_vec .word 0.0 .word 1.0 set_attribute hk_rtext_path .word HK_TP_RIGHT set_attribute hk_rtext_height .word 0.05 ; The character size; set_attribute hk_marker_size; .word 8.0; jmpl grid, r6 ; Draw a grid in the background jmpl text, r6 ; Draw the text; trap 0 ; Exit;; The text strings;text:;; First do horizontal strings;;---------------------------------------------------------------------; set_attribute hk_text_color .rgb < 0.94270333, 0.34360195, 0.32436604 > set_attribute hk_marker_color .rgb < 0.97319759, 0.58080012, 0.15425338 >; set_attribute hk_marker_type .word marker_plus; set_attribute hk_rtext_alignment .word HK_AH_LEFT ; (horizontal) .word HK_AV_TOP ; (vertical) rtext .xyz <-0.9, 1.00, 0.0 > ; Position .xyz < 1.0, 0.0, 0.0 > ; Direction 0 .xyz < 0.0, 1.0, 0.0 > ; Direction 1 .string "Left Top" polymarker 1 .xyz <-0.9, 1.00, 0.0 >;---------------------------------------------------------------------; set_attribute hk_text_color .rgb < 0.60993629, 0.82045624, 0.96044301 > set_attribute hk_marker_color .rgb < 0.37122990, 0.44787617, 0.71170769 >; set_attribute hk_marker_type .word marker_star; set_attribute hk_rtext_alignment .word HK_AH_CENTER ; (horizontal) .word HK_AV_TOP ; (vertical) rtext .xyz <-0.7, 0.90, 0.0 > ; Position .xyz < 1.0, 0.0, 0.0 > ; Direction 0 .xyz < 0.0, 1.0, 0.0 > ; Direction 1 .string "Center Top" polymarker 1 .xyz <-0.7, 0.90, 0.0 >;---------------------------------------------------------------------; set_attribute hk_text_color .rgb < 0.71504772, 0.94105874, 0.71282287 > set_attribute hk_marker_color .rgb < 0.73691476, 0.97918600, 0.80481144 >; set_attribute hk_marker_type .word marker_circle; set_attribute hk_rtext_alignment .word HK_AH_RIGHT ; (horizontal) .word HK_AV_TOP ; (vertical) rtext .xyz <-0.5, 0.80, 0.0 > ; Position .xyz < 1.0, 0.0, 0.0 > ; Direction 0 .xyz < 0.0, 1.0, 0.0 > ; Direction 1 .string "Right Top" polymarker 1 .xyz <-0.5, 0.80, 0.0 >;---------------------------------------------------------------------; set_attribute hk_text_color .rgb < 0.65336023, 0.53606662, 0.09277240 > set_attribute hk_marker_color .rgb < 0.83427568, 0.39567351, 0.07650263 >; set_attribute hk_marker_type .word marker_plus; set_attribute hk_rtext_alignment .word HK_AH_LEFT ; (horizontal) .word HK_AV_CAP ; (vertical) rtext .xyz <-0.9, 0.70, 0.0 > ; Position .xyz < 1.0, 0.0, 0.0 > ; Direction 0 .xyz < 0.0, 1.0, 0.0 > ; Direction 1 .string "Left Cap" polymarker 1 .xyz <-0.9, 0.70, 0.0 >;---------------------------------------------------------------------; set_attribute hk_text_color .rgb < 0.16907264, 0.98146137, 0.27419140 > set_attribute hk_marker_color .rgb < 0.49783831, 0.14668181, 0.29474777 >; set_attribute hk_marker_type .word marker_star; set_attribute hk_rtext_alignment .word HK_AH_CENTER ; (horizontal) .word HK_AV_CAP ; (vertical) rtext .xyz <-0.7, 0.60, 0.0 > ; Position .xyz < 1.0, 0.0, 0.0 > ; Direction 0 .xyz < 0.0, 1.0, 0.0 > ; Direction 1 .string "Center Cap" polymarker 1 .xyz <-0.7, 0.60, 0.0 >;---------------------------------------------------------------------; set_attribute hk_text_color .rgb < 0.08456371, 0.08938514, 0.63834972 > set_attribute hk_marker_color .rgb < 0.40892975, 0.06258273, 0.21914984 >; set_attribute hk_marker_type .word marker_circle; set_attribute hk_rtext_alignment .word HK_AH_RIGHT ; (horizontal) .word HK_AV_CAP ; (vertical) rtext .xyz <-0.5, 0.50, 0.0 > ; Position .xyz < 1.0, 0.0, 0.0 > ; Direction 0 .xyz < 0.0, 1.0, 0.0 > ; Direction 1 .string "Right Cap" polymarker 1 .xyz <-0.5, 0.50, 0.0 >;---------------------------------------------------------------------; set_attribute hk_text_color .rgb < 0.56318313, 0.67251902, 0.03960608 > set_attribute hk_marker_color .rgb < 0.52362614, 0.04374892, 0.48748225 >; set_attribute hk_marker_type .word marker_plus; set_attribute hk_rtext_alignment .word HK_AH_LEFT ; (horizontal) .word HK_AV_HALF ; (vertical) rtext .xyz <-0.9, 0.35, 0.0 > ; Position .xyz < 1.0, 0.0, 0.0 > ; Direction 0 .xyz < 0.0, 1.0, 0.0 > ; Direction 1 .string "Left Half" polymarker 1 .xyz <-0.9, 0.35, 0.0 >;---------------------------------------------------------------------; set_attribute hk_text_color .rgb < 0.23533383, 0.75879663, 0.42854100 > set_attribute hk_marker_color .rgb < 0.94815669, 0.49571139, 0.40772700 >; set_attribute hk_marker_type .word marker_star; set_attribute hk_rtext_alignment .word HK_AH_CENTER ; (horizontal) .word HK_AV_HALF ; (vertical) rtext .xyz <-0.7, 0.25, 0.0 > ; Position .xyz < 1.0, 0.0, 0.0 > ; Direction 0 .xyz < 0.0, 1.0, 0.0 > ; Direction 1 .string "Center Half" polymarker 1 .xyz <-0.7, 0.25, 0.0 >;---------------------------------------------------------------------; set_attribute hk_text_color .rgb < 0.75296813, 0.14907162, 0.94379363 > set_attribute hk_marker_color .rgb < 0.84574053, 0.98334730, 0.33946713 >; set_attribute hk_marker_type .word marker_circle; set_attribute hk_rtext_alignment .word HK_AH_RIGHT ; (horizontal) .word HK_AV_HALF ; (vertical) rtext .xyz <-0.5, 0.15, 0.0 > ; Position .xyz < 1.0, 0.0, 0.0 > ; Direction 0 .xyz < 0.0, 1.0, 0.0 > ; Direction 1 .string "Right Half" polymarker 1 .xyz <-0.5, 0.15, 0.0 >;---------------------------------------------------------------------; set_attribute hk_text_color .rgb < 0.92224316, 0.15241994, 0.32092850 > set_attribute hk_marker_color .rgb < 0.19643456, 0.65025825, 0.46761031 >; set_attribute hk_marker_type .word marker_plus; set_attribute hk_rtext_alignment .word HK_AH_LEFT ; (horizontal) .word HK_AV_BASE ; (vertical) rtext .xyz <-0.9, 0.00, 0.0 > ; Position .xyz < 1.0, 0.0, 0.0 > ; Direction 0 .xyz < 0.0, 1.0, 0.0 > ; Direction 1 .string "Left Base" polymarker 1 .xyz <-0.9, 0.00, 0.0 >;---------------------------------------------------------------------; set_attribute hk_text_color .rgb < 0.49118232, 0.73482196, 0.55699545 > set_attribute hk_marker_color .rgb < 0.12953204, 0.14375171, 0.61957818 >; set_attribute hk_marker_type .word marker_star; set_attribute hk_rtext_alignment .word HK_AH_CENTER ; (horizontal) .word HK_AV_BASE ; (vertical) rtext .xyz <-0.7,-0.10, 0.0 > ; Position .xyz < 1.0, 0.0, 0.0 > ; Direction 0 .xyz < 0.0, 1.0, 0.0 > ; Direction 1 .string "Center Base" polymarker 1 .xyz <-0.7,-0.10, 0.0 >;---------------------------------------------------------------------; set_attribute hk_text_color .rgb < 0.34868189, 0.70693484, 0.29209720 > set_attribute hk_marker_color .rgb < 0.38828797, 0.23056098, 0.33584611 >; set_attribute hk_marker_type .word marker_circle; set_attribute hk_rtext_alignment .word HK_AH_RIGHT ; (horizontal) .word HK_AV_BASE ; (vertical) rtext .xyz <-0.5,-0.20, 0.0 > ; Position .xyz < 1.0, 0.0, 0.0 > ; Direction 0 .xyz < 0.0, 1.0, 0.0 > ; Direction 1 .string "Right Base" polymarker 1 .xyz <-0.5,-0.20, 0.0 >;---------------------------------------------------------------------; set_attribute hk_text_color .rgb < 0.87577022, 0.46589480, 0.09464274 > set_attribute hk_marker_color .rgb < 0.30431122, 0.41405150, 0.59035414 >; set_attribute hk_marker_type .word marker_plus; set_attribute hk_rtext_alignment .word HK_AH_LEFT ; (horizontal) .word HK_AV_BOTTOM ; (vertical) rtext .xyz <-0.9,-0.30, 0.0 > ; Position .xyz < 1.0, 0.0, 0.0 > ; Direction 0 .xyz < 0.0, 1.0, 0.0 > ; Direction 1 .string "Left Bottom" polymarker 1 .xyz <-0.9,-0.30, 0.0 >;---------------------------------------------------------------------; set_attribute hk_text_color .rgb < 0.31622748, 0.13143787, 0.52545125 > set_attribute hk_marker_color .rgb < 0.78383780, 0.62262019, 0.26027320 >; set_attribute hk_marker_type .word marker_star; set_attribute hk_rtext_alignment .word HK_AH_CENTER ; (horizontal) .word HK_AV_BOTTOM ; (vertical) rtext .xyz <-0.7,-0.40, 0.0 > ; Position .xyz < 1.0, 0.0, 0.0 > ; Direction 0 .xyz < 0.0, 1.0, 0.0 > ; Direction 1 .string "Center Bottom" polymarker 1 .xyz <-0.7,-0.40, 0.0 >;---------------------------------------------------------------------; set_attribute hk_text_color .rgb < 0.34083325, 0.75215224, 0.40402491 > set_attribute hk_marker_color .rgb < 0.96041143, 0.10083412, 0.11095975 >; set_attribute hk_marker_type .word marker_circle; set_attribute hk_rtext_alignment .word HK_AH_RIGHT ; (horizontal) .word HK_AV_BOTTOM ; (vertical) rtext .xyz <-0.45,-0.50, 0.0 > ; Position .xyz < 1.0, 0.0, 0.0 > ; Direction 0 .xyz < 0.0, 1.0, 0.0 > ; Direction 1 .string "Right Bottom" polymarker 1 .xyz <-0.45,-0.50, 0.0 >;---------------------------------------------------------------------; set_attribute hk_text_color .rgb < 0.25250863, 0.48912209, 0.34152073 > set_attribute hk_marker_color .rgb < 0.58835474, 0.36489232, 0.80741553 >; set_attribute hk_marker_type .word marker_cross; set_attribute hk_rtext_alignment .word HK_AH_NORMAL ; (horizontal) .word HK_AV_NORMAL ; (vertical) rtext .xyz <-0.9,-0.60, 0.0 > ; Position .xyz < 1.0, 0.0, 0.0 > ; Direction 0 .xyz < 0.0, 1.0, 0.0 > ; Direction 1 .string "Normal Normal" polymarker 1 .xyz <-0.9,-0.60, 0.0 >;---------------------------------------------------------------------;; Now do vertical strings;; set_attribute hk_rtext_path .word HK_TP_DOWN ; Down;---------------------------------------------------------------------; set_attribute hk_text_color .rgb < 0.68299748, 0.66920354, 0.22146703 > set_attribute hk_marker_color .rgb < 0.27335162, 0.38124176, 0.38848665 >; set_attribute hk_marker_type .word marker_cross; set_attribute hk_rtext_alignment .word HK_AH_LEFT ; Left (horizontal) .word HK_AV_TOP ; Top (vertical) rtext .xyz <-0.4, 1.00, 0.0 > ; Position .xyz < 1.0, 0.0, 0.0 > ; Direction 0 .xyz < 0.0, 1.0, 0.0 > ; Direction 1 .string "Left Top" polymarker 1 .xyz <-0.4, 1.00, 0.0 >;---------------------------------------------------------------------; set_attribute hk_text_color .rgb < 0.01277738, 0.03707361, 0.40124681 > set_attribute hk_marker_color .rgb < 0.73555044, 0.03237259, 0.33625012 >; set_attribute hk_marker_type .word marker_cross; set_attribute hk_rtext_alignment .word HK_AH_CENTER ; Center (horizontal) .word HK_AV_TOP ; Top (vertical) rtext .xyz <-0.3, 1.00, 0.0 > ; Position .xyz < 1.0, 0.0, 0.0 > ; Direction 0 .xyz < 0.0, 1.0, 0.0 > ; Direction 1 .string "Center Top" polymarker 1 .xyz <-0.3, 1.00, 0.0 >;---------------------------------------------------------------------; set_attribute hk_text_color .rgb < 0.61074344, 0.34860007, 0.46768799 > set_attribute hk_marker_color .rgb < 0.13619468, 0.13243787, 0.09030818 >; set_attribute hk_marker_type .word marker_circle; set_attribute hk_rtext_alignment .word HK_AH_RIGHT ; Right (horizontal) .word HK_AV_TOP ; Top (vertical) rtext .xyz <-0.2, 1.00, 0.0 > ; Position .xyz < 1.0, 0.0, 0.0 > ; Direction 0 .xyz < 0.0, 1.0, 0.0 > ; Direction 1 .string "Right Top" polymarker 1 .xyz <-0.2, 1.00, 0.0 >;---------------------------------------------------------------------; set_attribute hk_text_color .rgb < 0.39646789, 0.47327111, 0.84246042 > set_attribute hk_marker_color .rgb < 0.80049280, 0.43368254, 0.94329454 >; set_attribute hk_marker_type .word marker_cross; set_attribute hk_rtext_alignment .word HK_AH_LEFT ; Left (horizontal) .word HK_AV_CAP ; Cap (vertical) rtext .xyz <-0.15, 1.00, 0.0 > ; Position .xyz < 1.0, 0.0, 0.0 > ; Direction 0 .xyz < 0.0, 1.0, 0.0 > ; Direction 1 .string "Left Cap" polymarker 1 .xyz <-0.15, 1.00, 0.0 >;---------------------------------------------------------------------; set_attribute hk_text_color .rgb < 0.91145255, 0.68619117, 0.43241663 > set_attribute hk_marker_color .rgb < 0.25297328, 0.27454591, 0.79730894 >; set_attribute hk_marker_type .word marker_cross; set_attribute hk_rtext_alignment .word HK_AH_CENTER ; Center (horizontal) .word HK_AV_CAP ; Cap (vertical) rtext .xyz <-0.05, 1.00, 0.0 > ; Position .xyz < 1.0, 0.0, 0.0 > ; Direction 0 .xyz < 0.0, 1.0, 0.0 > ; Direction 1 .string "Center Cap" polymarker 1 .xyz <-0.05, 1.00, 0.0 >;---------------------------------------------------------------------; set_attribute hk_text_color .rgb < 0.06038881, 0.95754339, 0.46651248 > set_attribute hk_marker_color .rgb < 0.28185584, 0.23089501, 0.84775424 >
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -