Glyph

The #cairo_glyph_t structure holds information about a single glyph when drawing or measuring text. A font is (in simple terms) a collection of shapes used to draw text. A glyph is one of these shapes. There can be multiple glyphs for a single character (alternates to be used in different contexts, for example), or a glyph can be a <firstterm>ligature</firstterm> of multiple characters. Cairo doesn't expose any way of converting input text into glyphs, so in order to use the Cairo interfaces that take arrays of glyphs, you must directly access the appropriate underlying font system.

Note that the offsets given by @x and @y are not cumulative. When drawing or measuring text, each glyph is individually positioned with respect to the overall origin

Constructors

this
this(gulong index, double x, double y)

Create a glyph.Glyph boxed type.

this
this(void* ptr, Flag!"Take" take)

Members

Functions

cPtr
void* cPtr(Flag!"Dup" dup)
self
Glyph self()

Returns this, for use in with statements.

Properties

gType
GType gType [@property getter]
index
gulong index [@property getter]

Get field index.

index
gulong index [@property setter]

Set field index.

x
double x [@property getter]

Get field x.

x
double x [@property setter]

Set field x.

y
double y [@property getter]

Get field y.

y
double y [@property setter]

Set field y.

Static functions

getGType
GType getGType()

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

getType
GType getType()

Get the GType of this boxed type.

gType
GType gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

copy_
void* copy_()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.