[1/2] DWrite: Implemented functions regarding text alignment. (try 3)

Nikolay Sivov bunglehead at gmail.com
Fri May 31 13:17:56 CDT 2013


On Fri, May 31, 2013 at 9:07 PM, Fabian Müntefering <Cookiezzz97 at gmx.de>wrote:

> Implemented functions of text format and text layout regarding text
> alignment.
>
> Try 3: Used proper enum value to set the enum variables.
>
>
>
>
>
+    if(alignment!=DWRITE_TEXT_ALIGNMENT_CENTER &&
alignment!=DWRITE_TEXT_ALIGNMENT_LEADING &&
+       alignment!=DWRITE_TEXT_ALIGNMENT_JUSTIFIED &&
alignment!=DWRITE_TEXT_ALIGNMENT_TRAILING)
+        return E_INVALIDARG;
+    This->format.text_align = alignment;

This doesn't look great, you'll need a test that shows it really
rejects meaningless values,
and if it does it would be simpler to compare with greatest enum value.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20130531/37bcafe7/attachment.html>


More information about the wine-devel mailing list