void composite_box_rep::finalize () { int i, n= subnr (); lip= descend (ip, 0); rip= descend (ip, 1); for (i=0; i<n; i++) { path l= bs[i]->find_lip (); path r= bs[i]->find_rip (); /* cout << " i = " << i << "\n"; cout << " l = " << l << "\n"; cout << " r = " << r << "\n"; */ if (is_accessible (l) && is_accessible (r)) { if (is_decoration (lip) || path_less (reverse (l), reverse (lip))) lip= l; if (is_decoration (rip) || path_less (reverse (rip), reverse (r))) rip= r; } } /* cout << ((tree) (*((box_rep*) this))) << " " << ip << "\n"; cout << " lip= " << lip << "\n"; cout << " rip= " << rip << "\n"; */ }
u32 CLevelGraph::check_position_in_direction_slow (u32 start_vertex_id, const Fvector2 &start_position, const Fvector2 &finish_position) const { if (!valid_vertex_position(v3d(finish_position))) return (u32(-1)); u32 cur_vertex_id = start_vertex_id, prev_vertex_id = u32(-1); Fbox2 box; Fvector2 identity, start, dest, dir; identity.x = identity.y = header().cell_size()*.5f; start = start_position; dest = finish_position; dir.sub (dest,start); u32 dest_xz = vertex_position(v3d(dest)).xz(); Fvector2 temp; unpack_xz (vertex(start_vertex_id),temp.x,temp.y); float cur_sqr = _sqr(temp.x - dest.x) + _sqr(temp.y - dest.y); for (;;) { const_iterator I,E; begin (cur_vertex_id,I,E); bool found = false; for ( ; I != E; ++I) { u32 next_vertex_id = value(cur_vertex_id,I); if ((next_vertex_id == prev_vertex_id) || !valid_vertex_id(next_vertex_id)) continue; CVertex *v = vertex(next_vertex_id); unpack_xz (v,temp.x,temp.y); box.min = box.max = temp; box.grow (identity); if (box.pick_exact(start,dir)) { if (dest_xz == v->position().xz()) { return (is_accessible(next_vertex_id) ? next_vertex_id : u32(-1)); } Fvector2 temp; temp.add (box.min,box.max); temp.mul (.5f); float dist = _sqr(temp.x - dest.x) + _sqr(temp.y - dest.y); if (dist > cur_sqr) continue; if (!is_accessible(next_vertex_id)) return (u32(-1)); cur_sqr = dist; found = true; prev_vertex_id = cur_vertex_id; cur_vertex_id = next_vertex_id; break; } } if (!found) { return (u32(-1)); } } }
path box_rep::find_box_path (path p, bool& found) { // cout << "Find box path " << box (this) << ", " << p // << "; " << reverse (ip) // << ", " << reverse (find_lip ()) // << " -- " << reverse (find_rip ()) << "\n"; found= (!is_nil(p)) && is_accessible (ip); if (last_item (p) == 0) return path (0); else return path (1); }
void bridge_argument_rep::my_typeset (int desired_status) { string name; tree value; path valip= decorate_right (ip); tree r= st[0]; if (is_compound (r)) value= tree (ERROR, "arg"); else { name = r->label; if ((!is_nil (env->macro_arg)) && env->macro_arg->item->contains (r->label)) { value= env->macro_arg->item [name]; if (!is_func (value, BACKUP)) { path new_valip= env->macro_src->item [name]; if (is_accessible (new_valip)) valip= new_valip; } } else value= compound ("src-unknown", name); } path prefix; if (N(st) > 1) { int i, n= N(st); for (i=1; i<n; i++) { tree r= env->exec (st[i]); if (!is_int (r)) { prefix= path (); value= tree (ERROR, "arg " * name); valip= decorate_right (ip); break; } int nr= as_int (r); if ((!is_compound (value)) || (nr<0) || (nr>=N(value))) { prefix= path (); value= tree (ERROR, "arg " * name); valip= decorate_right (ip); break; } value = value[nr]; valip = descend (valip, nr); prefix= prefix * nr; } } initialize (name, prefix, attach_here (value, valip)); ttt->insert_marker (body->st, ip); list<hashmap<string,tree> > old_var= env->macro_arg; list<hashmap<string,path> > old_src= env->macro_src; if (!is_nil (env->macro_arg)) env->macro_arg= env->macro_arg->next; if (!is_nil (env->macro_src)) env->macro_src= env->macro_src->next; body->typeset (desired_status); env->macro_arg= old_var; env->macro_src= old_src; }
int composite_box_rep::find_child (SI x, SI y, SI delta, bool force) { if (outside (x, delta, x1, x2) && (is_accessible (ip) || force)) return -1; int i, n= subnr(), d= MAX_SI, m= -1; for (i=0; i<n; i++) if (distance (i, x, y, delta)< d) if (bs[i]->accessible () || force) { d= distance (i, x, y, delta); m= i; } return m; }
/*static*/ void hyphenate (line_item item, int pos, line_item& item1, line_item& item2) { path ip= item->b->ip; int x1= is_accessible (ip)? item->b->get_leaf_left_pos (): 0; int x2= is_accessible (ip)? x1+ pos+ 1: 0; box b= item->b; string s = b->get_leaf_string (); font fn = b->get_leaf_font (); pencil pen= b->get_leaf_pencil (); string s1, s2; array<int> hp= item->lan->get_hyphens (s); item->lan->hyphenate (s, pos, s1, s2); item1= line_item (STRING_ITEM, OP_SKIP, shorter_box (ip, text_box (ip, x1, s1, fn, pen), pos+ 1), hp[pos], item->lan); item2= line_item (STRING_ITEM, item->op_type, text_box (ip, x2, s2, fn, pen), item->penalty, item->lan); item2->spc= item->spc; // cout << s << " ---> " << s1 << " " << s2 << "\n"; }
path text_box_rep::find_box_path (path p, bool& found) { // cout << "Find box path " << box (this) << ", " << p // << "; " << reverse (ip) // << ", " << reverse (find_lip ()) // << " -- " << reverse (find_rip ()) << "\n"; found= (!is_nil(p)) && is_accessible (ip); if (found) { int i= last_item (p) - pos; if (i < 0) return path (0); else if (i > N(str)) return N(str); else return path (i); } else return path (0); }
bool CLevelGraph::neighbour_in_direction (const Fvector &direction, u32 start_vertex_id) const { u32 cur_vertex_id = start_vertex_id, prev_vertex_id = u32(-1); Fbox2 box; Fvector2 identity, start, dest, dir; identity.x = identity.y = header().cell_size()*.5f; start = v2d(vertex_position(start_vertex_id)); dir = v2d(direction); dir.normalize_safe (); dest = dir; dest.mul (header().cell_size()*4.f); dest.add (start); Fvector2 temp; unpack_xz (vertex(start_vertex_id),temp.x,temp.y); float cur_sqr = _sqr(temp.x - dest.x) + _sqr(temp.y - dest.y); const_iterator I,E; begin (cur_vertex_id,I,E); for ( ; I != E; ++I) { u32 next_vertex_id = value(cur_vertex_id,I); if ((next_vertex_id == prev_vertex_id) || !is_accessible(next_vertex_id)) continue; unpack_xz (vertex(next_vertex_id),temp.x,temp.y); box.min = box.max = temp; box.grow (identity); if (box.pick_exact(start,dir)) { Fvector2 temp; temp.add (box.min,box.max); temp.mul (.5f); float dist = _sqr(temp.x - dest.x) + _sqr(temp.y - dest.y); if (dist > cur_sqr) continue; return (true); } } return (false); }
float CLevelGraph::farthest_vertex_in_direction(u32 start_vertex_id, const Fvector &start_point, const Fvector &finish_point, u32 &finish_vertex_id, xr_vector<bool> *tpaMarks, bool check_accessability) const { SContour _contour; const_iterator I,E; int saved_index, iPrevIndex = -1, iNextNode; Fvector temp_point = start_point; float fDistance = start_point.distance_to(finish_point), fCurDistance = 0.f; u32 dwCurNode = start_vertex_id; while (!inside(vertex(dwCurNode),finish_point) && (fCurDistance < (fDistance + EPS_L))) { begin (dwCurNode,I,E); saved_index = -1; contour (_contour,dwCurNode); for ( ; I != E; ++I) { iNextNode = value(dwCurNode,I); if (valid_vertex_id(iNextNode) && (iPrevIndex != iNextNode)) choose_point(start_point,finish_point,_contour, iNextNode,temp_point,saved_index); } if (saved_index > -1) { if (check_accessability && !is_accessible(saved_index)) return (fCurDistance); fCurDistance = start_point.distance_to_xz(temp_point); iPrevIndex = dwCurNode; dwCurNode = saved_index; } else return (fCurDistance); if (tpaMarks) (*tpaMarks)[dwCurNode] = true; finish_vertex_id = dwCurNode; } return (fCurDistance); }
path composite_box_rep::find_box_path (path p, bool& found) { // cout << "Find box path " << box (this) << ", " << p // << "; " << reverse (ip) // << ", " << reverse (find_lip ()) // << " -- " << reverse (find_rip ()) << "\n"; int n= subnr(); // cout << "Search cursor " << p << " among " << n // << " at " << box (this) << " " << reverse (ip) << "\n"; if (n == 0) return box_rep::find_box_path (p, found); int start= n>>1, acc= start, step= (start+1)>>1; while (step > 0) { path sr= bs[acc]->find_rip (); while (!is_accessible (sr)) { acc--; if (acc<0) break; sr= bs[acc]->find_rip (); } if (acc<0) { start= 0; break; } if (path_less (reverse (sr), p)) { int old_start= start, old_acc= acc; start= min (n-1, start+ step); acc = start; while ((acc > old_start) && (!is_accessible (bs[acc]->find_rip ()))) acc--; if (acc == old_start) acc= old_acc; } else { start= max (0, start- step); acc = min (acc, start); } if (step <= 1) break; step= (step+1)>>1; } path bp; bool flag= false; int i= start; found= false; while (true) { path sl= bs[i]->find_lip (); path sr= bs[i]->find_rip (); // cout << " " << i << ":\t" << reverse(sl) <<", "<< reverse(sr) << "\n"; if (is_accessible (sl) && is_accessible (sr) && path_less_eq (reverse (sl), p) && path_less_eq (p, reverse (sr))) { flag= true; bp= path (i, bs[i]->find_box_path (p, found)); if (found) return bp; } i++; if (i==n) i=0; if (i==start) break; } if (is_accessible (ip) && (path_up (p) == reverse (ip)) && access_allowed ()) return box_rep::find_box_path (p, found); if (flag) return bp; if (start > 0) { path sl= bs[start-1]->find_rip (); path sr= bs[start ]->find_lip (); if (is_accessible (sl) && is_accessible (sr) && path_less_eq (reverse (sl), p) && path_less_eq (p, reverse (sr))) { int c1= N (common (reverse (sl), p)); int c2= N (common (reverse (sr), p)); int i = (c1 >= c2? start-1: start); return path (i, bs[i]->find_box_path (p, found)); } } return box_rep::find_box_path (p, flag); }
inline bool box_rep::accessible () { return is_accessible (find_lip ()); }
void concater_rep::typeset (tree t, path ip) { // cout << "Typeset " << t << "\n"; // cout << "Typeset " << t << ", " << ip << ", " << obtain_ip (t) << "\n"; /* if (obtain_ip (t) != ip) cout << "TeXmacs] Wrong ip: " << t << "\n" << " ] " << obtain_ip (t) << " -> " << ip << "\n"; */ if (!is_accessible (ip)) { path ip2= obtain_ip (t); //if (ip2 != ip) cout << t << ", " << ip << " -> " << ip2 << "\n"; if (ip2 != path (DETACHED)) ip= ip2; } if (env->hl_lan != 0) env->lan->highlight (t); if (is_atomic (t)) { if (env->mode == 1) typeset_text_string (t, ip, 0, N(t->label)); else if (env->mode == 2) typeset_math_string (t, ip, 0, N(t->label)); else if (env->mode == 3) typeset_prog_string (t, ip, 0, N(t->label)); else typeset_text_string (t, ip, 0, N(t->label)); return; } switch (L (t)) { case UNINIT: case ERROR: typeset_error (t, ip); break; case RAW_DATA: typeset_inactive (t, ip); break; case DOCUMENT: typeset_document (t, ip); break; case PARA: typeset_paragraph (t, ip); break; case SURROUND: typeset_surround (t, ip); break; case CONCAT: typeset_concat (t, ip); break; case RIGID: typeset_rigid (t, ip); break; case HIDDEN: //(void) env->exec (t); if (N(t) != 1) typeset_error (t, ip); else (void) typeset_as_concat (env, t[0], descend (ip, 0)); break; case FREEZE: if (N(t) != 1) typeset_error (t, ip); else typeset (attach_middle (t[0], ip)); //typeset (freeze (t[0]), decorate_middle (ip)); break; case UNFREEZE: if (N(t) != 1) typeset_error (t, ip); else typeset (t[0], descend (ip, 0)); break; case HSPACE: t= env->exec (t); typeset_hspace (t, ip); break; case VAR_VSPACE: flag (env->drd->get_name (L(t)), ip, brown); t= tree (VAR_VSPACE, env->exec (tree (TMLEN, A(t)))); control (t, ip); break; case VSPACE: flag (env->drd->get_name (L(t)), ip, brown); t= tree (VSPACE, env->exec (tree (TMLEN, A(t)))); control (t, ip); break; case SPACE: t= env->exec (t); typeset_space (attach_here (t, ip)); break; case HTAB: if (N(t) != 1 && N(t) != 2) { typeset_error (t, ip); break; } if (N(a)==0) print (empty_box (ip, 0, 0, 0, env->fn->yx)); print (space (env->as_length (t[0]))); control (t, ip); break; case MOVE: typeset_move (t, ip); break; case SHIFT: typeset_shift (t, ip); break; case RESIZE: typeset_resize (t, ip); break; case CLIPPED: typeset_clipped (t, ip); break; case REPEAT: typeset_repeat (t, ip); break; case _FLOAT: typeset_float (t, ip); break; case DATOMS: typeset_formatting (t, ip, ATOM_DECORATIONS); break; case DLINES: typeset_formatting (t, ip, LINE_DECORATIONS); break; case DPAGES: typeset_formatting (t, ip, PAGE_DECORATIONS); break; case DBOX: typeset_decorated_box (t, ip); break; case LINE_NOTE: typeset_line_note (t, ip); break; case PAGE_NOTE: typeset_page_note (t, ip); break; case WITH_LIMITS: with_limits (LIMITS_DISPLAY); flag ("with-limits", ip, brown); control (t, ip); break; case LINE_BREAK: if (N(a)>0) a[N(a)-1]->penalty = 0; flag ("line-break", ip, brown); control (t, ip); break; case NEW_LINE: case NEXT_LINE: { string name= env->drd->get_name (L(t)); flag (name, ip, brown); control (t, ip); break; } case NO_BREAK: if (N(a)>0) a[N(a)-1]->penalty = HYPH_INVALID; if ((N(a)>1) && (a[N(a)-1]->type == STRING_ITEM) && (a[N(a)-1]->b->get_leaf_string () == "")) a[N(a)-2]->penalty = HYPH_INVALID; flag ("no line break", ip, brown); control (t, ip); break; case YES_INDENT: flag ("yes-first-indent", ip, brown); control (tuple ("env_par", PAR_FIRST, env->read (PAR_FIRST)), ip); break; case NO_INDENT: flag ("no-first-indent", ip, brown); control (tuple ("env_par", PAR_FIRST, "0cm"), ip); break; case VAR_YES_INDENT: flag ("yes-first-indent-after", ip, brown); control (tuple ("env_par", PAR_NO_FIRST, "false"), ip); break; case VAR_NO_INDENT: flag ("no-first-indent-after", ip, brown); control (tuple ("env_par", PAR_NO_FIRST, "true"), ip); break; case VAR_PAGE_BREAK: case PAGE_BREAK: case VAR_NO_PAGE_BREAK: case NO_PAGE_BREAK: case VAR_NO_BREAK_HERE: case NO_BREAK_HERE: case NO_BREAK_START: case NO_BREAK_END: case VAR_NEW_PAGE: case NEW_PAGE: case VAR_NEW_DPAGE: case NEW_DPAGE: { string name= env->drd->get_name (L(t)); flag (name, ip, brown); control (t, ip); break; } case AROUND: case VAR_AROUND: case BIG_AROUND: typeset_around (t, ip, env->get_string (MATH_NESTING_MODE) != "off"); break; case LEFT: typeset_large (t, ip, LEFT_BRACKET_ITEM, OP_OPENING_BRACKET, "<left-"); break; case MID: typeset_large (t, ip, MIDDLE_BRACKET_ITEM, OP_MIDDLE_BRACKET, "<mid-"); break; case RIGHT: typeset_large (t, ip, RIGHT_BRACKET_ITEM, OP_CLOSING_BRACKET, "<right-"); break; case BIG: typeset_bigop (t, ip); break; case LONG_ARROW: typeset_long_arrow (t, ip); break; case LPRIME: typeset_lprime (t, ip); break; case RPRIME: typeset_rprime (t, ip); break; case BELOW: typeset_below (t, ip); break; case ABOVE: typeset_above (t, ip); break; case LSUB: case LSUP: typeset_script (t, ip, false); break; case RSUB: case RSUP: typeset_script (t, ip, true); break; case FRAC: typeset_frac (t, ip); break; case SQRT: typeset_sqrt (t, ip); break; case WIDE: typeset_wide (t, ip, true); break; case VAR_WIDE: typeset_wide (t, ip, false); break; case NEG: typeset_neg (t, ip); break; case TREE: typeset_tree (t, ip); break; case SYNTAX: typeset_syntax (t, ip); break; case TFORMAT: if ((N(t)>0) && is_table (t[N(t)-1])) typeset_table (t, ip); else typeset_formatting (t, ip, CELL_FORMAT); break; case TWITH: case CWITH: case TMARKER: typeset_inactive (t, ip); break; case TABLE: typeset_table (t, ip); break; case ROW: case CELL: case SUBTABLE: break; case ASSIGN: typeset_assign (t, ip); break; case WITH: typeset_with (t, ip); break; case PROVIDES: typeset_executable (t, ip); break; case QUOTE_VALUE: typeset_inactive (t, ip); break; case VALUE: typeset_value (t, ip); break; case MACRO: typeset_inactive (t, ip); break; case DRD_PROPS: typeset_drd_props (t, ip); break; case ARG: typeset_argument (t, ip); break; case QUOTE_ARG: typeset_inactive (t, ip); break; case COMPOUND: typeset_compound (t, ip); break; case XMACRO: typeset_inactive (t, ip); break; case GET_LABEL: typeset_executable (t, ip); break; case GET_ARITY: typeset_executable (t, ip); break; case MAP_ARGS: typeset_rewrite (t, ip); break; case EVAL_ARGS: typeset_eval_args (t, ip); break; case MARK: typeset_mark (t, ip); break; case EXPAND_AS: typeset_expand_as (t, ip); break; case EVAL: typeset_eval (t, ip); break; case QUOTE: typeset_inactive (t, ip); break; case QUASI: typeset_eval (tree (EVAL, tree (QUASIQUOTE, t[0])), ip); break; case QUASIQUOTE: case UNQUOTE: case VAR_UNQUOTE: case COPY: typeset_executable (t, ip); break; case IF: typeset_if (t, ip); break; case VAR_IF: typeset_var_if (t, ip); break; case CASE: typeset_case (t, ip); break; case WHILE: case FOR_EACH: typeset_executable (t, ip); break; case EXTERN: typeset_rewrite (t, ip); break; case VAR_INCLUDE: typeset_include (t, ip); break; case INCLUDE: typeset_compound (t, ip); break; case USE_PACKAGE: case USE_MODULE: typeset_executable (t, ip); break; case OR: case XOR: case AND: case NOT: case PLUS: case MINUS: case TIMES: case OVER: case DIV: case MOD: case MINIMUM: case MAXIMUM: case MATH_SQRT: case EXP: case LOG: case POW: case COS: case SIN: case TAN: case MERGE: case LENGTH: typeset_executable (t, ip); break; case RANGE: typeset_range (t, ip); break; case NUMBER: case _DATE: case TRANSLATE: case CHANGE_CASE: case FIND_FILE: case FIND_FILE_UPWARDS: case IS_TUPLE: case LOOK_UP: case EQUAL: case UNEQUAL: case LESS: case LESSEQ: case GREATER: case GREATEREQ: case BLEND: case BOX_INFO: case FRAME_DIRECT: case FRAME_INVERSE: typeset_executable (t, ip); break; case CM_LENGTH: case MM_LENGTH: case IN_LENGTH: case PT_LENGTH: case BP_LENGTH: case DD_LENGTH: case PC_LENGTH: case CC_LENGTH: case FS_LENGTH: case FBS_LENGTH: case EM_LENGTH: case LN_LENGTH: case SEP_LENGTH: case YFRAC_LENGTH: case EX_LENGTH: case FN_LENGTH: case FNS_LENGTH: case BLS_LENGTH: case SPC_LENGTH: case XSPC_LENGTH: case PAR_LENGTH: case PAG_LENGTH: case GW_LENGTH: case GH_LENGTH: case GU_LENGTH: case TMPT_LENGTH: case PX_LENGTH: typeset_executable (t, ip); break; case STYLE_ONLY: case VAR_STYLE_ONLY: case ACTIVE: case VAR_ACTIVE: case INACTIVE: case VAR_INACTIVE: typeset_compound (t, ip); break; case REWRITE_INACTIVE: typeset_rewrite (t, ip); break; case INLINE_TAG: case OPEN_TAG: case MIDDLE_TAG: case CLOSE_TAG: typeset_src_tag (t, ip); break; case SYMBOL: case LATEX: case HYBRID: typeset_inactive (t, ip); break; case LOCUS: typeset_locus (t, ip); break; case ID: typeset_inactive (t, ip); break; case HARD_ID: typeset_executable (t, ip); break; case LINK: case URL: case SCRIPT: case OBSERVER: case FIND_ACCESSIBLE: typeset_inactive (t, ip); break; case HLINK: case ACTION: typeset_compound (t, ip); break; case SET_BINDING: typeset_set_binding (t, ip); break; case GET_BINDING: typeset_executable (t, ip); break; case LABEL: case REFERENCE: case PAGEREF: typeset_compound (t, ip); break; case GET_ATTACHMENT: typeset_executable (t, ip); break; case WRITE: typeset_write (t, ip); break; case TOC_NOTIFY: typeset_toc_notify (t, ip); break; case TUPLE: case ATTR: case TMLEN: case COLLECTION: case ASSOCIATE: case BACKUP: typeset_inactive (t, ip); break; case PATTERN: case GRADIENT: marker (descend (ip, 0)); typeset_inactive (env->exec (t), decorate (ip)); marker (descend (ip, 1)); break; case SPECIFIC: typeset_specific (t, ip); break; case FLAG: typeset_flag (t, ip); break; case HYPHENATE_AS: typeset_hyphenate_as (t, ip); break; case ANIM_STATIC: case ANIM_DYNAMIC: case MORPH: case ANIM_TIME: case ANIM_PORTION: typeset_executable (t, ip); break; case ANIM_COMPOSE: typeset_anim_compose (t, ip); break; case ANIM_REPEAT: typeset_anim_repeat (t, ip); break; case ANIM_CONSTANT: typeset_anim_constant (t, ip); break; case ANIM_ACCELERATE: typeset_anim_accelerate (t, ip); break; case ANIM_TRANSLATE: typeset_anim_translate (t, ip); break; case ANIM_PROGRESSIVE: typeset_anim_progressive (t, ip); break; case VIDEO: typeset_video (t, ip); break; case SOUND: typeset_sound (t, ip); break; case GRAPHICS: typeset_graphics (t, ip); break; case SUPERPOSE: typeset_superpose (t, ip); break; case GR_GROUP: typeset_gr_group (t, ip); break; case GR_TRANSFORM: typeset_gr_transform (t, ip); break; case GR_EFFECT: typeset_gr_effect (t, ip); break; case TEXT_AT: typeset_text_at (t, ip); break; case MATH_AT: typeset_math_at (t, ip); break; case DOCUMENT_AT: typeset_document_at (t, ip); break; case _POINT: typeset_point (t, ip); break; case LINE: typeset_line (t, ip, false); break; case CLINE: typeset_line (t, ip, true); break; case ARC: typeset_arc (t, ip, false); break; case CARC: typeset_arc (t, ip, true); break; case SPLINE: typeset_spline (t, ip, false); break; case VAR_SPLINE: typeset_var_spline (t, ip); break; case CSPLINE: typeset_cspline (t, ip); break; case BEZIER: case CBEZIER: case SMOOTH: case CSMOOTH: typeset_bezier (t, ip); break; case FILL: typeset_fill (t, ip); break; case IMAGE: typeset_image (t, ip); break; case TRANSFORM_3D: case OBJECT_3D: case TRIANGLE_3D: case LIGHT_3D: typeset_graphics_3d (t, ip); break; case LIGHT_DIFFUSE: case LIGHT_SPECULAR: typeset_inactive (t, ip); break; case EFF_MOVE: case EFF_MAGNIFY: case EFF_BUBBLE: case EFF_TURBULENCE: case EFF_FRACTAL_NOISE: case EFF_GAUSSIAN: case EFF_OVAL: case EFF_RECTANGULAR: case EFF_MOTION: case EFF_BLUR: case EFF_OUTLINE: case EFF_THICKEN: case EFF_ERODE: case EFF_DEGRADE: case EFF_DISTORT: case EFF_GNAW: case EFF_SUPERPOSE: case EFF_ADD: case EFF_SUB: case EFF_MUL: case EFF_MIN: case EFF_MAX: case EFF_MIX: case EFF_NORMALIZE: case EFF_MONOCHROME: case EFF_COLOR_MATRIX: case EFF_MAKE_TRANSPARENT: case EFF_MAKE_OPAQUE: typeset_inactive (t, ip); break; case CANVAS: typeset_canvas (t, ip); break; case ORNAMENT: typeset_ornament (t, ip); break; default: if (L(t) < START_EXTENSIONS) print (test_box (ip)); else typeset_compound (t, ip); break; } }
void concater_rep::flag (string s, path ip, color col) { if (is_accessible (ip) && (!env->read_only)) flag_ok (s, ip, col); }
path text_box_rep::find_tree_path (path bp) { if (is_accessible (ip)) return reverse (descend (ip, pos+ bp->item)); else return reverse (descend_decode (ip, bp->item <= N(str) ? 0 : 1)); }
path text_box_rep::find_rip () { if (is_accessible (ip)) return descend (ip, pos+ N(str)); else return ip; }
path text_box_rep::find_lip () { if (is_accessible (ip)) return descend (ip, pos); return ip; }