Funzioni di testo

Windows GDI+ espone un'API flat costituita da circa 600 funzioni, implementate in Gdiplus.dll e dichiarate in Gdiplusflat.h. Le funzioni nell'API flat GDI+ sono incapsulate da una raccolta di circa 40 classi C++. È consigliabile non chiamare direttamente le funzioni nell'API flat. Ogni volta che si effettuano chiamate a GDI+, è necessario chiamare i metodi e le funzioni forniti dai wrapper C++. Il Servizio Supporto Tecnico Clienti Microsoft non fornirà supporto per il codice che chiama direttamente l'API flat. Per altre informazioni sull'uso di questi metodi wrapper, vedere API GDI+ Flat. Le funzioni API flat seguenti vengono incluse nella classe Graphics Text C++.

Funzioni di testo e metodi wrapper corrispondenti

Funzione flat Wrapper, metodo Osservazioni:
GpStatus WINGDIPAPI GdipDrawString( GpGraphics *graphics, GDIPCONST WCHAR *string, INT length, GDIPCONST GpFont *font, GDIPCONST RectF *layoutRect, GDIPCONST GpStringFormat *stringFormat, GDIPCONST GpBrush *brush )
Status Graphics::D rawString( IN const WCHAR *string, IN INT length, IN const Font *font, IN const RectF &layoutRect, IN const StringFormat *stringFormat, IN const Brush *brush )
Disegna una stringa basata su un tipo di carattere, un rettangolo di layout e un formato.
GpStatus WINGDIPAPI GdipMeasureString( GpGraphics *graphics, GDIPCONST WCHAR *string, INT length, GDIPCONST GpFont *font, GDIPCONST RectF *layoutRect, GDIPCONST GpStringFormat *stringFormat, RectF *boundingBox, INT *codepointsFitted, INT *linesFilled )
Status Graphics::MeasureString( IN const WCHAR *string, IN INT length, IN const Font *font, IN const RectF &layoutRect, IN const StringFormat *stringFormat *stringFormat, OUT RectF *boundingBox, OUT INT *codepointsFitted = 0, OUT INT *linesFilled = 0 ) const
Misura l'extent della stringa nel tipo di carattere, nel formato e nel rettangolo di layout specificati.
GpStatus WINGDIPAPI GdipMeasureCharacterRanges( GpGraphics *graphics, GDIPCONST WCHAR *string, INT length, GDIPCONST GpFont *font, GDIPCONST RectF &layoutRect, GDIPCONST GpStringFormat *stringFormat, INT regionCount, GpRegion **regions )
Status Graphics::MeasureCharacterRanges( IN const WCHAR *string, IN INT length, IN const Font *font, IN const RectF &layoutRect, IN const StringFormat *stringFormat, IN INT regionCount, OUT Region *regions ) const
Ottiene un set di aree ognuna delle quali delimita un intervallo di posizioni di caratteri all'interno di una stringa.
GpStatus WINGDIPAPI GdipDrawDriverString( GpGraphics *graphics, GDIPCONST UINT16 *text, INT length, GDIPCONST GpFont *font, GDIPCONST GpBrush *brush, GDIPCONST PointF *positions, INT flags, GDIPCONST GpMatrix *matrix )
Status Graphics::D rawDriverString( IN const UINT16 *text, IN INT length, IN const Font *font, IN const Brush *brush, IN const PointF *positions, IN INT flags, IN const Matrix *matrix )
Disegna caratteri in corrispondenza delle posizioni specificate. Il metodo fornisce al client il controllo completo sull'aspetto del testo. Il metodo presuppone che il client abbia già configurato il formato e il layout da applicare.
GpStatus WINGDIPAPI GdipMeasureDriverString( GpGraphics *graphics, GDIPCONST UINT16 *text, INT length, GDIPCONST GpFont *font, GDIPCONST PointF *positions, INT flags, GDIPCONST GpMatrix *matrix, RectF *boundingBox )
Status Graphics::MeasureDriverString( IN const UINT16 *text, IN INT length, IN const Font *font, IN const PointF *positions, IN IN INT Flags, IN const Matrix *matrix, OUT RectF *boundingBox ) const
Misura il rettangolo di selezione per i caratteri specificati e le relative posizioni corrispondenti.