Skip to content

CurvePlacement

ClassTextStudioTextStudio
public sealed class CurvePlacement : IPlacementContextStrategy, IPlacementStrategy

Bends selected glyph baselines while preserving their source x spacing and line breaks.

ConfigureInline(in TextStudioCurveDefinition, float, in TextStudioApplicationSelector, TextStudioCurveMapping)

Section titled “ConfigureInline(in TextStudioCurveDefinition, float, in TextStudioApplicationSelector, TextStudioCurveMapping)”
public void ConfigureInline(in TextStudioCurveDefinition definition, float height, in TextStudioApplicationSelector selection, TextStudioCurveMapping mapping)

Copies an inline curve definition and configures its height, selected text, and match mapping.

Parameters

Name Type
definition TextStudio.TextStudioCurveDefinition
height System.Single
selection TextStudio.TextStudioApplicationSelector
mapping TextStudio.TextStudioCurveMapping

ConfigureProfile(TextStudioCurveProfile, float, in TextStudioApplicationSelector, TextStudioCurveMapping)

Section titled “ConfigureProfile(TextStudioCurveProfile, float, in TextStudioApplicationSelector, TextStudioCurveMapping)”
public void ConfigureProfile(TextStudioCurveProfile profile, float height, in TextStudioApplicationSelector selection, TextStudioCurveMapping mapping)

Links a shared curve profile and configures its height, selected text, and match mapping.

Parameters

Name Type
profile TextStudio.TextStudioCurveProfile
height System.Single
selection TextStudio.TextStudioApplicationSelector
mapping TextStudio.TextStudioCurveMapping

ConfigureSettings(float, in TextStudioApplicationSelector, TextStudioCurveMapping)

Section titled “ConfigureSettings(float, in TextStudioApplicationSelector, TextStudioCurveMapping)”
public void ConfigureSettings(float height, in TextStudioApplicationSelector selection, TextStudioCurveMapping mapping)

Updates curve height, selection, and mapping while invalidating the resolved selection.

Parameters

Name Type
height System.Single
selection TextStudio.TextStudioApplicationSelector
mapping TextStudio.TextStudioCurveMapping

ComputePlacements(Vector3[], GlyphPlacement[], int)

Section titled “ComputePlacements(Vector3[], GlyphPlacement[], int)”
public void ComputePlacements(Vector3[] layoutPositions, GlyphPlacement[] placements, int glyphCount)

Compute placements for all visible glyphs.

Parameters

Name Type Description
layoutPositions UnityEngine.Vector3[] Input: baseline positions from the layout engine.
placements TextStudio.GlyphPlacement[] Output: final 3D placements.
glyphCount System.Int32 Number of glyphs.

ComputePlacements(in PlacementContext, GlyphPlacement[])

Section titled “ComputePlacements(in PlacementContext, GlyphPlacement[])”
public void ComputePlacements(in PlacementContext context, GlyphPlacement[] placements)

Writes layout-based glyph placements and applies the resolved curve to selected mapping domains.

Parameters

Name Type
context TextStudio.PlacementContext
placements TextStudio.GlyphPlacement[]

public CurvePlacement()

public PlacementMode Mode { get; }

Returns

TextStudio.PlacementMode

public float Height { get; }

Returns

System.Single

public TextStudioCurveMapping Mapping { get; }

Returns

TextStudio.TextStudioCurveMapping

public TextStudioApplicationSelector Selection { get; }

Returns

TextStudio.TextStudioApplicationSelector

public TextStudioCurveReference Curve { get; }

Returns

TextStudio.TextStudioCurveReference

public string SelectionDiagnostic { get; }

Returns

System.String