コード例 #1
0
void
highlight_box_rep::post_display (renderer &ren) {
  if (shape == "ring") display_ring (ren);
  if (shape == "band") display_band (ren);
  ren->set_background (old_bg);
  ren->set_pencil (old_pen);
}
コード例 #2
0
ファイル: edit_repaint.cpp プロジェクト: Easycker/itexmacs
void
edit_interface_rep::draw_surround (renderer ren, rectangle r) {
  ren->set_background (light_grey);
  string medium= get_init_string (PAGE_MEDIUM);
  if ((medium == "papyrus") || (medium == "paper"))
    ren->clear (max (eb->x2, r->x1), r->y1,
                r->x2, min (eb->y2+ 2*pixel, r->y2));
  else if (medium == "paper")
    ren->clear (r->x1, r->y1, r->x2, min (eb->y1, r->y2));
}
コード例 #3
0
void
highlight_box_rep::display_classic (renderer& ren) {
  SI X1= x1 - lx, Y1= y1 - bx;
  SI X2= x2 + rx, Y2= y2 + tx;
  SI LW= lw, BW= bw, RW= rw, TW= tw;
  if (!ren->is_printer ()) {
    SI pixel= ren->pixel;
    LW= ((lw + pixel - 1) / pixel) * pixel;
    BW= ((bw + pixel - 1) / pixel) * pixel;
    RW= ((rw + pixel - 1) / pixel) * pixel;
    TW= ((tw + pixel - 1) / pixel) * pixel;
  }
  ren->set_background (bg);
  ren->clear_pattern (X1+LW, Y1+BW, X2-RW, Y2-TW);
  if (N(bs)>1) {
    SI m= (sy2(0) + sy1(1)) >> 1;
    ren->set_background (xc);
    ren->clear_pattern (X1+LW, m, X2-RW, Y2-TW);    
  }