Gnash
0.8.10
|
#include <OpenVGBitmap.h>
Public Types | |
enum | bitmap_wrap_mode { WRAP_REPEAT, WRAP_FILL, WRAP_PAD, WRAP_REFLECT } |
Set line and fill styles for mesh & line_strip rendering. More... | |
Public Member Functions | |
OpenVGBitmap (VGPaint paint) | |
OpenVGBitmap (CachedBitmap *bitmap, VGPaint vgpaint) | |
OpenVGBitmap (image::GnashImage *im, VGPaint vgpaint) | |
~OpenVGBitmap () | |
void | dispose () |
Free the memory associated with this CachedBitmap. | |
bool | disposed () const |
Whether the CachedBitmap has been disposed. | |
image::GnashImage & | image () |
Return a GnashImage for manipulation. | |
VGPaint & | vgimage () |
VGPaint | getFillPaint () const |
int | getWidth () |
int | getHeight () |
boost::uint8_t * | getData () const |
OpenVGBitmap * | createRadialBitmap (float x0, float y0, float x1, float y1, float radial, const SWFCxForm &cx, const GradientFill::GradientRecords &records, VGPaint paint) |
OpenVGBitmap * | createLinearBitmap (float x0, float y0, float x1, float y1, const SWFCxForm &cx, const GradientFill::GradientRecords &records, const VGPaint paint) |
OpenVGBitmap * | applyPatternBitmap (const gnash::SWFMatrix &matrix, bitmap_wrap_mode mode, CachedBitmap *bitmap, VGPaint paint) |
This class is the OpenVG specific representation of a Gnash Cached Bitmap.
gnash::renderer::openvg::OpenVGBitmap::OpenVGBitmap | ( | VGPaint | paint | ) |
vgpaint | the VG paint context |
gnash::renderer::openvg::OpenVGBitmap::OpenVGBitmap | ( | CachedBitmap * | bitmap, |
VGPaint | vgpaint | ||
) |
Construct a new bitmap
bitmap | A CachedBitmap |
vgpaint | the VG paint context |
References image(), gnash::CachedBitmap::image(), gnash::image::GnashImage::width(), gnash::image::GnashImage::height(), _, gnash::renderer::openvg::Renderer_ovg::getErrorString(), gnash::image::GnashImage::type(), gnash::image::TYPE_RGB, gnash::image::GnashImage::stride(), gnash::image::GnashImage::begin(), and gnash::image::TYPE_RGBA.
gnash::renderer::openvg::OpenVGBitmap::OpenVGBitmap | ( | image::GnashImage * | image, |
VGPaint | vgpaint | ||
) |
Construct a new bitmap
A | pointer to a GnashImage |
vgpaint | the VG paint context |
gnash::renderer::openvg::OpenVGBitmap::~OpenVGBitmap | ( | ) |
OpenVGBitmap * gnash::renderer::openvg::OpenVGBitmap::applyPatternBitmap | ( | const gnash::SWFMatrix & | mat, |
bitmap_wrap_mode | mode, | ||
CachedBitmap * | bitmap, | ||
VGPaint | paint | ||
) |
Create and fill pattern image
matrix | The transformation matrix |
mode | The mode used to pain the image |
paint | The VG paint context |
References image(), gnash::CachedBitmap::image(), gnash::image::GnashImage::width(), gnash::image::GnashImage::height(), _, gnash::renderer::openvg::Renderer_ovg::getErrorString(), gnash::image::GnashImage::type(), gnash::image::TYPE_RGB, gnash::image::GnashImage::stride(), gnash::image::GnashImage::begin(), gnash::image::TYPE_RGBA, gnash::SWFMatrix::a(), gnash::SWFMatrix::b(), gnash::SWFMatrix::c(), gnash::SWFMatrix::d(), gnash::SWFMatrix::tx(), gnash::SWFMatrix::ty(), gnash::SWFMatrix::invert(), WRAP_FILL, WRAP_PAD, WRAP_REPEAT, and WRAP_REFLECT.
Referenced by gnash::renderer::openvg::StyleHandler::operator()().
OpenVGBitmap * gnash::renderer::openvg::OpenVGBitmap::createLinearBitmap | ( | float | x0, |
float | y0, | ||
float | x1, | ||
float | y1, | ||
const SWFCxForm & | cxform, | ||
const GradientFill::GradientRecords & | records, | ||
const VGPaint | paint | ||
) |
Create a linear gradient and paint it to the context
x0 | The X coordinate of the origin point |
y0 | The Y coordinate of the origin point |
x1 | The X coordinate of the opposite corner point |
y1 | The Y coordinate of the opposite corner point |
incolor | The base color of the gradient |
paint | The VG paint context |
References GNASH_REPORT_FUNCTION, gnash::key::j, gnash::key::i, gnash::key::c, gnash::SWFCxForm::transform(), color, gnash::rgba::m_r, gnash::rgba::m_g, gnash::rgba::m_b, and gnash::rgba::m_a.
Referenced by gnash::renderer::openvg::StyleHandler::operator()().
OpenVGBitmap * gnash::renderer::openvg::OpenVGBitmap::createRadialBitmap | ( | float | cx, |
float | cy, | ||
float | fx, | ||
float | fy, | ||
float | radial, | ||
const SWFCxForm & | cx, | ||
const GradientFill::GradientRecords & | records, | ||
VGPaint | paint | ||
) |
Create a radial gradient and paint it to the context
x0 | The X coordinate of the origin point |
y0 | The Y coordinate of the origin point |
x1 | The X coordinate of the opposite corner point |
y1 | The Y coordinate of the opposite corner point |
incolor | The base color of the gradient |
paint | The VG paint context |
References GNASH_REPORT_FUNCTION, gnash::key::j, gnash::key::i, gnash::key::c, gnash::rgba::m_r, gnash::rgba::m_g, gnash::rgba::m_b, and gnash::rgba::m_a.
Referenced by gnash::renderer::openvg::StyleHandler::operator()().
void gnash::renderer::openvg::OpenVGBitmap::dispose | ( | ) | [inline, virtual] |
Free the memory associated with this CachedBitmap.
This allows ActionScript a little bit of control over memory.
Implements gnash::CachedBitmap.
bool gnash::renderer::openvg::OpenVGBitmap::disposed | ( | ) | const [inline, virtual] |
Whether the CachedBitmap has been disposed.
A disposed CachedBitmap has no data and should not be rendered.
Implements gnash::CachedBitmap.
Referenced by image().
boost::uint8_t* gnash::renderer::openvg::OpenVGBitmap::getData | ( | ) | const [inline] |
VGPaint gnash::renderer::openvg::OpenVGBitmap::getFillPaint | ( | ) | const [inline] |
int gnash::renderer::openvg::OpenVGBitmap::getHeight | ( | ) | [inline] |
int gnash::renderer::openvg::OpenVGBitmap::getWidth | ( | ) | [inline] |
image::GnashImage& gnash::renderer::openvg::OpenVGBitmap::image | ( | ) | [inline, virtual] |
Return a GnashImage for manipulation.
The changes to the data must be cached before the next rendering.
Implements gnash::CachedBitmap.
References assert, and disposed().
Referenced by OpenVGBitmap(), and applyPatternBitmap().
VGPaint& gnash::renderer::openvg::OpenVGBitmap::vgimage | ( | ) | [inline] |