[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.DirectWrite.IInlineObject

Interface IInlineObject

Namespace
GrapeCity.Documents.DX.DirectWrite
Assembly
GcDocs.DX.Windows.dll

IDWriteInlineObject

[Guid("8339FDE3-106F-47ab-8373-1C6295EB10B3")]
[Shadow(typeof(InlineObjectShadow))]
public interface IInlineObject : ICallbackable, IDisposable
Inherited Members
System.IDisposable.Dispose()

Properties

Metrics

TextLayout calls this callback function to get the measurement of the inline object.

InlineObjectMetrics Metrics { get; }

Property Value

InlineObjectMetrics

a structure describing the geometric measurement of anapplication-defined inline object. These metrics are in relation to the baseline of the adjacent text.

OverhangMetrics

TextLayout calls this callback function to get the visible extents (in DIPs) of the inline object. In the case of a simple bitmap, with no padding and no overhang, all the overhangs will simply be zeroes.

OverhangMetrics OverhangMetrics { get; }

Property Value

OverhangMetrics

Overshoot of visible extents (in DIPs) outside the object.

Methods

Draw(object, ITextRenderer, float, float, bool, bool, IntPtr)

The application implemented rendering callback (DrawInlineObject(object, float, float, IInlineObject, bool, bool, IntPtr)) can use this to draw the inline object without needing to cast or query the object type. The text layout does not call this method directly.

void Draw(object clientDrawingContext, ITextRenderer renderer, float originX, float originY, bool isSideways, bool isRightToLeft, IntPtr clientDrawingEffectPtr)

Parameters

clientDrawingContext object

The drawing context passed to GrapeCity.Documents.DX.DirectWrite.TextLayout.Draw_(System.IntPtr,System.IntPtr,System.Single,System.Single). This parameter may be NULL.

renderer ITextRenderer

The same renderer passed to GrapeCity.Documents.DX.DirectWrite.TextLayout.Draw_(System.IntPtr,System.IntPtr,System.Single,System.Single) as the object's containing parent. This is useful if the inline object is recursive such as a nested layout.

originX float

The x-coordinate at the upper-left corner of the inline object.

originY float

The y-coordinate at the upper-left corner of the inline object.

isSideways bool

A Boolean flag that indicates whether the object's baseline runs alongside the baseline axis of the line.

isRightToLeft bool

A Boolean flag that indicates whether the object is in a right-to-left context and should be drawn flipped.

clientDrawingEffectPtr System.IntPtr

The drawing effect set in TextLayout.SetDrawingEffect. Usually this effect is a foreground brush that is used in glyph drawing.

GetBreakConditions(out BreakCondition, out BreakCondition)

Layout uses this to determine the line-breaking behavior of the inline object among the text.

void GetBreakConditions(out BreakCondition breakConditionBefore, out BreakCondition breakConditionAfter)

Parameters

breakConditionBefore BreakCondition

When this method returns, contains a value which indicates the line-breaking condition between the object and the content immediately preceding it.

breakConditionAfter BreakCondition

When this method returns, contains a value which indicates the line-breaking condition between the object and the content immediately following it.