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

Output module interface for backend render implementations. More...

#include <irendermodule.hxx>

Inheritance diagram for canvas::IRenderModule:
[legend]

Public Types

enum  PrimitiveType {
  PrimitiveType::Unknown,
  PrimitiveType::Triangle,
  PrimitiveType::Quad
}
 Type of primitive passed to the render module via pushVertex() More...
 

Public Member Functions

virtual ~IRenderModule ()
 
virtual void lock () const =0
 Lock rendermodule against concurrent access. More...
 
virtual void unlock () const =0
 Unlock rendermodule for concurrent access. More...
 
virtual ::basegfx::B2IVector getPageSize ()=0
 Maximal size of VRAM pages available. More...
 
virtual std::shared_ptr< ISurfacecreateSurface (const ::basegfx::B2IVector &surfaceSize)=0
 Create a (possibly hardware-accelerated) surface. More...
 
virtual void beginPrimitive (PrimitiveType eType)=0
 Begin rendering the given primitive. More...
 
virtual void endPrimitive ()=0
 Finish rendering a primitive. More...
 
virtual void pushVertex (const Vertex &vertex)=0
 Add given vertex to current primitive. More...
 
virtual bool isError ()=0
 Query error status. More...
 

Detailed Description

Output module interface for backend render implementations.

Implement this interface for each operating system- or library-specific rendering backend, which needs coupling with the canvas rendering framework (which can be shared between all backend implementations).

Definition at line 48 of file irendermodule.hxx.

Member Enumeration Documentation

Type of primitive passed to the render module via pushVertex()

Enumerator
Unknown 
Triangle 
Quad 

Definition at line 53 of file irendermodule.hxx.

Constructor & Destructor Documentation

virtual canvas::IRenderModule::~IRenderModule ( )
inlinevirtual

Definition at line 60 of file irendermodule.hxx.

Member Function Documentation

virtual void canvas::IRenderModule::beginPrimitive ( PrimitiveType  eType)
pure virtual

Begin rendering the given primitive.

Each beginPrimitive() call must be matched with an endPrimitive() call.

virtual std::shared_ptr<ISurface> canvas::IRenderModule::createSurface ( const ::basegfx::B2IVector surfaceSize)
pure virtual

Create a (possibly hardware-accelerated) surface.

Returns
a pointer to a surface, which is an abstraction of a piece of (possibly hardware-accelerated) texture memory.
virtual void canvas::IRenderModule::endPrimitive ( )
pure virtual

Finish rendering a primitive.

Each beginPrimitive() call must be matched with an endPrimitive() call.

virtual ::basegfx::B2IVector canvas::IRenderModule::getPageSize ( )
pure virtual

Maximal size of VRAM pages available.

This is typically the maximum texture size of the hardware, or some arbitrary limit if the backend is software.

virtual bool canvas::IRenderModule::isError ( )
pure virtual

Query error status.

Returns
true, if an error occurred during primitive construction.
virtual void canvas::IRenderModule::lock ( ) const
pure virtual

Lock rendermodule against concurrent access.

virtual void canvas::IRenderModule::pushVertex ( const Vertex vertex)
pure virtual

Add given vertex to current primitive.

After issuing a beginPrimitive(), each pushVertex() adds a vertex to the active primitive.

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

Unlock rendermodule for concurrent access.


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