OSDL::Video::TwoDimensional::Line Namespace Reference


Detailed Description

This namespace gathers all line-oriented graphics output.

Colors expressed as raw (non-converted to surface's pixel format) 32-bit color must respect the 0xRRGGBBAA structure, i.e. one byte for each of the four color components.

Note:
Line clipping is elementary : a line will not be drawn unless both endpoints are in clipped area. However, a line might be partially visible even if neither of them are in clipping area, therefore an improvement would be to draw the onscreen remaining part.


Functions

OSDL_DLL bool drawHorizontal (Surface &targetSurface, Coordinate xStart, Coordinate xStop, Coordinate y, Pixels::ColorElement red, Pixels::ColorElement green, Pixels::ColorElement blue, Pixels::ColorElement alpha=Pixels::AlphaOpaque) throw ()
 Draws an horizontal line ranging from point (xStart;y), included, to point (xStop;y), which is included if and only if endpoint drawing mode is set, with specified RGBA color.
OSDL_DLL bool drawHorizontal (Surface &targetSurface, Coordinate xStart, Coordinate xStop, Coordinate y, Pixels::PixelColor actualColor) throw ()
 Draws an horizontal line ranging from point (xStart;y), included, to point (xStop;y), which is included if and only if endpoint drawing mode is set, with specified RGBA color, already expressed according to targetSurface pixel format.
OSDL_DLL bool drawHorizontal (Surface &targetSurface, Coordinate xStart, Coordinate xStop, Coordinate y, Pixels::ColorDefinition=Pixels::White) throw ()
 Draws an horizontal line ranging from point (xStart;y), included, to point (xStop;y), which is included if and only if endpoint drawing mode is set, with specified RGBA color.
OSDL_DLL bool drawVertical (Surface &targetSurface, Coordinate x, Coordinate yStart, Coordinate yStop, Pixels::ColorElement red, Pixels::ColorElement green, Pixels::ColorElement blue, Pixels::ColorElement alpha=Pixels::AlphaOpaque) throw ()
 Draws a vertical line ranging from point (x;yStart), included, to point (x;yStop), which is included if and only if endpoint drawing mode is set, with specified RGBA color.
OSDL_DLL bool drawVertical (Surface &targetSurface, Coordinate x, Coordinate yStart, Coordinate yStop, Pixels::ColorDefinition=Pixels::White) throw ()
 Draws a vertical line ranging from point (x;yStart), included, to point (x;yStop), which is included if and only if endpoint drawing mode is set, with specified RGBA color.
OSDL_DLL bool draw (Surface &targetSurface, Coordinate xStart, Coordinate yStart, Coordinate xStop, Coordinate yStop, Pixels::ColorElement red, Pixels::ColorElement green, Pixels::ColorElement blue, Pixels::ColorElement alpha=Pixels::AlphaOpaque) throw ()
 Draws a line ranging from point (xStart;yStart), included, to point (xStop;yStop), which is included if and only if endpoint drawing mode is set, with specified RGBA color.
OSDL_DLL bool draw (Surface &targetSurface, Coordinate xStart, Coordinate yStart, Coordinate xStop, Coordinate yStop, Pixels::ColorDefinition colorDef=Pixels::White) throw ()
 Draws a line ranging from point (xStart;yStart), included, to point (xStop;yStop), which is included if and only if endpoint drawing mode is set, with specified RGBA color.
OSDL_DLL bool draw (Surface &targetSurface, Point2D &firstPoint, Point2D &secondPoint, Pixels::ColorElement red, Pixels::ColorElement green, Pixels::ColorElement blue, Pixels::ColorElement alpha=Pixels::AlphaOpaque) throw ()
 Draws a line ranging from firstpoint, included, to secondPoint, which is included if and only if endpoint drawing mode is set, with specified RGBA color.
OSDL_DLL bool draw (Surface &targetSurface, Point2D &firstPoint, Point2D &secondPoint, Pixels::ColorDefinition colorDef=Pixels::White) throw ()
 Draws a line ranging from firstpoint, included, to secondPoint, which is included if and only if endpoint drawing mode is set, with specified RGBA color.
OSDL_DLL bool drawCross (Surface &targetSurface, const Point2D &center, Pixels::ColorDefinition colorDef=Pixels::White, Length squareEdge=5) throw ()
 Draws a cross centered in center, included in a square whose length of edge is squareEdge.
OSDL_DLL bool drawCross (Surface &targetSurface, Coordinate xCenter, Coordinate yCenter, Pixels::ColorDefinition colorDef=Pixels::White, Length squareEdge=5) throw ()
 Draws a cross centered in center, included in a square whose length of edge is squareEdge.


Function Documentation

bool OSDL::Video::TwoDimensional::Line::draw ( Surface targetSurface,
Point2D firstPoint,
Point2D secondPoint,
Pixels::ColorDefinition  colorDef = Pixels::White 
) throw ()

Draws a line ranging from firstpoint, included, to secondPoint, which is included if and only if endpoint drawing mode is set, with specified RGBA color.

Returns:
false if and only if something went wrong, for example if surface locking failed.
Note:
Locks surface if needed.

Clipping is performed.

This line will be antialiased if antialias mode is set.

See also:
drawHorizontal, drawVertical

VideoModule::GetEndPointDrawState, VideoModule::GetAntiAliasingState

Definition at line 190 of file OSDLLine.cc.

Referenced by OSDL::Video::TwoDimensional::UprightRectangle::draw(), draw(), drawCross(), and OSDL::Video::Surface::drawLine().

bool OSDL::Video::TwoDimensional::Line::draw ( Surface targetSurface,
Point2D firstPoint,
Point2D secondPoint,
Pixels::ColorElement  red,
Pixels::ColorElement  green,
Pixels::ColorElement  blue,
Pixels::ColorElement  alpha = Pixels::AlphaOpaque 
) throw ()

Draws a line ranging from firstpoint, included, to secondPoint, which is included if and only if endpoint drawing mode is set, with specified RGBA color.

Returns:
false if and only if something went wrong, for example if surface locking failed.
Note:
Locks surface if needed.

Clipping is performed.

This line will be antialiased if antialias mode is set.

See also:
drawHorizontal, drawVertical

VideoModule::GetEndPointDrawState, VideoModule::GetAntiAliasingState

Definition at line 176 of file OSDLLine.cc.

References draw().

bool OSDL::Video::TwoDimensional::Line::draw ( Surface targetSurface,
Coordinate  xStart,
Coordinate  yStart,
Coordinate  xStop,
Coordinate  yStop,
Pixels::ColorDefinition  colorDef = Pixels::White 
) throw ()

Draws a line ranging from point (xStart;yStart), included, to point (xStop;yStop), which is included if and only if endpoint drawing mode is set, with specified RGBA color.

Returns:
false if and only if something went wrong, for example if surface locking failed.
Note:
Locks surface if needed.

Clipping is performed.

This line will be antialiased if antialias mode is set.

See also:
drawHorizontal, drawVertical

VideoModule::GetEndPointDrawState, VideoModule::GetAntiAliasingState

Definition at line 144 of file OSDLLine.cc.

References aalineColorInt(), and OSDL::Video::Pixels::convertColorDefinitionToRawPixelColor().

bool OSDL::Video::TwoDimensional::Line::draw ( Surface targetSurface,
Coordinate  xStart,
Coordinate  yStart,
Coordinate  xStop,
Coordinate  yStop,
Pixels::ColorElement  red,
Pixels::ColorElement  green,
Pixels::ColorElement  blue,
Pixels::ColorElement  alpha = Pixels::AlphaOpaque 
) throw ()

Draws a line ranging from point (xStart;yStart), included, to point (xStop;yStop), which is included if and only if endpoint drawing mode is set, with specified RGBA color.

Returns:
false if and only if something went wrong, for example if surface locking failed.
Note:
Locks surface if needed.

Clipping is performed.

This line will be antialiased if antialias mode is set.

See also:
drawHorizontal, drawVertical

VideoModule::GetEndPointDrawState, VideoModule::GetAntiAliasingState

Definition at line 104 of file OSDLLine.cc.

References aalineColorInt().

bool OSDL::Video::TwoDimensional::Line::drawCross ( Surface targetSurface,
Coordinate  xCenter,
Coordinate  yCenter,
Pixels::ColorDefinition  colorDef = Pixels::White,
Length  squareEdge = 5 
) throw ()

Draws a cross centered in center, included in a square whose length of edge is squareEdge.

Note:
Useful to mark a specified pixel.

Locks surface if needed.

Clipping is performed.

This cross will be antialiased if antialias mode is set.

Returns:
false if and only if something went wrong, for example if surface locking failed.

Definition at line 213 of file OSDLLine.cc.

References draw().

Referenced by OSDL::Video::Surface::drawCross(), and drawCross().

bool OSDL::Video::TwoDimensional::Line::drawCross ( Surface targetSurface,
const Point2D center,
Pixels::ColorDefinition  colorDef = Pixels::White,
Length  squareEdge = 5 
) throw ()

Draws a cross centered in center, included in a square whose length of edge is squareEdge.

Note:
Useful to mark a specified pixel.

Locks surface if needed.

Clipping is performed.

This cross will be antialiased if antialias mode is set.

Returns:
false if and only if something went wrong, for example if surface locking failed.

Definition at line 202 of file OSDLLine.cc.

References drawCross().

bool OSDL::Video::TwoDimensional::Line::drawHorizontal ( Surface targetSurface,
Coordinate  xStart,
Coordinate  xStop,
Coordinate  y,
Pixels::ColorDefinition  = Pixels::White 
) throw ()

Draws an horizontal line ranging from point (xStart;y), included, to point (xStop;y), which is included if and only if endpoint drawing mode is set, with specified RGBA color.

Returns:
false if and only if something went wrong, for example if surface locking failed.
Note:
Locks surface if needed.

Clipping is performed.

This line will be antialiased if antialias mode is set.

See also:
drawVertical, draw

VideoModule::GetEndPointDrawState

Definition at line 59 of file OSDLLine.cc.

References OSDL::Video::Pixels::convertColorDefinitionToRawPixelColor().

Referenced by OSDL::Video::Surface::drawHorizontalLine().

bool OSDL::Video::TwoDimensional::Line::drawHorizontal ( Surface targetSurface,
Coordinate  xStart,
Coordinate  xStop,
Coordinate  y,
Pixels::PixelColor  actualColor 
) throw ()

Draws an horizontal line ranging from point (xStart;y), included, to point (xStop;y), which is included if and only if endpoint drawing mode is set, with specified RGBA color, already expressed according to targetSurface pixel format.

Returns:
false if and only if something went wrong, for example if surface locking failed.
Note:
Locks surface if needed.

Clipping is performed.

This line will be antialiased if antialias mode is set.

See also:
drawVertical, draw

VideoModule::GetEndPointDrawState

Definition at line 45 of file OSDLLine.cc.

References hlineColorStore().

bool OSDL::Video::TwoDimensional::Line::drawHorizontal ( Surface targetSurface,
Coordinate  xStart,
Coordinate  xStop,
Coordinate  y,
Pixels::ColorElement  red,
Pixels::ColorElement  green,
Pixels::ColorElement  blue,
Pixels::ColorElement  alpha = Pixels::AlphaOpaque 
) throw ()

Draws an horizontal line ranging from point (xStart;y), included, to point (xStop;y), which is included if and only if endpoint drawing mode is set, with specified RGBA color.

Returns:
false if and only if something went wrong, for example if surface locking failed.
Note:
Locks surface if needed.

Clipping is performed.

This line will be antialiased if antialias mode is set.

See also:
drawVertical, draw

VideoModule::GetEndPointDrawState

Definition at line 27 of file OSDLLine.cc.

bool OSDL::Video::TwoDimensional::Line::drawVertical ( Surface targetSurface,
Coordinate  x,
Coordinate  yStart,
Coordinate  yStop,
Pixels::ColorDefinition  = Pixels::White 
) throw ()

Draws a vertical line ranging from point (x;yStart), included, to point (x;yStop), which is included if and only if endpoint drawing mode is set, with specified RGBA color.

Returns:
false if and only if something went wrong, for example if surface locking failed.
Note:
Locks surface if needed.

Clipping is performed.

This line will be antialiased if antialias mode is set.

See also:
drawHorizontal, draw

VideoModule::GetEndPointDrawState

Definition at line 91 of file OSDLLine.cc.

References OSDL::Video::Pixels::convertColorDefinitionToRawPixelColor().

Referenced by OSDL::Video::Surface::drawVerticalLine().

bool OSDL::Video::TwoDimensional::Line::drawVertical ( Surface targetSurface,
Coordinate  x,
Coordinate  yStart,
Coordinate  yStop,
Pixels::ColorElement  red,
Pixels::ColorElement  green,
Pixels::ColorElement  blue,
Pixels::ColorElement  alpha = Pixels::AlphaOpaque 
) throw ()

Draws a vertical line ranging from point (x;yStart), included, to point (x;yStop), which is included if and only if endpoint drawing mode is set, with specified RGBA color.

Returns:
false if and only if something went wrong, for example if surface locking failed.
Note:
Locks surface if needed.

Clipping is performed.

This line will be antialiased if antialias mode is set.

See also:
drawHorizontal, draw

VideoModule::GetEndPointDrawState

Definition at line 73 of file OSDLLine.cc.


Generated on Fri Mar 30 14:47:36 2007 for OSDL by  doxygen 1.5.1