Glyph defines and operations
[GDI functions]

Defines

Typedefs

Enumerations

Functions


Detailed Description

MiniGUI maintains some glyph defines and operations


Define Documentation

#define IS_MBC_GLYPH ( glyph   )     ((glyph) & 0x80000000)

to judge wether the glyph is multibyte glyph

Parameters:
glyph glyph value

Definition at line 8513 of file gdi.h.

#define REAL_GLYPH ( glyph   )     ((glyph) & 0x7FFFFFFF)

get real glyph value from a glyph

Parameters:
glyph glyph value

Definition at line 8529 of file gdi.h.

#define SELECT_DEVFONT ( plogfont,
glyph   ) 
Value:
((glyph) & 0x80000000 ? \
    (plogfont)->mbc_devfont : \
    (plogfont)->sbc_devfont)

select a device font acording to the glyph value.

Parameters:
plogfont pointer to a logical font.
glyph glyph value.

Definition at line 8540 of file gdi.h.

#define SET_MBC_GLYPH ( glyph   )     ((glyph) | 0x80000000)

set the glyph with multibyte mask

Parameters:
glyph glyph value

Definition at line 8521 of file gdi.h.


Typedef Documentation

typedef struct _GLYPHINFO GLYPHINFO

Data type of struct _GLYPHINFO.

typedef struct _GLYPHMAPINFO GLYPHMAPINFO

Data type of struct _GLYPHMAPINFO.


Enumeration Type Documentation

enum typedef enum SHAPETYPE

Data type of enum.

Definition at line 8549 of file gdi.h.


Function Documentation

void GUIAPI BIDIGetLogicalEmbeddLevels ( LOGFONT log_font,
Glyph32 *  glyphs,
int  nr_glyphs,
Uint8 **  embedding_level_list 
)

Get the logical embedding levels for the logical glyph string and generate runs by embedding levels, the for reorder to get visual glyph string.

Parameters:
log_font The logical font.
glyphs The pointer to the logical glyph string.
nr_glyphs The length of the glyph string.
embedding_level_list The logical embedding level.
Returns:
None.
int GUIAPI BIDIGetTextLogicalGlyphs ( LOGFONT log_font,
const char *  text,
int  text_len,
Glyph32 **  glyphs,
GLYPHMAPINFO **  glyphs_map 
)

Get logical glyphs string of the text.

Parameters:
log_font The logical font.
text The logical text string.
text_len The lenght of the logical text string in bytes.
glyphs The pointer to the logical glyph string.
glyphs_map The position map from the logical glyphs string to the logical text.
Returns:
The length of the logical glyph string.
See also:
GLYPHMAPINFO
int GUIAPI BIDIGetTextVisualGlyphs ( LOGFONT log_font,
const char *  text,
int  text_len,
Glyph32 **  glyphs,
GLYPHMAPINFO **  glyphs_map 
)

Get visual glyphs and glyph_map info relative with logical string byte index.

Parameters:
log_font The logical font.
text The logical text string.
text_len The length of the logical text string in bytes.
glyphs The pointer to the visual glyph string.
glyphs_map The position map from visual glyphs string to the logical text.
Returns:
The length of the visual glyph string.
void GUIAPI BIDIGetVisualEmbeddLevels ( LOGFONT log_font,
Glyph32 *  glyphs,
int  nr_glyphs,
Uint8 **  embedding_level_list 
)

Get the visual embedding levels for the given logical glyph string, then you can get the edge for visual glyphs.

Parameters:
log_font The logical font.
glyphs The pointer to the logical glyph string.
nr_glyphs The length of the glyph string.
embedding_level_list The embedding level logical to visual.
Returns:
void.
Glyph32 *GUIAPI BIDILogGlyphs2VisGlyphs ( LOGFONT log_font,
Glyph32 *  glyphs,
int  nr_glyphs,
GLYPHMAPINFO glyphs_map 
)

Reorder the logical glyphs string to visual glyphs string.

