Skip to content

IInnerNavigationPrinterLayer

Namespace: ThinkGeo.Core

Defines the contract for navigating content inside a printer-layer frame without moving the printer layer itself. Implementations typically use this for scenarios such as panning or zooming a map preview that is rendered inside the printer frame.

public interface IInnerNavigationPrinterLayer

Properties

EnableInnerNavigation

Gets or sets a value indicating whether interactive overlays are allowed to pan or zoom the content rendered inside this printer layer.

public abstract bool EnableInnerNavigation { get; set; }

Property Value

Boolean
to allow inner navigation interactions such as Ctrl-pan or Ctrl-zoom; otherwise, .

Methods

InvalidateInnerContentCache()

Invalidates any cached image, preview state, or other reusable rendering artifact that represents the current inner content.

void InvalidateInnerContentCache()

Remarks:

Call this after the frame size changes or after inner content changes in a way that makes the cached preview stale. The next draw should regenerate the inner content from its authoritative state.

BeginInnerPanSession()

Begins a pan session for the content inside the printer layer.

bool BeginInnerPanSession()

Returns

Boolean
if the pan session was started and subsequent preview updates may be applied; otherwise, when inner navigation is disabled or the current state cannot support panning.

Remarks:

A pan session lets the caller preview multiple incremental pan updates before deciding whether to commit them through IInnerNavigationPrinterLayer.EndInnerPanSession(Boolean).

TryPreviewInnerPan(Double, Double)

Applies an incremental preview pan during an active inner pan session.

bool TryPreviewInnerPan(double horizontalPanRatio, double verticalPanRatio)

Parameters

horizontalPanRatio Double

        The horizontal pan delta expressed as a ratio of the current printer-frame width.
        Positive values move the inner content to the right and negative values move it to the left.

verticalPanRatio Double

        The vertical pan delta expressed as a ratio of the current printer-frame height.
        Positive values move the inner content downward and negative values move it upward.

Returns

Boolean
if the preview state changed; otherwise, .

Remarks:

This method is intended for transient preview updates while dragging. Implementations should avoid committing the authoritative inner extent until IInnerNavigationPrinterLayer.EndInnerPanSession(Boolean) is called with a commit request.

EndInnerPanSession(Boolean)

Ends the current inner pan session.

bool EndInnerPanSession(bool commitPreviewPan)

Parameters

commitPreviewPan Boolean
to commit the accumulated preview pan into the authoritative inner content state; to discard the preview and leave the original state unchanged.

Returns

Boolean
if ending the session resulted in a committed state change; otherwise, .

TryZoomInnerContentAt(Double, Double, Double)

Zooms the inner content around a normalized anchor point inside the printer frame.

bool TryZoomInnerContentAt(double zoomFactor, double anchorXRatio, double anchorYRatio)

Parameters

zoomFactor Double

        The zoom factor to apply. Values greater than 1 zoom in, while values between 0 and 1 zoom out.

anchorXRatio Double

        The horizontal anchor position, normalized from 0 to 1 across the printer-frame width.
        A value of 0 represents the left edge and 1 represents the right edge.

anchorYRatio Double

        The vertical anchor position, normalized from 0 to 1 across the printer-frame height.
        A value of 0 represents the top edge and 1 represents the bottom edge.

Returns

Boolean
if the zoom operation changed the inner content state; otherwise, .

Remarks:

Implementations may clamp anchor ratios into the valid 0..1 range before applying the zoom.