MCPcopy Create free account
hub / github.com/MapServer/MapServer / curve4

Class curve4

renderers/agg/include/agg_curves.h:579–686  ·  view source on GitHub ↗

-----------------------------------------------------------------curve4

Source from the content-addressed store, hash-verified

577
578 //-----------------------------------------------------------------curve4
579 class curve4
580 {
581 public:
582 curve4() : m_approximation_method(curve_div) {}
583 curve4(double x1, double y1,
584 double x2, double y2,
585 double x3, double y3,
586 double x4, double y4) :
587 m_approximation_method(curve_div)
588 {
589 init(x1, y1, x2, y2, x3, y3, x4, y4);
590 }
591
592 curve4(const curve4_points& cp) :
593 m_approximation_method(curve_div)
594 {
595 init(cp[0], cp[1], cp[2], cp[3], cp[4], cp[5], cp[6], cp[7]);
596 }
597
598 void reset()
599 {
600 m_curve_inc.reset();
601 m_curve_div.reset();
602 }
603
604 void init(double x1, double y1,
605 double x2, double y2,
606 double x3, double y3,
607 double x4, double y4)
608 {
609 if(m_approximation_method == curve_inc)
610 {
611 m_curve_inc.init(x1, y1, x2, y2, x3, y3, x4, y4);
612 }
613 else
614 {
615 m_curve_div.init(x1, y1, x2, y2, x3, y3, x4, y4);
616 }
617 }
618
619 void init(const curve4_points& cp)
620 {
621 init(cp[0], cp[1], cp[2], cp[3], cp[4], cp[5], cp[6], cp[7]);
622 }
623
624 void approximation_method(curve_approximation_method_e v)
625 {
626 m_approximation_method = v;
627 }
628
629 curve_approximation_method_e approximation_method() const
630 {
631 return m_approximation_method;
632 }
633
634 void approximation_scale(double s)
635 {
636 m_curve_inc.approximation_scale(s);

Callers 3

parse_pathMethod · 0.85
curve4Method · 0.85
curve4_relMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected