diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2008-12-04 16:03:47 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2008-12-04 16:03:47 +0000 |
commit | b0bd4a7169a375ff74266d5cb15e817b1484dc07 (patch) | |
tree | 4d6aed10aaec67892ce1f0137726ebef60b6722e /src/renderer | |
parent | b322a8d3c8f26d9df21244319c3a2aa281795d07 (diff) | |
download | zetacomponents-graph-b0bd4a7169a375ff74266d5cb15e817b1484dc07.zip zetacomponents-graph-b0bd4a7169a375ff74266d5cb15e817b1484dc07.tar.gz |
- Implemented feature #014010: Possibility to set x/y offsets for
highlightValue (Patch by Markus Lervik)
Diffstat (limited to 'src/renderer')
-rw-r--r-- | src/renderer/2d.php | 10 | ||||
-rw-r--r-- | src/renderer/3d.php | 6 |
2 files changed, 12 insertions, 4 deletions
diff --git a/src/renderer/2d.php b/src/renderer/2d.php index a821d80..ac2ef93 100644 --- a/src/renderer/2d.php +++ b/src/renderer/2d.php @@ -946,6 +946,8 @@ class ezcGraphRenderer2d * @param string $text Acutual value * @param int $size Size of highlight text * @param ezcGraphColor $markLines + * @param int $xOffset + * @param int $yOffset * @return void */ public function drawDataHighlightText( @@ -958,14 +960,16 @@ class ezcGraphRenderer2d ezcGraphFontOptions $font, $text, $size, - ezcGraphColor $markLines = null ) + ezcGraphColor $markLines = null, + $xOffset = 0, + $yOffset = 0 ) { $this->driver->options->font = $font; $width = $boundings->width / $dataCount; $dataPoint = new ezcGraphCoordinate( - $boundings->x0 + ( $boundings->width ) * $end->x, - $boundings->y0 + ( $boundings->height ) * $end->y + $boundings->x0 + ( $boundings->width ) * $end->x + $xOffset, + $boundings->y0 + ( $boundings->height ) * $end->y + $yOffset ); if ( $end->y < $axisPosition ) diff --git a/src/renderer/3d.php b/src/renderer/3d.php index cb0ed2a..311f55f 100644 --- a/src/renderer/3d.php +++ b/src/renderer/3d.php @@ -1550,6 +1550,8 @@ class ezcGraphRenderer3d * @param string $text Acutual value * @param int $size Size of highlight text * @param ezcGraphColor $markLines + * @param int $xOffset + * @param int $yOffset * @return void */ public function drawDataHighlightText( @@ -1562,7 +1564,9 @@ class ezcGraphRenderer3d ezcGraphFontOptions $font, $text, $size, - ezcGraphColor $markLines = null ) + ezcGraphColor $markLines = null, + $xOffset = 0, + $yOffset = 0 ) { $this->driver->options->font = $font; $width = $this->dataBoundings->width / $dataCount; |