Table of Contents

Class InlineObjectNative

Namespace
SharpDX.DirectWrite
Assembly
SharpDX.Direct2D1.dll
[Guid("8339FDE3-106F-47ab-8373-1C6295EB10B3")]
public class InlineObjectNative : ComObject, InlineObject, IUnknown, ICallbackable, IDisposable
Inheritance
InlineObjectNative
Implements
IUnknown
ICallbackable
Derived

Constructors

InlineObjectNative(nint)

public InlineObjectNative(nint nativePtr)

Parameters

nativePtr nint

Properties

Metrics

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

public InlineObjectMetrics Metrics { get; }

Property Value

InlineObjectMetrics

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

Metrics_

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

public InlineObjectMetrics Metrics_ { get; }

Property Value

InlineObjectMetrics

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.

public OverhangMetrics OverhangMetrics { get; }

Property Value

OverhangMetrics

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

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.

The overhangs should be returned relative to the reported size of the object (see InlineObjectMetrics), and should not be baseline adjusted.

public OverhangMetrics OverhangMetrics_ { get; }

Property Value

OverhangMetrics

Methods

Draw(object, TextRenderer, float, float, bool, bool, ComObject)

The application implemented rendering callback (DrawInlineObject(object, float, float, InlineObject, bool, bool, ComObject)) 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.

public void Draw(object clientDrawingContext, TextRenderer renderer, float originX, float originY, bool isSideways, bool isRightToLeft, ComObject clientDrawingEffect)

Parameters

clientDrawingContext object

The drawing context passed to . This parameter may be NULL.

renderer TextRenderer

The same renderer passed to 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.

clientDrawingEffect ComObject

The drawing effect set in SetDrawingEffect(ComObject, TextRange). 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.

public 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.

Operators

explicit operator InlineObjectNative(nint)

public static explicit operator InlineObjectNative(nint nativePtr)

Parameters

nativePtr nint

Returns

InlineObjectNative