A class for rasterizing vector outlines. More...

#include "murl_util_outline_rasterizer.h"

Classes

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, UInt32 flags)
 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 ( )
static

Acquire a rasterizer.

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

Returns
The rasterizer instance.

◆ Release()

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

Release a previously acquired rasterizer.

Parameters
rasterizerA reference to a pointer of the rasterizer to be released.
Returns
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.

Returns
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.

Parameters
handleThe rasterizer handle obtained via BeginRasterizing().
Returns
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,
UInt32  flags 
)

Rasterize an outline.

Parameters
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.
flagsA bit-mask of flags from the IEnums::TextHint enumeration.
Returns
true if successful.

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


Copyright © 2011-2024 Spraylight GmbH.