本文整理匯總了PHP中Axis::getDistance方法的典型用法代碼示例。如果您正苦於以下問題:PHP Axis::getDistance方法的具體用法?PHP Axis::getDistance怎麽用?PHP Axis::getDistance使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Axis
的用法示例。
在下文中一共展示了Axis::getDistance方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: drawEnvelope
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);
}
}