This function reorders the logical glyphs string to visual glyphs string. If glyphs_map is not NULL, get the visual glyphs map info.

Parameters:
log_font The logical font.
glyphs The pointer to the glyph string.
nr_glyphs The length of the glyph string.
glyphs_map The position map from the logical glyph string to the visual glyph string.
Returns:
The pointer to the visual glyph string.
int GUIAPI DrawGlyph ( HDC  hdc,
int  x,
int  y,
Glyph32  glyph_value,
int *  adv_x,
int *  adv_y 
)

Draw a glyph.

This function draws a glyph to the specific postion of a DC.

Parameters:
hdc The device context.
x The output start x position.
y The output start y position.
glyph_value The glyph value.
adv_x The pointer used to return the advance in x-coordinate of the glyph, can be NULL.
adv_y The pointer used to return the advance in y-coordinate of the glyph, can be NULL.
Returns:
The advance on baseline.
int GUIAPI GetGlyphInfo ( LOGFONT logfont,
Glyph32  glyph_value,
GLYPHINFO glyph_info 
)

Retriev the information of a glyph.

This function retrieves the information of a glyph.

Parameters:
logfont The logical font.
glyph_value The glyph value.
glyph_info The glyph information will be returned through this struct.
Note:
You must set glyph_info->mask to indicate what you want.
Returns:
The advance of the glyph string on baseline.
See also:
GLYPHINFO
int GUIAPI GetGlyphsExtent ( HDC  hdc,
Glyph32 *  glyphs,
int  nr_glyphs,
SIZE size 
)

Get visual extent value of a glyph string.

This function gets the extent value of a glyph string on a DC.

Parameters:
hdc The device context.
glyphs Input glyph string, input.
nr_glyphs Input glyph string len, input.
size Ouput the fit glyph's extent value, Output.
Returns:
The extent of the glyph string.
int GUIAPI GetGlyphsExtentPoint ( HDC  hdc,
Glyph32 *  glyphs,
int  nr_glyphs,
int  max_extent,
SIZE size 
)

Get the visual extent value of a glyph string.

This function gets the visual extent value of a glpyh string.

Parameters:
hdc The device context.
glyphs The pointer to the glyph string.
nr_glyphs The length of the glyph string len.
max_extent The maximal output extent value.
size The real extent of all visual glyphs in the glyph string.
Returns:
The the index of the last glyph which can be fit to the extent.
Glyph32 GUIAPI GetGlyphShape ( LOGFONT logfont,
const char *  mchar,
int  mchar_len,
SHAPETYPE  shape_type 
)

Get the glyph shape of a character.

Parameters:
logfont The logical font.
mchar The pointer to the multi-byte character.
mchar_len The length of mchar in bytes.
shape_type The shape type of mchar.
Returns:
The multi-byte character's glyph shape value.
Glyph32 GUIAPI GetGlyphValue ( LOGFONT logfont,
const char *  mchar,
int  mchar_len,
const char *  pre_mchar,
int  pre_len 
)

Get the glyph value of a multi-byte character.

Parameters:
logfont The logical font.
mchar The pointer to the multi-byte character.
mchar_len The length of mchar in bytes.
pre_mchar The pointer to the multi-byte character before mchar.
pre_len The length of per_mchar in bytes.
Returns:
The glyph value of the multi-byte character.
void GUIAPI GetTextRangesLog2Vis ( LOGFONT log_font,
char *  text,
int  text_len,
int  start_index,
int  end_index,
int **  ranges,
int *  nr_ranges 
)

Get a list of visual ranges corresponding to a given logical range.

Parameters:
log_font The logical font.
text The pointer to the logical text string.
text_len The length of the logical text string in bytes.
start_index The start index of the logical range.
end_index The end index of the logical range.
ranges The pointer to store a pointer to an array of arranges.
nr_ranges The number of ranges stored in ranges.
Returns:
None.
Generated on Thu Apr 7 15:55:37 2011 for MiniGUI V3.0.12 API Reference by  doxygen 1.6.3