cursor text_box_rep::find_cursor (path bp) { metric ex; cursor cu (0, 0); int l= min (bp->item, N(str)); fn->get_extents (str (0, l), ex); cu->ox= ex->x2; if (!is_nil (xk) && N(str) != 0) { STACK_NEW_ARRAY (xpos, SI, N(str)+1); fn->get_xpositions (str, xpos, xk->padding); SI d= xk->padding - xk->left; cu->ox= xpos[l] - d; if (l == 0) cu->ox += d; if (l == N(str)) cu->ox += xk->right; STACK_DELETE_ARRAY (xpos); } if (l != 0) { int k= l; tm_char_backwards (str, k); fn->get_extents (str (k, l), ex); } cu->y1= min (ex->y1, 0); cu->y2= max (ex->y2, fn->yx); cu->slope= fn->get_right_slope (str); return cu; }
double poor_stretched_font_rep::get_right_slope (string s) { return base->get_right_slope (s) / factor; }
double poor_distorted_font_rep::get_right_slope (string s) { return base->get_right_slope (s); }
double poor_bbb_font_rep::get_right_slope (string s) { return base->get_right_slope (s); }
double text_box_rep::right_slope () { return fn->get_right_slope (str); }