gdiplus: Added GdipGetStringFormatTrimming/GdipSetStringFormatTrimming.

This commit is contained in:
Evan Stade 2007-08-14 19:00:40 -07:00 committed by Alexandre Julliard
parent 16dea47a5c
commit 551a606ab2
5 changed files with 52 additions and 2 deletions

View File

@ -394,7 +394,7 @@
@ stub GdipGetStringFormatMeasurableCharacterRangeCount @ stub GdipGetStringFormatMeasurableCharacterRangeCount
@ stub GdipGetStringFormatTabStopCount @ stub GdipGetStringFormatTabStopCount
@ stub GdipGetStringFormatTabStops @ stub GdipGetStringFormatTabStops
@ stub GdipGetStringFormatTrimming @ stdcall GdipGetStringFormatTrimming(ptr ptr)
@ stub GdipGetTextContrast @ stub GdipGetTextContrast
@ stdcall GdipGetTextRenderingHint(ptr ptr) @ stdcall GdipGetTextRenderingHint(ptr ptr)
@ stub GdipGetTextureImage @ stub GdipGetTextureImage
@ -592,7 +592,7 @@
@ stub GdipSetStringFormatLineAlign @ stub GdipSetStringFormatLineAlign
@ stub GdipSetStringFormatMeasurableCharacterRanges @ stub GdipSetStringFormatMeasurableCharacterRanges
@ stub GdipSetStringFormatTabStops @ stub GdipSetStringFormatTabStops
@ stub GdipSetStringFormatTrimming @ stdcall GdipSetStringFormatTrimming(ptr long)
@ stub GdipSetTextContrast @ stub GdipSetTextContrast
@ stdcall GdipSetTextRenderingHint(ptr long) @ stdcall GdipSetTextRenderingHint(ptr long)
@ stdcall GdipSetTextureTransform(ptr ptr) @ stdcall GdipSetTextureTransform(ptr ptr)

View File

@ -179,6 +179,7 @@ struct GpStringFormat{
INT attr; INT attr;
LANGID lang; LANGID lang;
StringAlignment align; StringAlignment align;
StringTrimming trimming;
}; };
#endif #endif

View File

@ -55,6 +55,17 @@ GpStatus WINGDIPAPI GdipGetStringFormatAlign(GpStringFormat *format,
return Ok; return Ok;
} }
GpStatus WINGDIPAPI GdipGetStringFormatTrimming(GpStringFormat *format,
StringTrimming *trimming)
{
if(!format || !trimming)
return InvalidParameter;
*trimming = format->trimming;
return Ok;
}
GpStatus WINGDIPAPI GdipSetStringFormatAlign(GpStringFormat *format, GpStatus WINGDIPAPI GdipSetStringFormatAlign(GpStringFormat *format,
StringAlignment align) StringAlignment align)
{ {
@ -65,3 +76,14 @@ GpStatus WINGDIPAPI GdipSetStringFormatAlign(GpStringFormat *format,
return Ok; return Ok;
} }
GpStatus WINGDIPAPI GdipSetStringFormatTrimming(GpStringFormat *format,
StringTrimming trimming)
{
if(!format)
return InvalidParameter;
format->trimming = trimming;
return Ok;
}

View File

@ -221,6 +221,29 @@ enum StringAlignment
StringAlignmentFar = 2 StringAlignmentFar = 2
}; };
enum StringFormatFlags
{
StringFormatFlagsDirectionRightToLeft = 0x00000001,
StringFormatFlagsDirectionVertical = 0x00000002,
StringFormatFlagsNoFitBlackBox = 0x00000004,
StringFormatFlagsDisplayFormatControl = 0x00000020,
StringFormatFlagsNoFontFallback = 0x00000400,
StringFormatFlagsMeasureTrailingSpaces = 0x00000800,
StringFormatFlagsNoWrap = 0x00001000,
StringFormatFlagsLineLimit = 0x00002000,
StringFormatFlagsNoClip = 0x00004000
};
enum StringTrimming
{
StringTrimmingNone = 0,
StringTrimmingCharacter = 1,
StringTrimmingWord = 2,
StringTrimmingEllipsisCharacter = 3,
StringTrimmingEllipsisWord = 4,
StringTrimmingEllipsisPath = 5
};
#ifndef __cplusplus #ifndef __cplusplus
typedef enum Unit Unit; typedef enum Unit Unit;
@ -245,6 +268,8 @@ typedef enum EmfType EmfType;
typedef enum CompositingMode CompositingMode; typedef enum CompositingMode CompositingMode;
typedef enum TextRenderingHint TextRenderingHint; typedef enum TextRenderingHint TextRenderingHint;
typedef enum StringAlignment StringAlignment; typedef enum StringAlignment StringAlignment;
typedef enum StringTrimming StringTrimming;
typedef enum StringFormatFlags StringFormatFlags;
#endif /* end of c typedefs */ #endif /* end of c typedefs */

View File

@ -250,7 +250,9 @@ GpStatus WINGDIPAPI GdipGetLogFontW(GpFont*,GpGraphics*,LOGFONTW*);
GpStatus WINGDIPAPI GdipCreateStringFormat(INT,LANGID,GpStringFormat**); GpStatus WINGDIPAPI GdipCreateStringFormat(INT,LANGID,GpStringFormat**);
GpStatus WINGDIPAPI GdipGetStringFormatAlign(GpStringFormat*,StringAlignment*); GpStatus WINGDIPAPI GdipGetStringFormatAlign(GpStringFormat*,StringAlignment*);
GpStatus WINGDIPAPI GdipGetStringFormatTrimming(GpStringFormat*,StringTrimming*);
GpStatus WINGDIPAPI GdipSetStringFormatAlign(GpStringFormat*,StringAlignment); GpStatus WINGDIPAPI GdipSetStringFormatAlign(GpStringFormat*,StringAlignment);
GpStatus WINGDIPAPI GdipSetStringFormatTrimming(GpStringFormat*,StringTrimming);
#ifdef __cplusplus #ifdef __cplusplus
} }