示例#1
0
void FlowText::move(
    void* pos, double x, double y, int highlight, int dimmed, int hot)
{
  erase(pos, hot, NULL);
  nav_erase(pos, NULL);
  p.x = x;
  p.y = y;
  zoom();
  nav_zoom();
  draw(pos, highlight, dimmed, hot, NULL);
  nav_draw(pos, highlight, NULL);
}
示例#2
0
void FlowPixmap::move( void *pos, double x, double y, int highlight, int hot)
{

  erase( pos, hot, NULL);
  nav_erase( pos, NULL);
  p.x = x;
  p.y = y;
  zoom();
  nav_zoom();
  draw( pos, highlight, hot, NULL);
  nav_draw( pos, highlight, NULL);
}
示例#3
0
void FlowPixmap::shift( void *pos, double delta_x, double delta_y,
	int highlight, int hot)
{
  erase( pos, hot, NULL);
  nav_erase( pos, NULL);
  p.x += delta_x;
  p.y += delta_y;
  zoom();
  nav_zoom();

  draw( pos, highlight, hot, NULL);
  nav_draw( pos, highlight, NULL);
}
示例#4
0
void FlowLine::move( void *pos, double x1, double y1, double x2, double y2,
	int highlight, int hot)
{
  erase( pos, hot, NULL);
  nav_erase( pos, NULL);
  p1.x = x1;
  p1.y = y1;
  p2.x = x2;
  p2.y = y2;
  zoom();
  nav_zoom();
  draw( pos, highlight, hot, NULL);
  nav_draw( pos, highlight, NULL);
}
示例#5
0
void FlowImage::shift( void *pos, double delta_x, double delta_y,
	int highlight, int hot)
{
  erase( pos, hot, NULL);
  nav_erase( pos, NULL);
  ll.x += delta_x;
  ll.y += delta_y;
  ur.x += delta_x;
  ur.y += delta_y;
  zoom();
  nav_zoom();

  draw( pos, highlight, hot, NULL);
  nav_draw( pos, highlight, NULL);
}
示例#6
0
void FlowArc::move( void *pos, double x1, double y1, double x2, double y2,
	int ang1, int ang2, int highlight, int hot)
{
  erase( pos, hot, NULL);
  nav_erase( pos, NULL);
  ll.x = x1;
  ll.y = y1;
  ur.x = x2;
  ur.y = y2;
  angle1 = ang1;
  angle2 = ang2;  
  zoom();
  nav_zoom();
  draw( pos, highlight, hot, NULL);
  nav_draw( pos, highlight, NULL);
}
示例#7
0
void FlowImage::move( void *pos, double x, double y, int highlight, int hot)
{
  double width, height;

  width = ur.x - ll.x;
  height = ur.y - ll.y;
  erase( pos, hot, NULL);
  nav_erase( pos, NULL);
  ll.x = x;
  ll.y = y;
  ur.x = x + width;
  ur.y = y + height;
  zoom();
  nav_zoom();
  draw( pos, highlight, hot, NULL);
  nav_draw( pos, highlight, NULL);
}
示例#8
0
void FlowArrow::shift(void* pos, double delta_x, double delta_y, int highlight,
    int dimmed, int hot)
{
  erase(pos, hot, NULL);
  nav_erase(pos, NULL);
  p_dest.x += delta_x;
  p_dest.y += delta_y;
  p1.x += delta_x;
  p1.y += delta_y;
  p2.x += delta_x;
  p2.y += delta_y;
  zoom();
  nav_zoom();

  draw(pos, highlight, dimmed, hot, NULL);
  nav_draw(pos, highlight, NULL);
}
示例#9
0
void FlowArrow::move(void* pos, double x1, double y1, double x2, double y2,
    int highlight, int dimmed, int hot)
{
  erase(pos, hot, NULL);
  nav_erase(pos, NULL);

  if (fabs(x2 - x1) < DBL_EPSILON) {
    if (y1 > y2) {
      p1.x = x2 + arrow_width / 2;
      p1.y = y2 + arrow_length;
      p2.x = x2 - arrow_width / 2;
      p2.y = y2 + arrow_length;
    } else {
      p1.x = x2 + arrow_width / 2;
      p1.y = y2 - arrow_length;
      p2.x = x2 - arrow_width / 2;
      p2.y = y2 - arrow_length;
    }
  } else if (fabs(y2 - y1) < DBL_EPSILON) {
    if (x1 > x2) {
      p1.x = x2 + arrow_length;
      p1.y = y2 + arrow_width / 2;
      p2.x = x2 + arrow_length;
      p2.y = y2 - arrow_width / 2;
    } else {
      p1.x = x2 - arrow_length;
      p1.y = y2 - arrow_width / 2;
      p2.x = x2 - arrow_length;
      p2.y = y2 + arrow_width / 2;
    }
  } else {
    double d = sqrt((y1 - y2) * (y1 - y2) + (x1 - x2) * (x1 - x2));
    p1.x = x2 + (x1 - x2) * arrow_length / d + (y1 - y2) * arrow_width / d / 2;
    p1.y = y2 + (y1 - y2) * arrow_length / d - (x1 - x2) * arrow_width / d / 2;
    p2.x = x2 + (x1 - x2) * arrow_length / d - (y1 - y2) * arrow_width / d / 2;
    p2.y = y2 + (y1 - y2) * arrow_length / d + (x1 - x2) * arrow_width / d / 2;
  }
  p_dest.x = x2;
  p_dest.y = y2;
  zoom();
  nav_zoom();
  draw(pos, highlight, dimmed, hot, NULL);
  nav_draw(pos, highlight, NULL);
}