Index

CDTEngineV8

GlyphsDoOutput_Arc

CharsDoOutput_Arc

These functions draw a text string in a circular arc. The radius of the arc is rc while its center point is placed at the coordinates (xc, yc) of the current Output.

The key typographic attributes for the text arc (font, transformation, outline expansion/thickness) are supplied via the DT_TYPE_EFFECTS structure; the Typesetter provides all other typographic attributes (e.g. hinting, positioning, quality level). The CharsDoOutput_Arc and GlyphsDoOutput_Arc functions set type attributes themselves by explicitly calling TypesetterSetTypeEffects before each individual glyph in the text arc is drawn. Therefore, it is not necessary to set type attributes in the Typesetter (via TypesetterSetTypeEffects) before calling these functions.

As with other rendering functions, the current Output provides the destination surface (which can be either D-Type's Memory Device Context surface or Windows compatible Device Context surface) and style attributes that are applied to the text string when its image is actually rendered.

Parameters

ParameterDescription

xc

X coordinate of the text arc's center point, in pixels.

yc

Y coordinate of the text arc's center point, in pixels.

rc

Radius of the text arc, in pixels. Must be positive.

alpha0

Angle of the text arc's start point, in degrees. Must be between 0 and 360.

delta

Length of the text arc, in degrees. Must be positive for clockwise direction.

The end point of the text arc is then defined by the (alpha0+delta) angle.

This makes it possible to specify the desired length (in degrees) of the text arc. If this value is non-zero, the function will first adjust the supplied text size so that the total length of the arc matches the specified desired length.

effects

A valid pointer to the DT_TYPE_EFFECTS structure that provides key typographic attributes for the text string to be drawn.

spacing

Additional spacing between glyphs in the text string, in font units.

mode

This parameter specifies how the function should position the glyphs/characters. Currently, only the following values are supported:

  • kern_mode = 4 (DV_SPACING_FRAC) — Do not kern, Use Fractional Pixel Positioning. The accurate distance from the previous character is added to the previous pixel position.

    PosNewPix=Delta+PosPrevPix

    Note: This method is very suitable and recommended for a device independent text layout. It produces good looking text and accurate (device independent) character spacing.

  • kern_mode = 5 (DV_SPACING_KERN_FRAC) — Kern, Use Fractional Pixel Positioning. Same as DV_SPACING_FRAC but with kerning. That is, the accurate distance from the previous character is kerned and added to the previous pixel position.

    PosNewPix=Delta+Kerning+PosPrevPix

    Note: Same as for DV_SPACING_FRAC.

tm

Reserved for future use. Must be set to DV_NULL.

glyph_arr

A string of glyph indices, terminated with DV_ENDOFGLYPHARR.

chars_arr

A null-terminated string in UCS4 format.



 

Index