pleyo.com

BAL::BCGraphicsDeviceSDL Class Reference

The BIGraphicsDevice implementation. More...

#include <BCGraphicsDeviceSDL.h>

Inheritance diagram for BAL::BCGraphicsDeviceSDL:

BAL::BIGraphicsDevice

List of all members.

Public Member Functions

 BCGraphicsDeviceSDL ()
virtual void initialize (uint16_t width, uint16_t height, uint8_t depth)
 Initialize an allocate the buffer.
virtual void finalize ()
 deallocate all surfaces allocated through intialize() method.
virtual BINativeImagecreateNativeImage (const WebCore::IntSize size)
 Create an empty buffer called NativeImage which can be blitted into primary buffer.
virtual BINativeImagecreateNativeImage (RGBA32Array &, const WebCore::IntSize size)
 Create a buffer filled with data from an RGBA32Array.
virtual void copy (const BTWidget &, const BINativeImage &, WebCore::IntRect, WebCore::IntPoint, const uint8_t alphaChannel)
 Copy a NativeImage (buffer) into a widget buffer.
virtual void drawArc (const BTWidget &, const IntRect rect, uint16_t startAngle, uint16_t angleSpan, const WebCore::Color)
virtual void drawEllipse (const BTWidget &, WebCore::IntRect, const WebCore::Color)
 draw an ellipse into widget buffer.
virtual void drawLine (const BTWidget &, WebCore::IntPoint, WebCore::IntPoint, const WebCore::Color)
 draw an line into widget buffer.
virtual void drawRect (const BTWidget &, WebCore::IntRect, const WebCore::Color)
 draw an empty rectangle into widget buffer.
virtual void fillConvexPolygon (const BTWidget &, size_t numPoints, const WebCore::IntPoint *, const WebCore::Color)
 Draw a filled convex polygon into widget buffer.
virtual void fillRect (const BTWidget &, WebCore::IntRect, const WebCore::Color)
 Draw a filled rectangle into widget buffer.
virtual void setClip (const BTWidget &, WebCore::IntRect)
 Set a clipping zone for the widget buffer.
virtual IntRect clip (const BTWidget &)
 Get the clipping zone for the widget buffer.
virtual void stretchBlit (const BTWidget &, const BINativeImage &, WebCore::IntRect src, WebCore::IntRect dst, const uint8_t alphaChannel)
 Stretch a buffer and blit it into the widget buffer.
virtual WebCore::IntSize size () const
 Get the size of the Graphics device.
virtual void update (const BTWidget &, const WebCore::IntRect)
 Update zone in the widget buffer.
virtual void clear (const BTWidget &, const WebCore::IntRect)
 Clear a zone in the widget buffer FIXME should redraw with background color.


Detailed Description

The BIGraphicsDevice implementation.

See also:
Font, FontData

Constructor & Destructor Documentation

BAL::BCGraphicsDeviceSDL::BCGraphicsDeviceSDL (  ) 


Member Function Documentation

void BAL::BCGraphicsDeviceSDL::initialize ( uint16_t  width,
uint16_t  height,
uint8_t  depth 
) [virtual]

Initialize an allocate the buffer.

Use the implementation header if the buffer is own by another object and simply passed in argument.

Parameters:
[in] width,: width of the buffer to allocate
[in] height,: height of the buffer to allocate
[in] depth,: depth of the buffer to allocate

Implements BAL::BIGraphicsDevice.

void BAL::BCGraphicsDeviceSDL::finalize (  )  [virtual]

deallocate all surfaces allocated through intialize() method.

Implements BAL::BIGraphicsDevice.

virtual BINativeImage* BAL::BCGraphicsDeviceSDL::createNativeImage ( const WebCore::IntSize  size  )  [virtual]

Create an empty buffer called NativeImage which can be blitted into primary buffer.

Parameters:
[in] IntSize,: size of the buffer to allocate

Implements BAL::BIGraphicsDevice.

BINativeImage * BAL::BCGraphicsDeviceSDL::createNativeImage ( RGBA32Array ,
const WebCore::IntSize  size 
) [virtual]

Create a buffer filled with data from an RGBA32Array.

This method is typically used to allocate buffer for decoded images or fonts.

Parameters:
[in] RGBA32Array&,: the data to fill the buffer with
[in] IntSize,: size of the buffer to allocate (must be size of the RGBA32Array)

Implements BAL::BIGraphicsDevice.

virtual void BAL::BCGraphicsDeviceSDL::copy ( const BTWidget &  ,
const BINativeImage ,
WebCore::IntRect  zone,
WebCore::IntPoint  ,
const uint8_t  alphaChannel 
) [virtual]

Copy a NativeImage (buffer) into a widget buffer.

Parameters:
[in] BTWidget 
[in] BINativeImage,: the buffer to copy
[in] IntRect,: where to copy buffer
[in] IntPoint 
[in] alphaChannel,: global alpha to apply to the copied buffer

Implements BAL::BIGraphicsDevice.

