:mod:`pygame2.sdlext.draw` -- extended SDL drawing methods
==========================================================

Extension module containing simple 2D drawing methods for the pygame2
SDL modules. Several methods utilize code from the SDL_gfx library, and
were optimised and changed in several ways.


.. module:: pygame2.sdlext.draw
   :synopsis: extended SDL drawing methods

Module Functions
----------------
.. function:: aaline (surface, color, x1, y1, x2, y2[, blend]) -> Rect
              aaline (surface, color, point1, point2[, blend]) -> Rect

  Draws a fine anti-aliased line.

  Draws an anti-aliased line on a *surface*. If *blend* is True, the
  shades will be be blended with existing pixel shades instead of
  overwriting them.

  The returned :class:`pygame2.Rect` describes the area affected by
  the changes.



.. function:: aalines (surface, color, (point1, point2, ...) [, blend]) -> Rect

  Draws multiple contiguous anti-aliased line segments on a surface.

  Draws a sequence of anti-aliased lines with a fixed width of 1px
  on a *surface*. If *blend* is True, the shades will be be blended
  with existing pixel shades instead of overwriting them.

  The returned :class:`pygame2.Rect` describes the area affected by
  the changes.



.. function:: aapolygon (surface, color, (point1, point2, ...) [, blend]) -> Rect

  Draws an anti-aliased polygonal shape on a surface.

  Draws an polygonal shape on a *surface* with an fixed line width of
  1px. If *blend* is true, the shades will be be blended with existing
  pixel shades instead of overwriting them.

  The returned :class:`pygame2.Rect` describes the area affected by the
  changes.



.. function:: arc (surface, color, rect, startangle, stopangle[, width]) -> Rect

  Draws an elliptical arc on a surface.

  Draws an elliptical arc on a *surface* with an optionally
  specified line width. If the *width* argument is omitted, the line
  will be 1px thick. If *width* is set to 0, a filled shape will be
  drawn. The *startangle* and *stopangle* arguments are the initial
  and final angle in degrees.

  The returned :class:`pygame2.Rect` describes the area affected by the
  changes.



.. function:: circle (surface, color, x, y, radius[, width]) -> Rect
              circle (surface, color, point, radius[, width]) -> Rect

  Draws a circular shape on a surface.

  Draws a circular shape on a *surface* with an optionally specified
  line width. If the *width* argument is omitted, the line will be
  1px thick. If *width* is set to 0, a filled circular shape will be
  drawn. The *x*, *y* point denotes the center of the circle.

  The returned :class:`pygame2.Rect` describes the area affected by the
  changes.



.. function:: ellipse (surface, color, rect[, width]) -> Rect

  Draws an elliptical shape on a surface.

  Draws an elliptical shape on a *surface* with an optionally
  specified line width. If the *width* argument is omitted, the line
  will be 1px thick. If *width* is set to 0, a filled elliptical
  shape will be drawn. The passed :class:`pygame2.Rect` denotes the
  area, the elliptical shape will be drawn in.

  The returned :class:`pygame2.Rect` describes the area affected by the
  changes.



.. function:: line (surface, color, x1, y1, x2, y2[, width]) -> Rect
              line (surface, color, point1, point2[, width]) -> Rect

  Draws a straight line segment on a surface.

  Draws a straight line segment on a *surface* with an optionally
  specified line width. If the *width* argument is omitted, the line
  will be 1px thick. There are no endcaps, the ends are squared off
  for thick lines.

  The returned :class:`pygame2.Rect` describes the area affected by the
  changes.



.. function:: lines (surface, color, (point1, point2, ...) [, width]) -> Rect

  Draws multiple contiguous line segments on a surface.

  Draws a sequence of lines on a *surface* with an optionally
  specified line width. If the *width* argument is omitted, the
  lines will be 1px thick.

  The returned :class:`pygame2.Rect` describes the area affected by the
  changes.



.. function:: polygon (surface, color, (point1, point2), ...) [, width]) -> Rect

  Draws a polygonal shape on a surface.

  Draws a polygonal shape on a *surface* with an optionally
  specified line width. If the *width* argument is omitted, the line
  will be 1px thick. If *width* is set to 0, a filled polygon will
  be drawn.

  The returned :class:`pygame2.Rect` describes the area affected by the
  changes.



.. function:: rect (surface, color, rect [, width]) -> Rect

  Draws a rectangular shape on a surface.

  Draws a rectangular shape on a *surface* with an optionally
  specified line width. If the *width* argument is omitted, the line
  will be 1px thick. If the *width* is set to 0, a filled
  rectangular shape will be drawn.

  The returned :class:`pygame2.Rect` describes the area affected by the
  changes.




