Enum BaseLineShift

Enum BaseLineShift

Namespace: Aspose.Svg.Builder
Assembly: Aspose.SVG.dll (25.5.0)

Specifies the vertical position of an element relative to its baseline in SVG.

[ComVisible(true)]
public enum BaseLineShift

Fields

Bottom = 4

Aligns the bottom of the element with the bottom of the line box.

Setting the value to ‘bottom’ aligns the bottom of the element with the lowest item in the line box, often used for alignment with elements of different heights within a line.

Center = 3

Centers the element in the line box.

‘center’ vertically centers the element within the line box, useful for aligning text or inline elements with varying sizes.

Sub = 0

Aligns the baseline of the element with the subscript baseline of the parent’s text.

When set to ‘sub’, the element is positioned slightly below the baseline, typically used for subscript text.

Super = 1

Aligns the baseline of the element with the superscript baseline of the parent’s text.

When set to ‘super’, the element is positioned slightly above the baseline, typically used for superscript text.

Top = 2

Aligns the top of the element with the top of the line box.

Setting the value to ’top’ aligns the top of the element with the highest item in the line box, often used for alignment with large font sizes or images within a line of text.

Remarks

The ‘baseline-shift’ attribute in SVG is used to adjust the vertical position of an element relative to its baseline, which is particularly useful in text rendering. This enum provides various options for shifting the baseline to achieve different text effects.

 English