Beispiel #1
0
void FlowAnnot::get_borders( double pos_x, double pos_y,
	double *x_right, double *x_left, double *y_high, double *y_low, 
	void *node)
{
  if ( !((FlowNode *) node)->annotv[number])
    return;
  if ( display_level != flow_mDisplayLevel_1)
    return;

  if ( annot_type == flow_eAnnotType_MultiLine)
  {
    double 	width, height;
    int		rows;

    flow_measure_annot_text( ctx, ((FlowNode *) node)->annotv[number], 
		draw_type, text_size, annot_type, &width, &height, &rows);
    if ( pos_x + p.x < *x_left)
      *x_left = pos_x + p.x;
    if ( pos_x + p.x + width > *x_right)
      *x_right = pos_x + p.x + width;
    if ( pos_y + p.y < *y_low)
      *y_low = pos_y + p.y;
    if ( pos_y + p.y + height > *y_high)
      *y_high = pos_y + p.y + height;
  }
}
Beispiel #2
0
void brow_MeasureAnnotText( brow_tCtx ctx, char *text, flow_eDrawType draw_type,
                            int text_size, flow_eAnnotType annot_type,
                            double *width, double *height, int *rows)
{
    flow_measure_annot_text( ctx, text, draw_type, text_size, annot_type,
                             width, height, rows);
}