float DENORM::yshift_at_x(float src_x) const { // In normalized coords. if (segments != 0) { const DENORM_SEG* seg = binary_search_segment(src_x); if (seg->ycoord == -MAX_INT32) { if (base_is_row) return source_row->base_line(x(src_x)/scale_at_x(src_x) + x_centre); else return m * x(src_x) + c; } else { return seg->ycoord; } } return source_row->base_line (x(src_x)/scale_at_x(src_x) + x_centre); }
float DENORM::y( //convert y coord float src_y, //coord to convert float src_centre //x location for base ) const { return (src_y - bln_baseline_offset) / scale_at_x(src_centre) + yshift_at_x(src_centre); }
float DENORM::x( //convert x coord float src_x //coord to convert ) const { return src_x / scale_at_x(src_x) + x_centre; }
float DENORM::x(float src_x) const { return src_x / scale_at_x(src_x) + x_centre; }