gdiplus: Added GdipGetStringFormatAlign/GdipSetStringFormatAlign.

oldstable
Evan Stade 2007-08-14 19:00:32 -07:00 committed by Alexandre Julliard
parent 059a2d8c6f
commit 16dea47a5c
5 changed files with 35 additions and 2 deletions

View File

@ -386,7 +386,7 @@
@ stub GdipGetRenderingOrigin
@ stdcall GdipGetSmoothingMode(ptr ptr)
@ stdcall GdipGetSolidFillColor(ptr ptr)
@ stub GdipGetStringFormatAlign
@ stdcall GdipGetStringFormatAlign(ptr ptr)
@ stub GdipGetStringFormatDigitSubstitution
@ stub GdipGetStringFormatFlags
@ stub GdipGetStringFormatHotkeyPrefix
@ -585,7 +585,7 @@
@ stub GdipSetRenderingOrigin
@ stdcall GdipSetSmoothingMode(ptr long)
@ stdcall GdipSetSolidFillColor(ptr ptr)
@ stub GdipSetStringFormatAlign
@ stdcall GdipSetStringFormatAlign(ptr long)
@ stub GdipSetStringFormatDigitSubstitution
@ stub GdipSetStringFormatFlags
@ stub GdipSetStringFormatHotkeyPrefix

View File

@ -178,6 +178,7 @@ struct GpFont{
struct GpStringFormat{
INT attr;
LANGID lang;
StringAlignment align;
};
#endif

View File

@ -43,3 +43,25 @@ GpStatus WINGDIPAPI GdipCreateStringFormat(INT attr, LANGID lang,
return Ok;
}
GpStatus WINGDIPAPI GdipGetStringFormatAlign(GpStringFormat *format,
StringAlignment *align)
{
if(!format || !align)
return InvalidParameter;
*align = format->align;
return Ok;
}
GpStatus WINGDIPAPI GdipSetStringFormatAlign(GpStringFormat *format,
StringAlignment align)
{
if(!format)
return InvalidParameter;
format->align = align;
return Ok;
}

View File

@ -214,6 +214,13 @@ enum TextRenderingHint
TextRenderingHintClearTypeGridFit
};
enum StringAlignment
{
StringAlignmentNear = 0,
StringAlignmentCenter = 1,
StringAlignmentFar = 2
};
#ifndef __cplusplus
typedef enum Unit Unit;
@ -237,6 +244,7 @@ typedef enum LinearGradientMode LinearGradientMode;
typedef enum EmfType EmfType;
typedef enum CompositingMode CompositingMode;
typedef enum TextRenderingHint TextRenderingHint;
typedef enum StringAlignment StringAlignment;
#endif /* end of c typedefs */

View File

@ -249,6 +249,8 @@ GpStatus WINGDIPAPI GdipDeleteFont(GpFont*);
GpStatus WINGDIPAPI GdipGetLogFontW(GpFont*,GpGraphics*,LOGFONTW*);
GpStatus WINGDIPAPI GdipCreateStringFormat(INT,LANGID,GpStringFormat**);
GpStatus WINGDIPAPI GdipGetStringFormatAlign(GpStringFormat*,StringAlignment*);
GpStatus WINGDIPAPI GdipSetStringFormatAlign(GpStringFormat*,StringAlignment);
#ifdef __cplusplus
}