📄 phpchartdir.php
字号:
}
function rAffineTransform($a, $b, $c, $d, $e, $f, $bgColor = 0xffffff, $ft = LinearFilter, $blur = 1) {
callmethod("DrawArea.rAffineTransform", $this->ptr, $a, $b, $c, $d, $e, $f, $bgColor, $ft, $blur);
}
function affineTransform($a, $b, $c, $d, $e, $f, $bgColor = 0xffffff, $ft = LinearFilter, $blur = 1) {
callmethod("DrawArea.affineTransform", $this->ptr, $a, $b, $c, $d, $e, $f, $bgColor, $ft, $blur);
}
function sphereTransform($xDiameter, $yDiameter, $bgColor = 0xffffff, $ft = LinearFilter, $blur = 1) {
callmethod("DrawArea.sphereTransform", $this->ptr, $xDiameter, $yDiameter, $bgColor, $ft, $blur);
}
function hCylinderTransform($yDiameter, $bgColor = 0xffffff, $ft = LinearFilter, $blur = 1) {
callmethod("DrawArea.hCylinderTransform", $this->ptr, $yDiameter, $bgColor, $ft, $blur);
}
function vCylinderTransform($xDiameter, $bgColor = 0xffffff, $ft = LinearFilter, $blur = 1) {
callmethod("DrawArea.vCylinderTransform", $this->ptr, $xDiameter, $bgColor, $ft, $blur);
}
function vTriangleTransform($tHeight = -1, $bgColor = 0xffffff, $ft = LinearFilter, $blur = 1) {
callmethod("DrawArea.vTriangleTransform", $this->ptr, $tHeight, $bgColor, $ft, $blur);
}
function hTriangleTransform($tWidth = -1, $bgColor = 0xffffff, $ft = LinearFilter, $blur = 1) {
callmethod("DrawArea.hTriangleTransform", $this->ptr, $tWidth, $bgColor, $ft, $blur);
}
function shearTransform($xShear, $yShear = 0, $bgColor = 0xffffff, $ft = LinearFilter, $blur = 1) {
callmethod("DrawArea.shearTransform", $this->ptr, $xShear, $yShear, $bgColor, $ft, $blur);
}
function waveTransform($period, $amplitude, $direction = 0, $startAngle = 0, $longitudinal = 0,
$bgColor = 0xffffff, $ft = LinearFilter, $blur = 1) {
callmethod("DrawArea.waveTransform", $this->ptr, $period, $amplitude, $direction, $startAngle,
$longitudinal, $bgColor, $ft, $blur);
}
function out($filename) {
return callmethod("DrawArea.out", $this->ptr, $filename);
}
function outGIF($filename) {
return callmethod("DrawArea.outGIF", $this->ptr, $filename);
}
function outPNG($filename) {
return callmethod("DrawArea.outPNG", $this->ptr, $filename);
}
function outJPG($filename, $quality = 80) {
return callmethod("DrawArea.outJPG", $this->ptr, $filename, $quality);
}
function outWMP($filename) {
return callmethod("DrawArea.outWMP", $this->ptr, $filename);
}
function outBMP($filename) {
return callmethod("DrawArea.outBMP", $this->ptr, $filename);
}
function outGIF2() {
return callmethod("DrawArea.outGIF2", $this->ptr);
}
function outPNG2() {
return callmethod("DrawArea.outPNG2", $this->ptr);
}
function outJPG2($quality = 80) {
return callmethod("DrawArea.outJPG2", $this->ptr, $quality);
}
function outWMP2() {
return callmethod("DrawArea.outWMP2", $this->ptr);
}
function outBMP2() {
return callmethod("DrawArea.outBMP2", $this->ptr);
}
function setPaletteMode($p) {
callmethod("DrawArea.setPaletteMode", $this->ptr, $p);
}
function setDitherMethod($m) {
callmethod("DrawArea.setDitherMethod", $this->ptr, $m);
}
function setTransparentColor($c) {
callmethod("DrawArea.setTransparentColor", $this->ptr, $c);
}
function setAntiAliasText($a) {
callmethod("DrawArea.setAntiAliasText", $this->ptr, $a);
}
function setAntiAlias($shapeAntiAlias = 1, $textAntiAlias = AutoAntiAlias) {
callmethod("DrawArea.setAntiAlias", $this->ptr, $shapeAntiAlias, $textAntiAlias);
}
function setInterlace($i) {
callmethod("DrawArea.setInterlace", $this->ptr, $i);
}
function setColorTable($colors, $offset) {
callmethod("DrawArea.setColorTable", $this->ptr, $colors, $offset);
}
function getARGBColor($c) {
return callmethod("DrawArea.getARGBColor", $this->ptr, $c);
}
function dashLineColor($color, $dashPattern) {
return callmethod("DrawArea.dashLineColor", $this->ptr, $color, $dashPattern);
}
function patternColor($c, $h = 0, $startX = 0, $startY = 0) {
if (!is_array($c))
return $this->patternColor2($c, $h, $startX);
return callmethod("DrawArea.patternColor", $this->ptr, $c, $h, $startX, $startY);
}
function patternColor2($filename, $startX = 0, $startY = 0) {
return callmethod("DrawArea.patternColor2", $this->ptr, $filename, $startX, $startY);
}
function gradientColor($startX, $startY = 90, $endX = 1, $endY = 0, $startColor = 0, $endColor = Null) {
if (is_array($startX))
return $this->gradientColor2($startX, $startY, $endX, $endY, $startColor);
return callmethod("DrawArea.gradientColor", $this->ptr, $startX, $startY, $endX, $endY, $startColor, $endColor);
}
function gradientColor2($c, $angle = 90, $scale = 1, $startX = 0, $startY = 0) {
return callmethod("DrawArea.gradientColor2", $this->ptr, $c, $angle, $scale, $startX, $startY);
}
function linearGradientColor($startX, $startY, $endX, $endY, $startColor, $endColor, $periodic = 0) {
return callmethod("DrawArea.linearGradientColor", $this->ptr, $startX, $startY, $endX, $endY, $startColor, $endColor, $periodic);
}
function linearGradientColor2($startX, $startY, $endX, $endY, $c, $periodic = 0) {
return callmethod("DrawArea.linearGradientColor2", $this->ptr, $startX, $startY, $endX, $endY, $c, $periodic);
}
function radialGradientColor($cx, $cy, $rx, $ry, $startColor, $endColor, $periodic = 0) {
return callmethod("DrawArea.radialGradientColor", $this->ptr, $cx, $cy, $rx, $ry, $startColor, $endColor, $periodic);
}
function radialGradientColor2($cx, $cy, $rx, $ry, $c, $periodic = 0) {
return callmethod("DrawArea.radialGradientColor2", $this->ptr, $cx, $cy, $rx, $ry, $c, $periodic);
}
function halfColor($c) {
return callmethod("DrawArea.halfColor", $this->ptr, $c);
}
function reduceColors($colorCount, $blackAndWhite = 0) {
return callmethod("DrawArea.reduceColors", $this->ptr, $colorCount, $blackAndWhite);
}
function setDefaultFonts($normal, $bold = "", $italic = "", $boldItalic = "") {
callmethod("DrawArea.setDefaultFonts", $this->ptr, $normal, $bold, $italic, $boldItalic);
}
function setFontTable($index, $font) {
callmethod("DrawArea.setFontTable", $this->ptr, $index, $font);
}
}
#///////////////////////////////////////////////////////////////////////////////////
#// bindings to drawobj.h
#///////////////////////////////////////////////////////////////////////////////////
class Box {
function Box($ptr) {
$this->ptr = $ptr;
}
function setPos($x, $y) {
callmethod("Box.setPos", $this->ptr, $x, $y);
}
function setSize($w, $h) {
callmethod("Box.setSize", $this->ptr, $w, $h);
}
function getWidth() {
return callmethod("Box.getWidth", $this->ptr);
}
function getHeight() {
return callmethod("Box.getHeight", $this->ptr);
}
function setBackground($color, $edgeColor = -1, $raisedEffect = 0) {
callmethod("Box.setBackground", $this->ptr, $color, $edgeColor, $raisedEffect);
}
function setRoundedCorners($r1 = 10, $r2 = -1, $r3 = -1, $r4 = -1) {
callmethod("Box.setRoundedCorners", $this->ptr, $r1, $r2, $r3, $r4);
}
function getImageCoor($offsetX = 0, $offsetY = 0) {
return callmethod("Box.getImageCoor", $this->ptr, $offsetX, $offsetY);
}
}
class TextBox extends Box {
function TextBox($ptr) {
$this->ptr = $ptr;
}
function setText($text) {
callmethod("TextBox.setText", $this->ptr, $text);
}
function setAlignment($a) {
callmethod("TextBox.setAlignment", $this->ptr, $a);
}
function setFontStyle($font, $fontIndex = 0) {
callmethod("TextBox.setFontStyle", $this->ptr, $font, $fontIndex);
}
function setFontSize($fontHeight, $fontWidth = 0) {
callmethod("TextBox.setFontSize", $this->ptr, $fontHeight, $fontWidth);
}
function setFontAngle($angle, $vertical = 0) {
callmethod("TextBox.setFontAngle", $this->ptr, $angle, $vertical);
}
function setFontColor($color) {
callmethod("TextBox.setFontColor", $this->ptr, $color);
}
function setMargin2($leftMargin, $rightMargin, $topMargin, $bottomMargin) {
callmethod("TextBox.setMargin2", $this->ptr,
$leftMargin, $rightMargin, $topMargin, $bottomMargin);
}
function setMargin($m) {
callmethod("TextBox.setMargin", $this->ptr, $m);
}
function setWidth($width) {
callmethod("TextBox.setWidth", $this->ptr, $width);
}
function setHeight($height) {
callmethod("TextBox.setHeight", $this->ptr, $height);
}
function setMaxWidth($maxWidth) {
callmethod("TextBox.setMaxWidth", $this->ptr, $maxWidth);
}
function setZOrder($z) {
callmethod("TextBox.setZOrder", $this->ptr, $z);
}
function setTruncate($maxWidth, $maxLines = 1) {
callmethod("TextBox.setTruncate", $this->ptr, $maxWidth, $maxLines);
}
}
class Line {
function Line($ptr) {
$this->ptr = $ptr;
}
function setPos($x1, $y1, $x2, $y2) {
callmethod("Line.setPos", $this->ptr, $x1, $y1, $x2, $y2);
}
function setColor($c) {
callmethod("Line.setColor", $this->ptr, $c);
}
function setWidth($w) {
callmethod("Line.setWidth", $this->ptr, $w);
}
function setZOrder($z) {
callmethod("Line.setZOrder", $this->ptr, $z);
}
}
#///////////////////////////////////////////////////////////////////////////////////
#// bindings to basechart.h
#///////////////////////////////////////////////////////////////////////////////////
class LegendBox extends TextBox {
function LegendBox($ptr) {
$this->ptr = $ptr;
}
function setCols($noOfCols) {
callmethod("LegendBox.setCols", $this->ptr, $noOfCols);
}
function setReverse($b = 1) {
callmethod("LegendBox.setReverse", $this->ptr, $b);
}
function addKey($text, $color, $lineWidth = 0, $drawarea = Null) {
callmethod("LegendBox.addKey", $this->ptr, $text, $color, $lineWidth, decodePtr($drawarea));
}
function addKey2($pos, $text, $color, $lineWidth = 0, $drawarea = Null) {
callmethod("LegendBox.addKey2", $this->ptr, $pos, $text, $color, $lineWidth, decodePtr($drawarea));
}
function setKeySize($width, $height = -1, $gap = -1) {
callmethod("LegendBox.setKeySize", $this->ptr, $width, $height, $gap);
}
function setKeySpacing($keySpacing, $lineSpacing = -1) {
callmethod("LegendBox.setKeySpacing", $this->ptr, $keySpacing, $lineSpacing);
}
function setKeyBorder($edgeColor, $raisedEffect = 0) {
callmethod("LegendBox.setKeyBorder", $this->ptr, $edgeColor, $raisedEffect);
}
function getImageCoor2($dataItem, $offsetX = 0, $offsetY = 0) {
return callmethod("LegendBox.getImageCoor", $this->ptr, $dataItem, $offsetX, $offsetY);
}
function getHTMLImageMap($url, $queryFormat = "", $extraAttr = "", $offsetX = 0, $offsetY = 0) {
return callmethod("LegendBox.getHTMLImageMap", $this->ptr, $url, $queryFormat, $extraAttr, $offsetX, $offsetY);
}
}
class BaseChart {
function __del__() {
callmethod("BaseChart.destroy", $this->ptr);
}
#//////////////////////////////////////////////////////////////////////////////////////
#// set overall chart
#//////////////////////////////////////////////////////////////////////////////////////
function setSize($width, $height) {
callmethod("BaseChart.setSize", $this->ptr, $width, $height);
}
function setBorder($color) {
callmethod("BaseChart.setBorder", $this->ptr, $color);
}
function setRoundedFrame($extColor = 0xffffff, $r1 = 10, $r2 = -1, $r3 = -1, $r4 = -1) {
callmethod("BaseChart.setRoundedFrame", $this->ptr, $extColor, $r1, $r2, $r3, $r4);
}
function setBackground($bgColor, $edgeColor = -1, $raisedEffect = 0) {
callmethod("BaseChart.setBackground", $this->ptr, $bgColor, $edgeColor, $raisedEffect);
}
function setWallpaper($img) {
callmethod("BaseChart.setWallpaper", $this->ptr, $img);
}
function setBgImage($img, $align = Center) {
callmethod("BaseChart.setBgImage", $this->ptr, $img, $align);
}
function setTransparentColor($c) {
callmethod("BaseChart.setTransparentColor", $this->ptr, $c);
}
function setAntiAlias($antiAliasShape = 1, $antiAliasText = AutoAntiAlias) {
callmethod("BaseChart.setAntiAlias", $this->ptr, $antiAliasShape, $antiAliasText);
}
function setSearchPath($path) {
callmethod("BaseChart.setSearchPath", $this->ptr, $path);
}
function addTitle2($alignment, $text, $font = "", $fontSize = 12, $fontColor = TextColor,
$bgColor = Transparent, $edgeColor = Transparent) {
return new TextBox(callmethod("BaseChart.addTitle2", $this->ptr,
$alignment, $text, $font, $fontSize, $fontColor, $bgColor, $edgeColor));
}
function addTitle($text, $font = "", $fontSize = 12, $fontColor = TextColor,
$bgColor = Transparent, $edgeColor = Transparent) {
return new TextBox(callmethod("BaseChart.addTitle", $this->ptr,
$text, $font, $fontSize, $fontColor, $bgColor, $edgeColor));
}
function addLegend($x, $y, $vertical = 1, $font = "", $fontSize = 10) {
return new LegendBox(callmethod("BaseChart.addLegend", $this->ptr,
$x, $y, $vertical, $font, $fontSize));
}
function addLegend2($x, $y, $noOfCols, $font = "", $fontSize = 10) {
return new LegendBox(callmethod("BaseChart.addLegend2", $this->ptr,
$x, $y, $noOfCols, $font, $fontSize));
}
function getLegend() {
return new LegendBox(callmethod("BaseChart.getLegend", $this->ptr));
}
#//////////////////////////////////////////////////////////////////////////////////////
#// drawing primitives
#//////////////////////////////////////////////////////////////////////////////////////
function getDrawArea() {
return new DrawArea(callmethod("BaseChart.getDrawArea", $this->ptr));
}
function addDrawObj($obj) {
callmethod("BaseChart.addDrawObj", $obj->ptr);
return $obj;
}
function addText($x, $y, $text, $font = "", $fontSize = 8, $fontColor = TextColor,
$alignment = TopLeft, $angle = 0, $vertical = 0) {
return new TextBox(callmethod("BaseChart.addText", $this->ptr,
$x, $y, $text, $font, $fontSize, $fontColor, $alignment, $angle, $vertical));
}
function addLine($x1, $y1, $x2, $y2, $color = LineColor, $lineWidth = 1) {
return new Line(callmethod("BaseChart.addLine", $this->ptr,
$x1, $y1, $x2, $y2, $color, $lineWidth));
}
function addExtraField($texts) {
callmethod("BaseChart.addExtraField", $this->ptr, $texts);
}
function addExtraField2($numbers) {
callmethod("BaseChart.addExtraField2", $this->ptr, $numbers);
}
#//////////////////////////////////////////////////////////////////////////////////////
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -