Beispiel #1
0
void resize_catrom( const image::const_image_view_t& src, const Imath::Box2i& src_defined,
					   const image::image_view_t& dst, const Imath::Box2i& dst_area,
					  const Imath::V2i& center, const Imath::V2f& scale)
{
	Imath::Box2i src_area( resize_box( dst_area, center, scale.x, scale.y));
	Imath::Box2i tmp_area( calc_tmp_area<lanczos3_filter_t>( src_area, dst_area, scale.y));
	image::buffer_t tmp( tmp_area, 4);
	resize_catrom_( src, src_defined, src_area, tmp.rgba_view(), tmp_area, dst, dst_area, center, scale);
}
Beispiel #2
0
void
concater_rep::flag_ok (string s, path ip, color col) {
  path dip = decorate_right (ip);
  SI h= 4*env->fn->wfn/5;
  int r, g, b, a;
  get_rgb_color (col, r, g, b, a);
  //r= 255- (255 - r)/6;
  //g= 255- (255 - g)/6;
  //b= 255- (255 - b)/6;
  a= a/6;
  color light= rgb_color (r, g, b, a);
  int info= env->info_level;
  if (info == INFO_MINIMAL || info == INFO_SHORT || info == INFO_SHORT_PAPER) {
    box infob= info_box (dip, h, pencil (col, env->fn->wline), light);
    if (info == INFO_SHORT_PAPER) {
      box b= resize_box (ip, infob, 0, 0, 0, env->fn->yx);
      print (b);
    }
    else {
      box specb= specific_box (ip, infob, "screen", env->fn);
      print (specb);
    }
  }
  else if (info == INFO_DETAILED || info == INFO_PAPER) {
    int sz= script (env->fn_size, env->index_level+2);
    font gfn (tex_font ("ecrm", sz, (int) (env->magn*env->dpi)));
    box textb= text_box (decorate (ip), 0, s, gfn, col);
    box flagb= flag_box (dip, textb, h, pencil (col, env->fn->wline), light);
    if (info == INFO_DETAILED) {
      box specb= specific_box (ip, flagb, "screen", env->fn);
      print (specb);
    }
    else {
      box b= resize_box (ip, flagb, 0, 0, 0, env->fn->yx);
      print (b);
    }
  }
}
Beispiel #3
0
void
bridge_hidden_rep::my_typeset (int desired_status) {
  (void) desired_status;
  stack_border temp_sb;
  array<page_item> temp_l=
    typeset_stack (env, st, ip, ttt->a, ttt->b, temp_sb);
  int i=0, n= N(temp_l);
  for (i=0; i<n; i++)
    if (temp_l[i]->type != PAGE_CONTROL_ITEM) {
      box b= temp_l[i]->b;
      temp_l[i]->type= PAGE_HIDDEN_ITEM;
      temp_l[i]->b   = resize_box (ip, b, b->x1, 0, b->x2, 0);
      temp_l[i]->spc = space (0, 0, 0);
    }
  ttt->l = temp_l;
  ttt->sb= temp_sb; // stack_border ();
  //ttt->insert_stack (temp_l, temp_sb);
}