Drawing context for AnewtImage.
Drawing context for AnewtImage.
A drawing context keeps some drawing properties and offers drawing methods. Note that not all functions might be available on your particular setup (eg. anti-aliasing).
Add proper Doxygen method grouping marks.
color_at($x, $y) ¶Return the color value of the specified pixel.
$xX coordinate
$yY coordinate
Color value
draw_line($x1, $y1, $x2, $y2) ¶Draw a line from one point to another point.
$x1X coordinate of the first point
$y1Y coordinate of the first point
$x2X coordinate of the second point
$y2Y coordinate of the second point
draw_rectangle($x1, $y1, $x2, $y2) ¶Draw a rectangle.
$x1X coordinate of the top-left point
$y1X coordinate of the top-left point
$x2X coordinate of the bottom-right point
$y2X coordinate of the bottom-right point
draw_filled_rectangle($x1, $y1, $x2, $y2) ¶Draw a filled rectangle.
$x1X coordinate of the top-left point
$y1X coordinate of the top-left point
$x2X coordinate of the bottom-right point
$y2X coordinate of the bottom-right point
draw_rectangle_size($x, $y, $width, $height) ¶Draw a rectangle of a given width and height.
Negative width and height values cause the rectangle to be drawn from the bottom right coordinate, extending to the top left.
$xX coordinate of the top-left point
$yX coordinate of the top-left point
$widthWidth of the rectangle
$heightHeight of the rectangle
draw_filled_rectangle_size($x, $y, $width, $height) ¶Draw a filled rectangle of a given width and height.
Negative width and height values cause the rectangle to be drawn from the bottom right coordinate, extending to the top left.
$xX coordinate of the top-left point
$yX coordinate of the top-left point
$widthWidth of the rectangle
$heightHeight of the rectangle
draw_string($x, $y, $str) ¶Draw a simple string at the given point.
$xX coordinate
$yy coordinate
$strString to draw
This method doesn't work like it really should
__construct($image) [private] ¶Create a new drawing context.
Do not instantiate this class directly, use AnewtImage::create_drawing_context instead.
$imageA valid AnewtImage instance.
_install_gd_properties() [private] ¶Set the gd properties on the actual image instance.
All drawing methods should call this method before any GD function is invoked. This method shouldn't be called by non-drawing methods.
_draw_rectangle($x1, $y1, $x2, $y2, $filled) [private] ¶Draw a rectangle.
$x1X coordinate of the top-left point
$y1X coordinate of the top-left point
$x2X coordinate of the bottom-right point
$y2X coordinate of the bottom-right point
$filledWhether the rectangle is filled
_draw_rectangle_size($x, $y, $width, $height, $filled) [private] ¶Draw a rectangle of a given width and height.
Negative width and height values cause the rectangle to be drawn from the bottom right coordinate, extending to the top left.
$xX coordinate of the top-left point
$yX coordinate of the top-left point
$widthWidth of the rectangle
$heightHeight of the rectangle
$filledWhether the rectangle is filled
$image [private] ¶AnewtImage instance this AnewtImageDrawingContext belongs to.
AnewtContainer::_to_array()AnewtContainer::_add()AnewtContainer::delete()AnewtContainer::get()AnewtContainer::_isset()AnewtContainer::_seed()AnewtContainer::setdefault()AnewtContainer::getdefault()AnewtContainer::set()AnewtContainer::__isset()AnewtContainer::__set()AnewtContainer::is_set()AnewtContainer::add()AnewtContainer::_getdefault()AnewtContainer::__unset()AnewtContainer::seed()AnewtContainer::to_array()AnewtContainer::_get()AnewtContainer::__get()AnewtContainer::keys()AnewtContainer::clear()AnewtContainer::_keys()AnewtContainer::_set()