Gnash
0.8.11dev
|
#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. More... | |
bool | disposed () const |
Whether the CachedBitmap has been disposed. More... | |
image::GnashImage & | image () |
Return a GnashImage for manipulation. More... | |
VGPaint & | vgimage () |
VGPaint | getFillPaint () const |
int | getWidth () |
int | getHeight () |
std::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) |
![]() | |
CachedBitmap () | |
virtual | ~CachedBitmap () |
![]() | |
ref_counted () | |
ref_counted (const ref_counted &) | |
void | add_ref () const |
void | drop_ref () const |
long | get_ref_count () const |
Additional Inherited Members | |
![]() | |
virtual | ~ref_counted () |
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 _, gnash::image::GnashImage::begin(), gnash::renderer::openvg::Renderer_ovg::getErrorString(), gnash::image::GnashImage::height(), gnash::CachedBitmap::image(), gnash::log_debug(), gnash::log_error(), gnash::image::GnashImage::stride(), gnash::image::GnashImage::type(), gnash::image::TYPE_RGB, gnash::image::TYPE_RGBA, and gnash::image::GnashImage::width().
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 _, gnash::SWFMatrix::a(), gnash::SWFMatrix::b(), gnash::image::GnashImage::begin(), gnash::SWFMatrix::c(), gnash::SWFMatrix::d(), gnash::renderer::openvg::Renderer_ovg::getErrorString(), gnash::image::GnashImage::height(), gnash::CachedBitmap::image(), gnash::SWFMatrix::invert(), gnash::log_debug(), gnash::log_error(), gnash::image::GnashImage::stride(), gnash::SWFMatrix::tx(), gnash::SWFMatrix::ty(), gnash::image::GnashImage::type(), gnash::image::TYPE_RGB, gnash::image::TYPE_RGBA, gnash::image::GnashImage::width(), WRAP_FILL, WRAP_PAD, WRAP_REFLECT, and WRAP_REPEAT.
Referenced by getData(), and 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::key::c, color, GNASH_REPORT_FUNCTION, gnash::key::i, gnash::key::j, gnash::rgba::m_a, gnash::rgba::m_b, gnash::rgba::m_g, gnash::rgba::m_r, and gnash::SWFCxForm::transform().
Referenced by getData(), and 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::key::c, GNASH_REPORT_FUNCTION, gnash::key::i, gnash::key::j, gnash::rgba::m_a, gnash::rgba::m_b, gnash::rgba::m_g, and gnash::rgba::m_r.
Referenced by getData(), and gnash::renderer::openvg::StyleHandler::operator()().
|
inlinevirtual |
Free the memory associated with this CachedBitmap.
This allows ActionScript a little bit of control over memory.
Implements gnash::CachedBitmap.
|
inlinevirtual |
Whether the CachedBitmap has been disposed.
A disposed CachedBitmap has no data and should not be rendered.
Implements gnash::CachedBitmap.
Referenced by image().
|
inline |
References applyPatternBitmap(), createLinearBitmap(), and createRadialBitmap().
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Return a GnashImage for manipulation.
The changes to the data must be cached before the next rendering.
Implements gnash::CachedBitmap.
References disposed().
|
inline |