gdiplus: GdipStringFormatGetGenericTypographic implemented.
This commit is contained in:
parent
65a2274dc7
commit
2e25db0409
|
@ -601,7 +601,7 @@
|
|||
@ stdcall GdipShearMatrix(ptr long long long)
|
||||
@ stdcall GdipStartPathFigure(ptr)
|
||||
@ stdcall GdipStringFormatGetGenericDefault(ptr)
|
||||
@ stub GdipStringFormatGetGenericTypographic
|
||||
@ stdcall GdipStringFormatGetGenericTypographic(ptr)
|
||||
@ stub GdipTestControl
|
||||
@ stdcall GdipTransformMatrixPoints(ptr ptr long)
|
||||
@ stdcall GdipTransformMatrixPointsI(ptr ptr long)
|
||||
|
|
|
@ -237,3 +237,27 @@ GpStatus WINGDIPAPI GdipCloneStringFormat(GDIPCONST GpStringFormat *format, GpSt
|
|||
|
||||
return Ok;
|
||||
}
|
||||
|
||||
/*FIXME: add zero tab stops number */
|
||||
GpStatus WINGDIPAPI GdipStringFormatGetGenericTypographic(GpStringFormat **format)
|
||||
{
|
||||
GpStatus stat;
|
||||
|
||||
if(!format)
|
||||
return InvalidParameter;
|
||||
|
||||
stat = GdipCreateStringFormat(StringFormatFlagsNoFitBlackBox |
|
||||
StringFormatFlagsLineLimit |
|
||||
StringFormatFlagsNoClip, LANG_NEUTRAL, format);
|
||||
if(stat != Ok)
|
||||
return stat;
|
||||
|
||||
(*format)->digitlang = LANG_NEUTRAL;
|
||||
(*format)->digitsub = StringDigitSubstituteUser;
|
||||
(*format)->trimming = StringTrimmingNone;
|
||||
(*format)->hkprefix = HotkeyPrefixNone;
|
||||
(*format)->align = StringAlignmentNear;
|
||||
(*format)->vertalign = StringAlignmentNear;
|
||||
|
||||
return Ok;
|
||||
}
|
||||
|
|
|
@ -130,6 +130,44 @@ static void test_digitsubstitution(void)
|
|||
expect(Ok, stat);
|
||||
}
|
||||
|
||||
static void test_getgenerictypographic(void)
|
||||
{
|
||||
GpStringFormat *format;
|
||||
GpStatus stat;
|
||||
INT flags;
|
||||
INT n;
|
||||
StringAlignment align, valign;
|
||||
StringTrimming trimming;
|
||||
StringDigitSubstitute digitsub;
|
||||
LANGID digitlang;
|
||||
|
||||
/* NULL arg */
|
||||
stat = GdipStringFormatGetGenericTypographic(NULL);
|
||||
expect(InvalidParameter, stat);
|
||||
|
||||
stat = GdipStringFormatGetGenericTypographic(&format);
|
||||
expect(Ok, stat);
|
||||
|
||||
GdipGetStringFormatFlags(format, &flags);
|
||||
GdipGetStringFormatAlign(format, &align);
|
||||
GdipGetStringFormatLineAlign(format, &valign);
|
||||
GdipGetStringFormatHotkeyPrefix(format, &n);
|
||||
GdipGetStringFormatTrimming(format, &trimming);
|
||||
GdipGetStringFormatDigitSubstitution(format, &digitlang, &digitsub);
|
||||
|
||||
expect((StringFormatFlagsNoFitBlackBox |StringFormatFlagsLineLimit | StringFormatFlagsNoClip),
|
||||
flags);
|
||||
expect(HotkeyPrefixNone, n);
|
||||
expect(StringAlignmentNear, align);
|
||||
expect(StringAlignmentNear, align);
|
||||
expect(StringTrimmingNone, trimming);
|
||||
expect(StringDigitSubstituteUser, digitsub);
|
||||
expect(LANG_NEUTRAL, digitlang);
|
||||
|
||||
stat = GdipDeleteStringFormat(format);
|
||||
expect(Ok, stat);
|
||||
}
|
||||
|
||||
START_TEST(stringformat)
|
||||
{
|
||||
struct GdiplusStartupInput gdiplusStartupInput;
|
||||
|
@ -145,6 +183,7 @@ START_TEST(stringformat)
|
|||
test_constructor();
|
||||
test_characterrange();
|
||||
test_digitsubstitution();
|
||||
test_getgenerictypographic();
|
||||
|
||||
GdiplusShutdown(gdiplusToken);
|
||||
}
|
||||
|
|
|
@ -435,6 +435,7 @@ GpStatus WINGDIPAPI GdipGetFontCollectionFamilyList(GpFontCollection*, INT,
|
|||
GpStatus WINGDIPAPI GdipCreateStringFormat(INT,LANGID,GpStringFormat**);
|
||||
GpStatus WINGDIPAPI GdipDeleteStringFormat(GpStringFormat*);
|
||||
GpStatus WINGDIPAPI GdipStringFormatGetGenericDefault(GpStringFormat **);
|
||||
GpStatus WINGDIPAPI GdipStringFormatGetGenericTypographic(GpStringFormat **);
|
||||
GpStatus WINGDIPAPI GdipGetStringFormatAlign(GpStringFormat*,StringAlignment*);
|
||||
GpStatus WINGDIPAPI GdipGetStringFormatDigitSubstitution(GDIPCONST GpStringFormat*,LANGID*,
|
||||
StringDigitSubstitute*);
|
||||
|
|
Loading…
Reference in New Issue