void BAL::BCGraphicsDeviceSDL::drawArc ( const BTWidget &  widget,
const IntRect  rect,
uint16_t  startAngle,
uint16_t  angleSpan,
const WebCore::Color  color 
) [virtual]

void BAL::BCGraphicsDeviceSDL::drawEllipse ( const BTWidget &  ,
WebCore::IntRect  ,
const WebCore::Color   
) [virtual]

draw an ellipse into widget buffer.

Parameters:
[in] BTWidget,: use widget buffer to draw
[in] IntRect,: rectangle which contains ellipse. Ellipse specific params can be computed from this rectangle.
[in] Color,: color of the ellipse to draw

Implements BAL::BIGraphicsDevice.

virtual void BAL::BCGraphicsDeviceSDL::drawLine ( const BTWidget &  ,
WebCore::IntPoint  ,
WebCore::IntPoint  ,
const WebCore::Color   
) [virtual]

draw an line into widget buffer.

Parameters:
[in] BTWidget,: use widget buffer to draw
[in] IntPoint,: starting point
[in] IntPoint,: end point
[in] Color,: color of the line to draw

Implements BAL::BIGraphicsDevice.

virtual void BAL::BCGraphicsDeviceSDL::drawRect ( const BTWidget &  ,
WebCore::IntRect  ,
const WebCore::Color   
) [virtual]

draw an empty rectangle into widget buffer.

Parameters:
[in] BTWidget,: use widget buffer to draw
[in] IntRect,: rectangle to draw
[in] Color,: color of the line to draw

Implements BAL::BIGraphicsDevice.

void BAL::BCGraphicsDeviceSDL::fillConvexPolygon ( const BTWidget &  ,
size_t  numPoints,
const WebCore::IntPoint ,
const WebCore::Color   
) [virtual]

Draw a filled convex polygon into widget buffer.

I mean from a triangle to whatever. Of course to draw square or rectangle, use a method like drawRect().

Parameters:
[in] BTWidget,: use widget buffer to draw
[in] size_t,: number of points of the polygon
[in] IntPoint*,: list of numPoint size which contains each point coordinate
[in] Color,: color of the polygon to draw

Implements BAL::BIGraphicsDevice.

virtual void BAL::BCGraphicsDeviceSDL::fillRect ( const BTWidget &  ,
WebCore::IntRect  ,
const WebCore::Color   
) [virtual]

Draw a filled rectangle into widget buffer.

Parameters:
[in] BTWidget,: use widget buffer to draw
[in] IntRect,: rectangle to draw
[in] Color,: color of the polygon to draw

Implements BAL::BIGraphicsDevice.

virtual void BAL::BCGraphicsDeviceSDL::setClip ( const BTWidget &  ,
WebCore::IntRect   
) [virtual]

Set a clipping zone for the widget buffer.

Parameters:
[in] BTWidget,: use widget buffer
[in] IntRect,: clipping zone to set

Implements BAL::BIGraphicsDevice.

IntRect BAL::BCGraphicsDeviceSDL::clip ( const BTWidget &   )  [virtual]

Get the clipping zone for the widget buffer.

Parameters:
[in] BTWidget,: use widget buffer
Returns:
IntRect: the clipping zone for the widget

Implements BAL::BIGraphicsDevice.

virtual void BAL::BCGraphicsDeviceSDL::stretchBlit ( const BTWidget &  ,
const BINativeImage ,
WebCore::IntRect  src,
WebCore::IntRect  dst,
const uint8_t  alphaChannel 
) [virtual]

Stretch a buffer and blit it into the widget buffer.

If you do not need to stretch the buffer before blitting, use copy() method.

Parameters:
[in] BTWidget,: use widget buffer
[in] BINativeImage&,: the buffer to stretch and blit
[in] IntRect,: size and coordinate of the buffer to blit
[in] IntRect,: size and coordinate of the destination blit
[in] alphaChannel,: global alpha to apply to the copied buffer

Implements BAL::BIGraphicsDevice.

IntSize BAL::BCGraphicsDeviceSDL::size (  )  const [virtual]

Get the size of the Graphics device.

Returns:
IntSize: size

Implements BAL::BIGraphicsDevice.

virtual void BAL::BCGraphicsDeviceSDL::update ( const BTWidget &  ,
const WebCore::IntRect   
) [virtual]

Update zone in the widget buffer.

Parameters:
[in] BTWidget,: use widget buffer
[in] IntRect,: zone to update

Implements BAL::BIGraphicsDevice.

virtual void BAL::BCGraphicsDeviceSDL::clear ( const BTWidget &  ,
const WebCore::IntRect   
) [virtual]

Clear a zone in the widget buffer FIXME should redraw with background color.

Parameters:
[in] BTWidget,: use widget buffer
[in] IntRect,: the rectangular zone to clear

Implements BAL::BIGraphicsDevice.


The documentation for this class was generated from the following files:
Generated on Wed Nov 21 20:04:19 2007 for Origyn Web Browser by Doxygen 1.5.3

pleyo.com
pleyo.com