A class for rasterizing vector outlines. More...

#include "murl_util_outline_rasterizer.h"


class  Handle
 A handle for rasterizing individual vector outlines. More...

Public Member Functions

const HandleBeginRasterizing ()
 Begin rasterizing a sequence of outlines. More...
Bool EndRasterizing (const Handle *handle)
 End rasterizing a sequence of outlines. More...
Bool Rasterize (const Handle *handle, const Resource::IOutline *outline, const Color &outlineColor, const Color &backColor, IVideoSurface *surface, Real posX, Real posY, Real scaleX, Real scaleY, Real embolden)
 Rasterize an outline. More...

Static Public Member Functions

static OutlineRasterizerAcquire ()
 Acquire a rasterizer. More...
static Bool Release (OutlineRasterizer *&rasterizer)
 Release a previously acquired rasterizer. More...

Detailed Description

A class for rasterizing vector outlines.

Member Function Documentation

◆ Acquire()

static OutlineRasterizer* Murl::Util::OutlineRasterizer::Acquire ( )

Acquire a rasterizer.

Each call to Acquire() must have a corresponding call to Release(), when the rasterizer is not needed anymore.

The rasterizer instance.

◆ Release()

static Bool Murl::Util::OutlineRasterizer::Release ( OutlineRasterizer *&  rasterizer)

Release a previously acquired rasterizer.

rasterizerA reference to a pointer of the rasterizer to be released.
true if successful.

◆ BeginRasterizing()

const Handle* Murl::Util::OutlineRasterizer::BeginRasterizing ( )

Begin rasterizing a sequence of outlines.

Rasterizing any number of outlines must always be enclosed within paired calls to BeginRasterizing() and EndRasterizing(). These methods ensure that no two threads are using the same rasterizer instance concurrently, by locking/unlocking an internal mutex.

A pointer to a rasterizer handle, or null if failed.

◆ EndRasterizing()

Bool Murl::Util::OutlineRasterizer::EndRasterizing ( const Handle handle)

End rasterizing a sequence of outlines.

handleThe rasterizer handle obtained via BeginRasterizing().
true if successful.

◆ Rasterize()

Bool Murl::Util::OutlineRasterizer::Rasterize ( const Handle handle,
const Resource::IOutline outline,
const Color outlineColor,
const Color backColor,
IVideoSurface surface,
Real  posX,
Real  posY,
Real  scaleX,
Real  scaleY,
Real  embolden 

Rasterize an outline.

handleA handle obtained via BeginRasterizing().
outlineThe resource outline object to rasterize.
outlineColorThe outline color.
backColorThe background color.
surfaceThe output surface to rasterize to.
posXThe horizontal position of the outline in the surface.
posYThe vertical position of the outline in the surface.
scaleXThe horizontal scale factor.
scaleYThe vertical scale factor.
emboldenThe emboldening value. A value of 0.0 renders an unmodified outline, a negative value produces a thinner outline.
true if successful.

The documentation for this class was generated from the following file:
  • murl_util_outline_rasterizer.h

Copyright © 2011-2018 Spraylight GmbH.