void Gate::draw_lines() const{ if(t == Operand::NONE) return; Point ul(GATE_PADDING_SIDE + 2*SCALE*(p-4) - .4*SCALE, GATE_PADDING_TOP+SCALE*(p-4) -0.3*SCALE); fl_color(color().as_int()); //Draw gate symbol if(t==Operand::AND){ draw_AND_gate(ul); } else if (t==Operand::OR){ draw_OR_gate(ul); } else if (t==Operand::NOT){ draw_NOT_gate(ul); } //Draw lines to input lines int iny1 = GATE_PADDING_TOP + SCALE*((i1->p)-3) - .5*SCALE; int iny2 = 0; if(i2) iny2 = GATE_PADDING_TOP + SCALE*((i2->p)-3) - .5*SCALE; if(t == Operand::NOT){ draw_one_line(ul, iny1); } else { draw_two_lines(ul, iny1, iny2); } fl_line(ul.x+(.8*SCALE)/2,ul.y+(.6*SCALE),ul.x+(.8*SCALE)/2,GATE_PADDING_TOP+SCALE/2+SCALE*(p-4)); }
void RenderObservationZone::Visit(const SectorZone& oz) { parms_sector(oz); if (draw_style(!m_past)) { draw_segment(oz.getStartRadial(), oz.getEndRadial()); draw_two_lines(); } m_buffer.mix_copy(); }
void RenderObservationZone::Visit(const BGAEnhancedOptionZone& oz) { parms_sector(oz); if (draw_style(false)) { draw_segment(oz.getStartRadial(), oz.getEndRadial()); p_radius = m_proj.DistanceMetersToScreen(fixed(500)); draw_circle(); } if (draw_style(!m_past)) { draw_two_lines(); } m_buffer.mix_copy(); }