Gnash  0.8.10
Public Member Functions
gnash::renderer::DirectFB::Renderer_DirectFB Class Reference

#include <Renderer_DirectFB.h>

Inheritance diagram for gnash::renderer::DirectFB::Renderer_DirectFB:
gnash::Renderer

List of all members.

Public Member Functions

std::string description () const
 Return a description of this renderer.
 Renderer_DirectFB ()
 ~Renderer_DirectFB ()
void init (float x, float y)
CachedBitmapcreateCachedBitmap (std::auto_ptr< image::GnashImage > im)
 Given an image, returns a pointer to a CachedBitmap class that can later be passed to FillStyleX_bitmap(), to set a bitmap fill style.
void world_to_pixel (int &x, int &y, float world_x, float world_y)
gnash::geometry::Range2d< int > world_to_pixel (const gnash::SWFRect &wb)
geometry::Range2d< int > world_to_pixel (const geometry::Range2d< float > &wb)
gnash::point pixel_to_world (int, int)
void begin_display (const gnash::rgba &, int, int, float, float, float, float)
 Bracket the displaying of a frame from a movie.
void end_display ()
void drawLine (const std::vector< point > &coords, const rgba &fill, const SWFMatrix &mat)
 Draw a line-strip directly, using a thin, solid line.
void drawVideoFrame (gnash::image::GnashImage *frame, const gnash::Transform &tx, const gnash::SWFRect *bounds, bool smooth)
 Draws a video frame.
void drawPoly (const point *corners, size_t corner_count, const rgba &fill, const rgba &outline, const SWFMatrix &mat, bool masked)
void drawShape (const gnash::SWF::ShapeRecord &, const gnash::Transform &)
void drawGlyph (const SWF::ShapeRecord &rec, const rgba &c, const SWFMatrix &mat)
 Draws a glyph (font character).
void set_antialiased (bool enable)
void begin_submit_mask ()
void end_submit_mask ()
void apply_mask ()
void disable_mask ()
void set_scale (float xscale, float yscale)
 Sets the x/y scale for the movie.
void set_invalidated_regions (const InvalidatedRanges &ranges)
 Sets the update region (called prior to begin_display).
RendererstartInternalRender (gnash::image::GnashImage &)
 Setup the renderer to draw to an internal buffer.
void endInternalRender ()
 Finish internal rendering.
unsigned int getBitsPerPixel ()
bool initTestBuffer (unsigned width, unsigned height)
void printVGParams ()
void printVGHardware ()
void printVGPath ()

Constructor & Destructor Documentation

gnash::renderer::DirectFB::Renderer_DirectFB::Renderer_DirectFB ( )
gnash::renderer::DirectFB::Renderer_DirectFB::~Renderer_DirectFB ( )

Member Function Documentation

void gnash::renderer::DirectFB::Renderer_DirectFB::apply_mask ( )

References GNASH_REPORT_FUNCTION.

void gnash::renderer::DirectFB::Renderer_DirectFB::begin_display ( const gnash::rgba background_color,
int  viewport_width,
int  viewport_height,
float  x0,
float  x1,
float  y0,
float  y1 
) [virtual]

Bracket the displaying of a frame from a movie.

Set up to render a full frame from a movie and fills the background. Sets up necessary transforms, to scale the movie to fit within the given dimensions. Call end_display() when you're done. Most of the arguments are only for the ogl renderer. See documentation in that class. Do not use these arguments for new renderers!

Implements gnash::Renderer.

References GNASH_REPORT_FUNCTION.

void gnash::renderer::DirectFB::Renderer_DirectFB::begin_submit_mask ( ) [virtual]

Masks

Masks are defined by drawing calls enclosed by begin_submit_mask() and end_submit_mask(). Between these two calls, no drawing is to occur. The shapes rendered between the two calls define the visible region of the mask. Graphics that are irrelevant in the context of a mask (lines and fill styles, for example) should be ignored. After use, disable_mask() is called to remove the mask.

Masks may be nested. That is, end_submit_mask() may be followed by a call to begin_submit_mask(). The resulting mask shall be an intersection of the previously created mask. disable_mask() shall result in the disabling or destruction of the last created mask.

Implements gnash::Renderer.

CachedBitmap* gnash::renderer::DirectFB::Renderer_DirectFB::createCachedBitmap ( std::auto_ptr< image::GnashImage im) [virtual]

Given an image, returns a pointer to a CachedBitmap class that can later be passed to FillStyleX_bitmap(), to set a bitmap fill style.

================================================================== Caching utitilies for core. ==================================================================

Implements gnash::Renderer.

std::string gnash::renderer::DirectFB::Renderer_DirectFB::description ( ) const [inline, virtual]

Return a description of this renderer.

Implements gnash::Renderer.

void gnash::renderer::DirectFB::Renderer_DirectFB::disable_mask ( ) [virtual]

Implements gnash::Renderer.

References GNASH_REPORT_FUNCTION.

void gnash::renderer::DirectFB::Renderer_DirectFB::drawGlyph ( const SWF::ShapeRecord rec,
const rgba color,
const SWFMatrix mat 
) [virtual]

Draws a glyph (font character).

Glyphs are defined just like shape characters with the difference that they do not have any fill or line styles. Instead, the shape must be drawn using the given color (solid fill). Please note that although the glyph paths may indicate subshapes, the renderer is to ignore that information.

Parameters:
def
mat
color

