Ultralight C++ API 1.3.0
Loading...
Searching...
No Matches
ultralight::BitmapSurface Class Reference

#include <Ultralight/platform/Surface.h>

Details

The default Surface implementation, backed by a Bitmap.

Inheritance diagram for ultralight::BitmapSurface:
ultralight::Surface

Public Member Functions

virtual uint32_t width () const override
 Width (in pixels).
 
virtual uint32_t height () const override
 Height (in pixels).
 
virtual uint32_t row_bytes () const override
 Number of bytes between rows (usually width * 4)
 
virtual size_t size () const override
 Size in bytes.
 
virtual void * LockPixels () override
 Lock the pixel buffer and get a pointer to the beginning of the data for reading/writing.
 
virtual void UnlockPixels () override
 Unlock the pixel buffer.
 
virtual void Resize (uint32_t width, uint32_t height) override
 Resize the pixel buffer to a certain width and height (both in pixels).
 
RefPtr< Bitmapbitmap ()
 Get the underlying Bitmap.
 
- Public Member Functions inherited from ultralight::Surface
virtual ~Surface ()
 
virtual uint32_t width () const =0
 Width (in pixels).
 
virtual uint32_t height () const =0
 Height (in pixels).
 
virtual uint32_t row_bytes () const =0
 Number of bytes between rows (usually width * 4)
 
virtual size_t size () const =0
 Size in bytes.
 
virtual void * LockPixels ()=0
 Lock the pixel buffer and get a pointer to the beginning of the data for reading/writing.
 
virtual void UnlockPixels ()=0
 Unlock the pixel buffer.
 
virtual void Resize (uint32_t width, uint32_t height)=0
 Resize the pixel buffer to a certain width and height (both in pixels).
 
virtual void set_dirty_bounds (const IntRect &bounds)
 Set the dirty bounds to a certain value.
 
virtual IntRect dirty_bounds () const
 Get the dirty bounds.
 
virtual void ClearDirtyBounds ()
 Clear the dirty bounds.
 

Protected Member Functions

 BitmapSurface (uint32_t width, uint32_t height)
 
virtual ~BitmapSurface ()
 
 BitmapSurface (const BitmapSurface &)=delete
 
void operator= (const BitmapSurface &)=delete
 
- Protected Member Functions inherited from ultralight::Surface
 Surface ()
 

Protected Attributes

void * impl_
 
- Protected Attributes inherited from ultralight::Surface
IntRect dirty_bounds_
 

Friends

class BitmapSurfaceFactory
 

Constructor & Destructor Documentation

◆ BitmapSurface() [1/2]

ultralight::BitmapSurface::BitmapSurface ( uint32_t  width,
uint32_t  height 
)
protected

◆ ~BitmapSurface()

virtual ultralight::BitmapSurface::~BitmapSurface ( )
protectedvirtual

◆ BitmapSurface() [2/2]

ultralight::BitmapSurface::BitmapSurface ( const BitmapSurface )
protecteddelete

Member Function Documentation

◆ bitmap()

RefPtr< Bitmap > ultralight::BitmapSurface::bitmap ( )

Get the underlying Bitmap.

◆ height()

virtual uint32_t ultralight::BitmapSurface::height ( ) const
overridevirtual

Height (in pixels).

Implements ultralight::Surface.

◆ LockPixels()

virtual void * ultralight::BitmapSurface::LockPixels ( )
overridevirtual

Lock the pixel buffer and get a pointer to the beginning of the data for reading/writing.

Native pixel format is premultiplied BGRA 32-bit (8 bits per channel).

Implements ultralight::Surface.

◆ operator=()

void ultralight::BitmapSurface::operator= ( const BitmapSurface )
protecteddelete

◆ Resize()

virtual void ultralight::BitmapSurface::Resize ( uint32_t  width,
uint32_t  height 
)
overridevirtual

Resize the pixel buffer to a certain width and height (both in pixels).

This should never be called while pixels are locked.

Implements ultralight::Surface.

◆ row_bytes()

virtual uint32_t ultralight::BitmapSurface::row_bytes ( ) const
overridevirtual

Number of bytes between rows (usually width * 4)

Implements ultralight::Surface.

◆ size()

virtual size_t ultralight::BitmapSurface::size ( ) const
overridevirtual

Size in bytes.

Implements ultralight::Surface.

◆ UnlockPixels()

virtual void ultralight::BitmapSurface::UnlockPixels ( )
overridevirtual

Unlock the pixel buffer.

Implements ultralight::Surface.

◆ width()

virtual uint32_t ultralight::BitmapSurface::width ( ) const
overridevirtual

Width (in pixels).

Implements ultralight::Surface.

Friends And Related Symbol Documentation

◆ BitmapSurfaceFactory

friend class BitmapSurfaceFactory
friend

Member Data Documentation

◆ impl_

void* ultralight::BitmapSurface::impl_
protected

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