Dela via


InkPresenterProtractor Class

Definition

Represents a visual stencil, in the form of a protractor for drawing arcs and curves, displayed as a semi-transparent overlay on an InkCanvas.

The stencil transforms how an ink stroke is rendered:

  • It snaps the ink stroke to the stencil edge if the pen tip is within a distance threshold (gutter).
  • It acts as a mask and prevents the drawing of an ink stroke within the area obscured by the stencil.

The InkPresenterRuler can be manipulated both programmatically and by the user. It also scales and translates with the InkCanvas.

public ref class InkPresenterProtractor sealed
/// [Windows.Foundation.Metadata.Activatable(Windows.UI.Input.Inking.IInkPresenterProtractorFactory, 262144, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 262144)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class InkPresenterProtractor final
[Windows.Foundation.Metadata.Activatable(typeof(Windows.UI.Input.Inking.IInkPresenterProtractorFactory), 262144, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class InkPresenterProtractor
Public NotInheritable Class InkPresenterProtractor
Inheritance
Object Platform::Object IInspectable InkPresenterProtractor
Attributes
Implements

Windows requirements

Device family
Windows 10 Creators Update (introduced in 10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v4.0)

Remarks

The opacity of the stencil is set at 75% when static, and 50% during manipulation.

Constructors

InkPresenterProtractor(InkPresenter)

Initializes a new instance of the InkPresenterProtractor class.

Properties

AccentColor

Gets or sets the color of the rays and horizontal marks for the protractor stencil.

Protractor stencil

Rays represent the angle of the drawn arc. They are visible only when ink is snapped to the protractor and the protractor has not been moved.

Horizontal marks represent a horizontal line bisecting the protractor. The default positions are 3 and 9 o’clock, but a rotation transform can be applied to the protractor, which also rotates the marks.

AreRaysVisible

Gets or sets whether the rays are displayed on the protractor stencil.

Protractor stencil

Rays represent the angle of the drawn arc. They are visible only when ink is snapped to the protractor and the protractor has not been moved.

AreTickMarksVisible

Gets or sets whether the tick marks are displayed on the protractor stencil.

Protractor stencil

Tick marks represent the degree marks on the protractor.

BackgroundColor

Gets or sets the background color of the InkPresenterProtractor.

ForegroundColor

Gets or sets the color of the foreground elements on an InkPresenterProtractor.

IsAngleReadoutVisible

Gets or sets whether the numerical angle is displayed on the protractor stencil.

Protractor stencil

The angle readout represents the numeric value for the angle of the drawn arc.

IsCenterMarkerVisible

Gets or sets whether the center mark is displayed on the protractor stencil.

Protractor stencil

The center mark represents the visual in the center of the protractor.

IsResizable

Gets or sets whether the protractor stencil can be resized.

IsVisible

Gets or sets whether the protractor stencil is visible.

Kind

Gets the type of stencil to display on the InkCanvas.

Radius

Gets or sets the radial size of the protractor.

Transform

Gets or sets the position and rotation angle of the protractor stencil within the 2-D coordinate space of the InkCanvas.

Both position and rotation are based on the top left corner of the stencil relative to the origin of the InkCanvas.

Applies to

See also