ChamplainRenderer

ChamplainRenderer — A base class of renderers

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── ChamplainRenderer
            ├── ChamplainErrorTileRenderer
            ╰── ChamplainImageRenderer

Description

A renderer is used to render tiles textures. A tile is rendered based on the provided data - this can be arbitrary data the given renderer understands (e.g. raw bitmap data, vector xml map representation and so on).

Functions

champlain_renderer_set_data ()

void
champlain_renderer_set_data (ChamplainRenderer *renderer,
                             const gchar *data,
                             guint size);

Sets the data which is used to render tiles by the renderer.

Parameters

renderer

a ChamplainRenderer

 

data

data used for tile rendering

 

size

size of the data in bytes

 

Since: 0.8


champlain_renderer_render ()

void
champlain_renderer_render (ChamplainRenderer *renderer,
                           ChamplainTile *tile);

Renders the texture for the provided tile and calls champlain_tile_set_content() to set the content of the tile. When the rendering is finished, the renderer emits the “render-complete” signal. The tile has to be displayed manually by calling champlain_tile_display_content().

Parameters

renderer

a ChamplainRenderer

 

tile

the tile to render

 

Since: 0.8

Types and Values

struct ChamplainRenderer

struct ChamplainRenderer;

The ChamplainRenderer structure contains only private data and should be accessed using the provided API

Since: 0.8