public function drawEnvelope(awDriver $driver) { list($x1, $y1, $x2, $y2) = $this->getPosition(); if ($this->getXCenter()) { $size = $this->xAxis->getDistance(0, 1); $this->xAxis->label->move($size / 2, 0); $this->xAxis->label->hideLast(TRUE); } // Draw top axis if ($this->xAxisPosition === awPlot::TOP or $this->xAxisPosition === awPlot::BOTH) { $top = clone $this->xAxis; if ($this->xAxisZero === FALSE) { $top->line->setY($y1, $y1); } $top->label->setAlign(NULL, awLabel::TOP); $top->label->move(0, -3); $top->title->move(0, -25); $top->draw($driver); } // Draw bottom axis if ($this->xAxisPosition === awPlot::BOTTOM or $this->xAxisPosition === awPlot::BOTH) { $bottom = clone $this->xAxis; if ($this->xAxisZero === FALSE) { $bottom->line->setY($y2, $y2); } $bottom->label->setAlign(NULL, awLabel::BOTTOM); $bottom->label->move(0, 3); $bottom->reverseTickStyle(); $bottom->title->move(0, 25); $bottom->draw($driver); } // Draw left axis if ($this->yAxisPosition === awPlot::LEFT or $this->yAxisPosition === awPlot::BOTH) { $left = clone $this->yAxis; if ($this->yAxisZero === FALSE) { $left->line->setX($x1, $x1); } $left->label->setAlign(awLabel::RIGHT); $left->label->move(-6, 0); $left->title->move(-25, 0); $left->draw($driver); } // Draw right axis if ($this->yAxisPosition === awPlot::RIGHT or $this->yAxisPosition === awPlot::BOTH) { $right = clone $this->yAxis; if ($this->yAxisZero === FALSE) { $right->line->setX($x2, $x2); } $right->label->setAlign(awLabel::LEFT); $right->label->move(6, 0); $right->reverseTickStyle(); $right->title->move(25, 0); $right->draw($driver); } }