本文整理汇总了PHP中Rectangle::html方法的典型用法代码示例。如果您正苦于以下问题:PHP Rectangle::html方法的具体用法?PHP Rectangle::html怎么用?PHP Rectangle::html使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Rectangle
的用法示例。
在下文中一共展示了Rectangle::html方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: quantumLayoutParams
//.........这里部分代码省略.........
// Recurse on R1 to compute better box2
if ($debug) {
echo "<b>Recurse on R1 to get better box2</b><br />";
}
if (count($l1) != 0) {
if (count($l1) > 1) {
$r1AR = $r1->aspectRatio();
if ($r1AR == 1) {
$newGrowWidth = $growWide;
} else {
$newGrowWidth = $r1AR >= 1 ? true : false;
}
$l1boxes = $this->quantumLayoutParams($l1, $r1, $newGrowWide);
} else {
$l1boxes[0] = $r1;
}
$l1FinalBox = $this->computeUnion($l1boxes);
if ($growWide) {
$box2->h = $r1->h;
} else {
$box2->w = $r1->w;
}
/*
echo "Final R1 box=";
$l1FinalBox->Dump();
echo '<br />';
echo "box2=";
$box2->Dump();
echo '<br />';
*/
}
// Display
if ($debug) {
$box->html();
$l1FinalBox->html('green', 'l1');
$box2->html();
}
// Then compute R2 and R3
$box2AR = $box2->aspectRatio();
$first = true;
$bestAR = 0.0;
$bestdim1 = array();
$bestIndex = 0;
for ($i = $pivotIndex + 1; $i < count($sizes); $i++) {
$l2Size = $this->computeSizeBetween($sizes, $pivotIndex + 1, $i);
$ratio = $pivotSize / ($pivotSize + $l2Size);
if ($growWide) {
$h1 = (int) ceil($ratio * $box2->h);
$dim1 = $this->computeTableLayoutGivenHeight($pivotSize, $h1);
} else {
$w1 = (int) ceil($ratio * $box2->w);
$dim1 = $this->computeTableLayoutGivenWidth($pivotSize, $w1);
}
$pivotAR = max($dim1[0] / $dim1[1], $dim1[1] / $dim1[0]);
if ($first || $pivotAR < $bestAR) {
$first = false;
$bestAR = $pivotAR;
$bestdim1 = $dim1;
$bestl2Size = $l2Size;
$bestIndex = $i;
}
}
//echo "Best split: pivot=$pivotIndex, bestIndex=$bestIndex, bestAR=$bestAR, bestdim1=[" . $bestdim1[0] . ',' . $bestdim1[1] . "]<br />";
$l2 = array();
if ($bestIndex > 0) {
$l2 = array_slice($sizes, $pivotIndex + 1, $bestIndex - $pivotIndex);