Класс InteractionAreaAppearanceManager
В этом разделе
Сохраняет и управляет настройками областей взаимодействия визуального инструмента.
Объектная модель
Синтаксис
'Declaration
Public Class InteractionAreaAppearanceManager
public class InteractionAreaAppearanceManager
public __gc class InteractionAreaAppearanceManager
public ref class InteractionAreaAppearanceManager
Пример
Вот C#/VB.NET код, который демонстрирует, как расширить радиус и изменить цвет фона точек изменения размера и поворота.
''' <summary>
''' Creates the custom interaction area appearance manager.
''' </summary>
''' <param name="visualTool">The visual tool.</param>
''' <returns>
''' The custom interaction area appearance manager.
''' </returns>
Public Function CreateCustomInteractionAreaAppearanceManager(visualTool As Vintasoft.Imaging.UI.VisualTools.UserInteraction.UserInteractionVisualTool) As Vintasoft.Imaging.UI.VisualTools.UserInteraction.InteractionAreaAppearanceManager
' create manager
Dim manager As New Vintasoft.Imaging.UI.VisualTools.UserInteraction.InteractionAreaAppearanceManager()
manager.VisualTool = visualTool
' begin the initialization of manager
manager.BeginInit()
' resize point
manager.ResizePointsRadius = 10
manager.ResizePointsInteractionRadius = 10
manager.ResizePointsBackgroundColor = System.Drawing.Color.FromArgb(128, System.Drawing.Color.Yellow)
' rotation point
manager.RotationPointDistance = 30
manager.RotationPointRadius = 10
manager.RotationPointInteractionRadius = 10
manager.RotationPointBackgroundColor = System.Drawing.Color.FromArgb(128, System.Drawing.Color.Pink)
' end the initialization of manager
manager.EndInit()
' return the manager
Return manager
End Function
/// <summary>
/// Creates the custom interaction area appearance manager.
/// </summary>
/// <param name="visualTool">The visual tool.</param>
/// <returns>
/// The custom interaction area appearance manager.
/// </returns>
public Vintasoft.Imaging.UI.VisualTools.UserInteraction.InteractionAreaAppearanceManager CreateCustomInteractionAreaAppearanceManager(
Vintasoft.Imaging.UI.VisualTools.UserInteraction.UserInteractionVisualTool visualTool)
{
// create manager
Vintasoft.Imaging.UI.VisualTools.UserInteraction.InteractionAreaAppearanceManager manager =
new Vintasoft.Imaging.UI.VisualTools.UserInteraction.InteractionAreaAppearanceManager();
manager.VisualTool = visualTool;
// begin the initialization of manager
manager.BeginInit();
// resize point
manager.ResizePointsRadius = 10;
manager.ResizePointsInteractionRadius = 10;
manager.ResizePointsBackgroundColor = System.Drawing.Color.FromArgb(128, System.Drawing.Color.Yellow);
// rotation point
manager.RotationPointDistance = 30;
manager.RotationPointRadius = 10;
manager.RotationPointInteractionRadius = 10;
manager.RotationPointBackgroundColor = System.Drawing.Color.FromArgb(128, System.Drawing.Color.Pink);
// end the initialization of manager
manager.EndInit();
// return the manager
return manager;
}
Иерархия наследования
Требования
Целевые платформы: .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5
Смотрите также