Implements gnash::Renderer.

References GNASH_REPORT_FUNCTION.

void gnash::renderer::DirectFB::Renderer_DirectFB::drawLine ( const std::vector< point > &  coords,
const rgba color,
const SWFMatrix mat 
) [virtual]

Draw a line-strip directly, using a thin, solid line.

Can be used to draw empty boxes and cursors.

an array of 16-bit signed integer coordinates. Even indices (and 0) are x coordinates, while uneven ones are y coordinates.

the number of x-y coordinates (vertices).

the color to be used to draw the line strip.

the SWFMatrix to be used to transform the vertices.

Implements gnash::Renderer.

References GNASH_REPORT_FUNCTION.

void gnash::renderer::DirectFB::Renderer_DirectFB::drawPoly ( const point corners,
size_t  corner_count,
const rgba fill,
const rgba outline,
const SWFMatrix mat,
bool  masked 
)

References GNASH_REPORT_FUNCTION.

void gnash::renderer::DirectFB::Renderer_DirectFB::drawShape ( const gnash::SWF::ShapeRecord ,
const gnash::Transform  
) [virtual]

Implements gnash::Renderer.

References GNASH_REPORT_FUNCTION.

void gnash::renderer::DirectFB::Renderer_DirectFB::drawVideoFrame ( gnash::image::GnashImage frame,
const gnash::Transform xform,
const gnash::SWFRect bounds,
bool  smooth 
) [virtual]

Draws a video frame.

================================================================== Rendering Interface. ================================================================== The frame has already been decoded and is available in RGB format only.

Parameters:
frameThe RGB video buffer frame. Ownership of the buffer is left to the caller.
matThe SWFMatrix with world coordinates used to retrieve the x and y coordinate of the video object. The scaling of the SWFMatrix only refers to the Flash instance, *not* to the video inside that instance. When a video object is placed on the stage and the loaded video is smaller, then the SWFMatrix is still an "identity matrix". However, if the video object is scaled via ActionScript, for example, then the SWFMatrix will change. This means the renderer has to find the correct scaling for the video inside the bounds.
boundsThe minX/minY fields of this SWFRect are always zero. The width and height determine the size of the Flash video instance on the stage (in TWIPS) prior to SWFMatrix transformations.

Implements gnash::Renderer.

void gnash::renderer::DirectFB::Renderer_DirectFB::end_display ( ) [virtual]

Implements gnash::Renderer.

References GNASH_REPORT_FUNCTION.

void gnash::renderer::DirectFB::Renderer_DirectFB::end_submit_mask ( ) [virtual]

Implements gnash::Renderer.

void gnash::renderer::DirectFB::Renderer_DirectFB::endInternalRender ( ) [virtual]

Finish internal rendering.

Any rendering after this function has been called must apply to the external buffer.

Implements gnash::Renderer.

unsigned int gnash::renderer::DirectFB::Renderer_DirectFB::getBitsPerPixel ( )
void gnash::renderer::DirectFB::Renderer_DirectFB::init ( float  x,
float  y 
)

References GNASH_REPORT_FUNCTION.

bool gnash::renderer::DirectFB::Renderer_DirectFB::initTestBuffer ( unsigned  width,
unsigned  height 
)
point gnash::renderer::DirectFB::Renderer_DirectFB::pixel_to_world ( int  x,
int  y 
)
void gnash::renderer::DirectFB::Renderer_DirectFB::printVGHardware ( )
void gnash::renderer::DirectFB::Renderer_DirectFB::printVGParams ( )
void gnash::renderer::DirectFB::Renderer_DirectFB::printVGPath ( )
void gnash::renderer::DirectFB::Renderer_DirectFB::set_antialiased ( bool  enable)
void gnash::renderer::DirectFB::Renderer_DirectFB::set_invalidated_regions ( const InvalidatedRanges ) [virtual]

Sets the update region (called prior to begin_display).

================================================================== Prepare drawing area and other utilities ================================================================== The renderer might do clipping and leave the region outside these bounds unchanged, but he is allowed to change them if that makes sense. After rendering a frame the area outside the invalidated region can be undefined and is not used.

It is not required for all renderers. Parameters are world coordinates (TWIPS).

For more info see page Detection of updated regions.

Reimplemented from gnash::Renderer.

void gnash::renderer::DirectFB::Renderer_DirectFB::set_scale ( float  ,
float   
) [virtual]

Sets the x/y scale for the movie.

================================================================== Interfaces for adjusting renderer output. ==================================================================

Reimplemented from gnash::Renderer.

References gnash::key::f.

Renderer * gnash::renderer::DirectFB::Renderer_DirectFB::startInternalRender ( gnash::image::GnashImage buffer) [virtual]

Setup the renderer to draw to an internal buffer.

Implementations are free to return a new renderer if they choose.

Returns:
0 if the renderer does not support this.

Implements gnash::Renderer.

void gnash::renderer::DirectFB::Renderer_DirectFB::world_to_pixel ( int &  x,
int &  y,
float  world_x,
float  world_y 
)
geometry::Range2d< int > gnash::renderer::DirectFB::Renderer_DirectFB::world_to_pixel ( const gnash::SWFRect wb)
geometry::Range2d< int > gnash::renderer::DirectFB::Renderer_DirectFB::world_to_pixel ( const geometry::Range2d< float > &  wb)

The documentation for this class was generated from the following files: