Module: wine Branch: master Commit: 16dea47a5c690d1833547f5740631c558a9def89 URL: http://source.winehq.org/git/wine.git/?a=commit;h=16dea47a5c690d1833547f5740...
Author: Evan Stade estade@gmail.com Date: Tue Aug 14 19:00:32 2007 -0700
gdiplus: Added GdipGetStringFormatAlign/GdipSetStringFormatAlign.
---
dlls/gdiplus/gdiplus.spec | 4 ++-- dlls/gdiplus/gdiplus_private.h | 1 + dlls/gdiplus/stringformat.c | 22 ++++++++++++++++++++++ include/gdiplusenums.h | 8 ++++++++ include/gdiplusflat.h | 2 ++ 5 files changed, 35 insertions(+), 2 deletions(-)
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 71a6b26..5a2bbd2 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -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 diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h index c462e10..d6c9dba 100644 --- a/dlls/gdiplus/gdiplus_private.h +++ b/dlls/gdiplus/gdiplus_private.h @@ -178,6 +178,7 @@ struct GpFont{ struct GpStringFormat{ INT attr; LANGID lang; + StringAlignment align; };
#endif diff --git a/dlls/gdiplus/stringformat.c b/dlls/gdiplus/stringformat.c index 0836a3b..c8bd3d1 100644 --- a/dlls/gdiplus/stringformat.c +++ b/dlls/gdiplus/stringformat.c @@ -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; +} diff --git a/include/gdiplusenums.h b/include/gdiplusenums.h index 3a68a54..91e779b 100644 --- a/include/gdiplusenums.h +++ b/include/gdiplusenums.h @@ -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 */
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 8b325a6..ff1bcb1 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -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 }