Interface InlineObject
- Namespace
- SharpDX.DirectWrite
- Assembly
- SharpDX.Direct2D1.dll
[Guid("8339FDE3-106F-47ab-8373-1C6295EB10B3")]
public interface InlineObject : IUnknown, ICallbackable, IDisposable
- Inherited Members
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 an application-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, 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.
void Draw(object clientDrawingContext, TextRenderer renderer, float originX, float originY, bool isSideways, bool isRightToLeft, ComObject clientDrawingEffect)
Parameters
clientDrawingContext
objectThe drawing context passed to
. This parameter may be NULL. renderer
TextRendererThe 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
floatThe x-coordinate at the upper-left corner of the inline object.
originY
floatThe y-coordinate at the upper-left corner of the inline object.
isSideways
boolA Boolean flag that indicates whether the object's baseline runs alongside the baseline axis of the line.
isRightToLeft
boolA Boolean flag that indicates whether the object is in a right-to-left context and should be drawn flipped.
clientDrawingEffect
ComObjectThe 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.
void GetBreakConditions(out BreakCondition breakConditionBefore, out BreakCondition breakConditionAfter)
Parameters
breakConditionBefore
BreakConditionWhen this method returns, contains a value which indicates the line-breaking condition between the object and the content immediately preceding it.
breakConditionAfter
BreakConditionWhen this method returns, contains a value which indicates the line-breaking condition between the object and the content immediately following it.