LibreOffice Module canvas (master) 1
Public Types | Public Member Functions | List of all members
canvas::IColorBuffer Struct Referenceabstract

Interface for a raw memory pixel container. More...

#include <icolorbuffer.hxx>

Public Types

enum class  Format {
  A8R8G8B8 ,
  X8R8G8B8
}
 The underlying pixel format for this buffer. More...
 

Public Member Functions

virtual ~IColorBuffer ()
 
virtual sal_uInt8lock () const =0
 Get a pointer to the raw memory bits of the pixel. More...
 
virtual void unlock () const =0
 unlock previous locked buffer More...
 
virtual sal_uInt32 getWidth () const =0
 Get width in pixel. More...
 
virtual sal_uInt32 getHeight () const =0
 Get height in pixel. More...
 
virtual sal_uInt32 getStride () const =0
 Offset, in bytes, between consecutive scan lines of the bitmap. More...
 
virtual Format getFormat () const =0
 Get format of the color buffer. More...
 

Detailed Description

Interface for a raw memory pixel container.

Use this interface to represent a surface of raw pixel (e.g. a bitmap) to the canvas rendering framework.

Definition at line 31 of file icolorbuffer.hxx.

Member Enumeration Documentation

◆ Format

enum class canvas::IColorBuffer::Format
strong

The underlying pixel format for this buffer.

Enumerator
A8R8G8B8 
X8R8G8B8 

Definition at line 34 of file icolorbuffer.hxx.

Constructor & Destructor Documentation

◆ ~IColorBuffer()

virtual canvas::IColorBuffer::~IColorBuffer ( )
inlinevirtual

Definition at line 43 of file icolorbuffer.hxx.

Member Function Documentation

◆ getFormat()

virtual Format canvas::IColorBuffer::getFormat ( ) const
pure virtual

Get format of the color buffer.

◆ getHeight()

virtual sal_uInt32 canvas::IColorBuffer::getHeight ( ) const
pure virtual

Get height in pixel.

◆ getStride()

virtual sal_uInt32 canvas::IColorBuffer::getStride ( ) const
pure virtual

Offset, in bytes, between consecutive scan lines of the bitmap.

If the stride is positive, the bitmap is top-down. If the stride is negative, the bitmap is bottom-up. The returned value is only valid while the buffer is locked.

◆ getWidth()

virtual sal_uInt32 canvas::IColorBuffer::getWidth ( ) const
pure virtual

Get width in pixel.

◆ lock()

virtual sal_uInt8 * canvas::IColorBuffer::lock ( ) const
pure virtual

Get a pointer to the raw memory bits of the pixel.

◆ unlock()

virtual void canvas::IColorBuffer::unlock ( ) const
pure virtual

unlock previous locked buffer


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