:mod:`pygame2.sdlgfx.primitives` -- SDL_gfx primitives drawing module
=====================================================================

SDL_gfx primitives drawing module

.. module:: pygame2.sdlgfx.primitives
   :synopsis: SDL_gfx primitives drawing module

Module Functions
----------------
.. function:: aacircle (surface, x, y, radius, color) -> None
              aacircle (surface, point, radius, color) -> None

  Draws an anti-aliased circular shape on a surface.

  Draws a anti-aliased circular shape on a *surface* with a fixed line
  width of 1px. The *x*, *y* point denotes the center of the circle.



.. function:: aaellipse (surface, x, y, rx, ry, color) -> None
              aaellipse (surface, point, radius, color) -> None

  Draws an anti-aliased elliptical shape on a surface.

  Draws an anti-aliased elliptical shape on a *surface* with a fixed
  line width of 1px. The *x*, *y* tuple denotes the center of the
  ellipse, *rx*, *ry* the radius for the x- and y-axis.



.. function:: aaline (surface, x1, y1, x2, y2, color) -> None
              aaline (surface, point1, point2, color) -> None

  Draws an anti-aliased line on a surface.

  Draws an anti-aliased line on a *surface* with a fixed width of
  1px. *x1*, *y1* and *x2*, *y2* denote the start and end position
  of the line.



.. function:: aapolygon (surface, (point1, point2, ...), color) -> None

  Draws an anti-aliased polygonal shape on a surface.

  Draws an anti-aliased polygonal shape on a *surface* with an fixed line
  width of 1px.



.. function:: aatrigon (surface, x1, y1, x2, y2, x3, y3, color) -> None
              aatrigon (surface, point1, point2, point3, color) -> None

  Draws an anti-aliased triangular shape on a surface.

  Draws an anti-aliased triangular shape on a *surface* with an fixed
  line width of 1px. The three *x*, *y* points denote the edges of
  the triangle.



.. function:: arc (surface, x, y, radius, startangle, stopangle, color) -> None
              arc (surface, point, radius, startangle, stopangle, color) -> None

  Draws an elliptical arc on a surface.

  Draws an elliptical arc on a *surface*. The *startangle* and
  *stopangle* arguments are the initial and final angle in degrees.



.. function:: bezier (surface, (point1, point2, ...), steps, color) -> None

  Draws a bezier curve on a surface.

  Draws a bezier curve through the given points on a *surface*. *steps*
  denotes the amount of steps to perform for interpolating the curve.



.. function:: box (surface, rect, color) -> None

  Draws a filled rectangular shape on a surface.

  Draws a filled rectangular shape on a surface.



.. function:: circle (surface, x, y, radius, color) -> None
              circle (surface, point, radius, color) -> None

  Draws a circular shape on a surface.

  Draws a circular shape on a *surface* with a fixed line width of
  1px. The *x*, *y* point denotes the center of the circle.



.. function:: ellipse (surface, x, y, rx, ry, color) -> None
              ellipse (surface, point, radius, color) -> None

  Draws an elliptical shape on a surface.

  Draws an elliptical shape on a *surface* with a fixed line width of
  1px.  The *x*, *y* point denotes the center of the ellipse, *rx*,
  *ry* the radius for the x- and y-axis.



.. function:: filled_circle (surface, x, y, radius, color) -> None
              filled_circle (surface, point, radius, color) -> None

  Draws a filled circular shape on a surface.

  Draws a filled circular shape on a *surface*. The *x*, *y* point
  denotes the center of the circle.



.. function:: filled_ellipse (surface, x, y, rx, ry, color) -> None
              filled_ellipse (surface, point, radius, color) -> None

  Draws a filled elliptical shape on a surface.

  Draws a filled elliptical shape on a *surface*. The *x*, *y* point
  denotes the center of the ellipse, *rx*, *ry* the radius for the
  x- and y-axis.



.. function:: filled_pie (surface, x, y, r, startangle, stopangle, color) -> None
              filled_pie (surface, point, r, startangle, stopangle, color) -> None

  Draws a filled pie-like shape on a surface.

  Draws a filled pie-like shape on a *surface*. The *x*, *y* point
  denotes the center of the pie segment, *startangle* and
  *stopangle* the initial and final angle in degrees.



.. function:: filled_polygon (surface, (point1, point2, ...), color) -> None

  Draws a filled polygonal shape on a surface.

  Draws a filled polygonal shape on a *surface*.



.. function:: filled_trigon (surface, x1, y1, x2, y2, x3, y3, color) -> None
              filled_trigon (surface, point1, point2, point3, color) -> None

  Draws a filled triangular shape on a surface.

  Draws a filled triangular shape on a *surface*. The three *x*, *y*
  points denote the edges of the triangle.



.. function:: hline (surface, x1, x2, y, color) -> None

  Draws a horizontal line on a surface.

  Draws a horizontal line on a *surface* with the fixed width of 1 px.
  *x1* and *x2* denote the start and end position on the x-axis, *y*
  the vertical position of the line on the y-axis.



.. function:: line (surface, x1, y1, x2, y2, color) -> None
              line (surface, point1, point2, color) -> None

  Draws a line on a surface.

  Draws a line on a *surface* with a fixed width of 1px. *x1*, *y1*
  and *x2*, *y2* denote the start and end position of the line.



.. function:: pie (surface, x, y, r, startangle, stopangle, color) -> None
              pie (surface, point, r, startangle, stopangle, color) -> None

  Draws a pie-like shape on a surface.

  Draws a pie-like shape on a *surface* with a fixed width of 1px. The
  *x*, *y* point denotes the center of the pie segment, *startangle*
  and *stopangle* the initial and final angle in degrees.



.. function:: pixel (surface, x, y, color) -> None
              pixel (surface, point, color) -> None

  Draws a single pixel on a surface.

  Draws a single pixel on a *surface*.



.. function:: polygon (surface, ((x1, y1), (x2, y2), ...), color) -> None

  Draws a polygonal shape on a surface.

  Draws a polygonal shape on a *surface*.



.. function:: rectangle (surface, rect, color) -> None

  Draws a rectangular shape on a surface.

  Draws a rectangular shape on a *surface*.



.. function:: textured_polygon (surface, (point1, point2, ...), texture, tx, ty) -> None
              textured_polygon (surface, (point1, point2, ...), texture, tpoint) -> None

  Draws a textured polygonal shape on a surface.

  Draws a textured polygonal shape on a *surface*. *texture* is a
  :class:`pygame2.sdl.video.Surface` to be used for filling the shape,
  *tx*, *ty* are the offset of the texture relative to the screen.



.. function:: trigon (surface, x1, y1, x2, y2, x3, y3, color) -> None
              trigon (surface, point1, point2, point3, color) -> None

  Draws a triangular shape on a surface.

  Draws a filled triangular shape on a *surface* with a fixed line
  width of 1px. The three *x*, *y* points denote the edges of the
  triangle.



.. function:: vline (surface, x, y1, y2, color) -> None

  Draws a vertical line on a surface.

  Draws a vertical line on a *surface* with a fixed width of 1px. *y1*
  and *y2* denote the start and end position on the y-axis, *x* the
  horizontal position of the line on the x-axis.




