Table of Contents

Enum VerticalAlignment

Namespace
VisioForge.Core.Types.VideoProcessing
Assembly
VisioForge.Core.dll

Specifies the vertical alignment of visual elements within video frames during video processing operations.

public enum VerticalAlignment

Fields

Top = 0

Aligns the element to the top edge of its container.

When applied to visual elements, the top edge is positioned at or near the top of the frame. Margin settings can be used to add spacing from the exact top edge.

Common uses: - Channel logos and station identifiers - Timestamp displays - Recording indicators - Header text and titles - Top banner notifications

Best practices: - Add appropriate margins to avoid clipping by overscan on displays - Consider safe zones for broadcast content (approximately 5-10% from edges) - Ensure sufficient contrast with video content at top of frame

Center = 1

Centers the element vertically within its container.

The element's vertical center is aligned with the center of its container, providing equal spacing from top and bottom edges. This is ideal for elements that should be prominently displayed without favoring top or bottom positioning.

Common uses: - Main title screens - Loading indicators - Alert messages and notifications - Picture-in-picture displays - Centered watermarks - Interactive overlays

Design considerations: - Centered elements draw maximum attention - Ensure element doesn't obscure critical video content - Consider using semi-transparency for better integration - Works well with centered horizontal alignment for symmetrical layouts

Bottom = 2

Aligns the element to the bottom edge of its container.

The bottom edge of the element is positioned at or near the bottom of the frame. This is the most common alignment for subtitles, captions, and status information that shouldn't interfere with the main video content.

Common uses: - Subtitles and closed captions - Credits and attribution - Progress bars and playback controls - Footer information - Lower thirds (broadcast graphics) - News tickers and crawls

Subtitle best practices: - Maintain minimum 40-60 pixels from bottom edge - Use consistent positioning across all subtitles - Ensure readability against varying backgrounds - Consider safe zones for different display types - Account for multi-line text expansion

Examples

// Position a timestamp in the top-right corner
var timestampSettings = new TextOverlaySettings
{
    Text = DateTime.Now.ToString(),
    HorizontalAlignment = HorizontalAlignment.Right,
    VerticalAlignment = VerticalAlignment.Top,
    Margin = new Padding(10)
};

// Center a notification message
var notificationSettings = new TextOverlaySettings
{
    Text = "Recording Started",
    HorizontalAlignment = HorizontalAlignment.Center,
    VerticalAlignment = VerticalAlignment.Center
};

// Position subtitles at the bottom
var subtitleSettings = new SubtitleSettings
{
    VerticalAlignment = VerticalAlignment.Bottom,
    MarginBottom = 50  // Pixels from bottom edge
};

Remarks

The VisioForge.Core.Types.VideoProcessing.VerticalAlignment enumeration controls the vertical positioning of various visual elements overlaid on video content, including: - Text overlays and subtitles - Watermarks and logos - Picture-in-picture elements - Graphical annotations and callouts - Motion detection visualizations - Status information displays

This alignment is relative to the containing element or frame boundaries and works in conjunction with VisioForge.Core.Types.VideoProcessing.HorizontalAlignment to precisely position elements within the frame.

Common positioning patterns: - Top + Left/Right: Corner watermarks, logos - Bottom + Center: Subtitles, captions - Center + Center: Main titles, notifications - Top + Center: Headers, timestamps