本文整理汇总了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);
}
}