WPF-Visual

#region 程序集 PresentationCore, Version=10.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
// C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\10.0.9\ref\net10.0\PresentationCore.dll
#endregion

using System.Windows.Media.Effects;
using System.Windows.Media.Media3D;

namespace System.Windows.Media
{
    //
    // 摘要:
    //     Provides rendering support in WPF, which includes hit testing, coordinate transformation,
    //     and bounding box calculations.
    public abstract class Visual : DependencyObject
    {
        //
        // 摘要:
        //     Provides the base initialization for objects derived from the System.Windows.Media.Visual
        //     class.
        protected Visual();

        //
        // 摘要:
        //     Gets the number of child elements for the System.Windows.Media.Visual.
        //
        // 返回结果:
        //     The number of child elements.
        protected virtual int VisualChildrenCount { get; }
        //
        // 摘要:
        //     Gets the visual tree parent of the visual object.
        //
        // 返回结果:
        //     The System.Windows.Media.Visual parent.
        protected DependencyObject VisualParent { get; }
        //
        // 摘要:
        //     Gets or sets the System.Windows.Media.BitmapScalingMode for the System.Windows.Media.Visual.
        //
        //
        // 返回结果:
        //     The System.Windows.Media.BitmapScalingMode value for the System.Windows.Media.Visual.
        protected internal BitmapScalingMode VisualBitmapScalingMode { get; protected set; }
        //
        // 摘要:
        //     Gets or sets a cached representation of the System.Windows.Media.Visual.
        //
        // 返回结果:
        //     A System.Windows.Media.CacheMode that holds a cached representation of the System.Windows.Media.Visual.
        protected internal CacheMode VisualCacheMode { get; protected set; }
        //
        // 摘要:
        //     Gets or sets the System.Windows.Media.ClearTypeHint that determines how ClearType
        //     is rendered in the System.Windows.Media.Visual.
        //
        // 返回结果:
        //     A System.Windows.Media.ClearTypeHint of the System.Windows.Media.Visual.
        protected internal ClearTypeHint VisualClearTypeHint { get; set; }
        //
        // 摘要:
        //     Gets or sets the clip region of the System.Windows.Media.Visual as a System.Windows.Media.Geometry
        //     value.
        //
        // 返回结果:
        //     The clip region value of the visual as a System.Windows.Media.Geometry type.
        protected internal Geometry VisualClip { get; protected set; }
        //
        // 摘要:
        //     Gets or sets the edge mode of the System.Windows.Media.Visual as an System.Windows.Media.EdgeMode
        //     value.
        //
        // 返回结果:
        //     The System.Windows.Media.EdgeMode value of the visual.
        protected internal EdgeMode VisualEdgeMode { get; protected set; }
        //
        // 摘要:
        //     Gets or sets the bitmap effect to apply to the System.Windows.Media.Visual.
        //
        // 返回结果:
        //     An System.Windows.Media.Effects.Effect that represents the bitmap effect.
        protected internal Effect VisualEffect { get; protected set; }
        //
        // 摘要:
        //     Gets or sets the offset value of the visual object.
        //
        // 返回结果:
        //     A System.Windows.Vector that specifies the offset value.
        protected internal Vector VisualOffset { get; protected set; }
        //
        // 摘要:
        //     Gets or sets the opacity of the System.Windows.Media.Visual.
        //
        // 返回结果:
        //     The opacity value of the visual.
        protected internal double VisualOpacity { get; protected set; }
        //
        // 摘要:
        //     Gets or sets the System.Windows.Media.Brush value that represents the opacity
        //     mask of the System.Windows.Media.Visual.
        //
        // 返回结果:
        //     A System.Windows.Media.Brush that represents the opacity mask value of the visual.
        protected internal Brush VisualOpacityMask { get; protected set; }
        //
        // 摘要:
        //     Gets or sets a clipped scrollable area for the System.Windows.Media.Visual.
        //
        // 返回结果:
        //     A System.Windows.Rect that represents the scrollable clipping area, or null if
        //     no clipping area is assigned.
        protected internal Rect? VisualScrollableAreaClip { get; protected set; }
        //
        // 摘要:
        //     Gets or sets the System.Windows.Media.TextHintingMode of the System.Windows.Media.Visual.
        //
        //
        // 返回结果:
        //     The System.Windows.Media.TextHintingMode applied to the System.Windows.Media.Visual.
        protected internal TextHintingMode VisualTextHintingMode { get; set; }
        //
        // 摘要:
        //     Gets or sets the System.Windows.Media.TextRenderingMode of the System.Windows.Media.Visual.
        //
        //
        // 返回结果:
        //     The System.Windows.Media.TextRenderingMode applied to the System.Windows.Media.Visual.
        protected internal TextRenderingMode VisualTextRenderingMode { get; set; }
        //
        // 摘要:
        //     Gets or sets the System.Windows.Media.Transform value for the System.Windows.Media.Visual.
        //
        //
        // 返回结果:
        //     The transform value of the visual.
        protected internal Transform VisualTransform { get; protected set; }
        //
        // 摘要:
        //     Gets or sets the System.Windows.Media.Effects.BitmapEffectInput value for the
        //     System.Windows.Media.Visual.
        //
        // 返回结果:
        //     The bitmap effect input value for this visual object.
        [Obsolete("BitmapEffects are deprecated and no longer function.  Consider using Effects where appropriate instead.")]
        protected internal BitmapEffectInput VisualBitmapEffectInput { get; protected set; }
        //
        // 摘要:
        //     Gets or sets the x-coordinate (vertical) guideline collection.
        //
        // 返回结果:
        //     The x-coordinate guideline collection of the visual.
        protected internal DoubleCollection VisualXSnappingGuidelines { get; protected set; }
        //
        // 摘要:
        //     Gets or sets the System.Windows.Media.Effects.BitmapEffect value for the System.Windows.Media.Visual.
        //
        //
        // 返回结果:
        //     The bitmap effect for this visual object.
        [Obsolete("BitmapEffects are deprecated and no longer function.  Consider using Effects where appropriate instead.")]
        protected internal BitmapEffect VisualBitmapEffect { get; protected set; }
        //
        // 摘要:
        //     Gets or sets the y-coordinate (horizontal) guideline collection.
        //
        // 返回结果:
        //     The y-coordinate guideline collection of the visual.
        protected internal DoubleCollection VisualYSnappingGuidelines { get; protected set; }

        //
        // 摘要:
        //     Returns the common ancestor of two visual objects.
        //
        // 参数:
        //   otherVisual:
        //     A visual object of type System.Windows.DependencyObject.
        //
        // 返回结果:
        //     The common ancestor of the visual object and otherVisual if one exists; otherwise,
        //     null.
        public DependencyObject FindCommonVisualAncestor(DependencyObject otherVisual);
        //
        // 摘要:
        //     Determines whether the visual object is an ancestor of the descendant visual
        //     object.
        //
        // 参数:
        //   descendant:
        //     A value of type System.Windows.DependencyObject.
        //
        // 返回结果:
        //     true if the visual object is an ancestor of descendant; otherwise, false.
        public bool IsAncestorOf(DependencyObject descendant);
        //
        // 摘要:
        //     Determines whether the visual object is a descendant of the ancestor visual object.
        //
        //
        // 参数:
        //   ancestor:
        //     A value of type System.Windows.DependencyObject.
        //
        // 返回结果:
        //     true if the visual object is a descendant of ancestor; otherwise, false.
        public bool IsDescendantOf(DependencyObject ancestor);
        //
        // 摘要:
        //     Converts a System.Windows.Point in screen coordinates into a System.Windows.Point
        //     that represents the current coordinate system of the System.Windows.Media.Visual.
        //
        //
        // 参数:
        //   point:
        //     The System.Windows.Point value in screen coordinates.
        //
        // 返回结果:
        //     The converted System.Windows.Point value that represents the current coordinate
        //     system of the System.Windows.Media.Visual.
        public Point PointFromScreen(Point point);
        //
        // 摘要:
        //     Converts a System.Windows.Point that represents the current coordinate system
        //     of the System.Windows.Media.Visual into a System.Windows.Point in screen coordinates.
        //
        //
        // 参数:
        //   point:
        //     The System.Windows.Point value that represents the current coordinate system
        //     of the System.Windows.Media.Visual.
        //
        // 返回结果:
        //     The converted System.Windows.Point value in screen coordinates.
        public Point PointToScreen(Point point);
        //
        // 摘要:
        //     Returns a transform that can be used to transform coordinates from the System.Windows.Media.Visual
        //     to the specified System.Windows.Media.Visual ancestor of the visual object.
        //
        // 参数:
        //   ancestor:
        //     The System.Windows.Media.Visual to which the coordinates are transformed.
        //
        // 返回结果:
        //     A value of type System.Windows.Media.GeneralTransform.
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     ancestor is null.
        //
        //   T:System.ArgumentException:
        //     ancestor is not an ancestor of the visual.
        //
        //   T:System.InvalidOperationException:
        //     The visual objects are not related.
        public GeneralTransform TransformToAncestor(Visual ancestor);
        //
        // 摘要:
        //     Returns a transform that can be used to transform coordinates from the System.Windows.Media.Visual
        //     to the specified System.Windows.Media.Media3D.Visual3D ancestor of the visual
        //     object.
        //
        // 参数:
        //   ancestor:
        //     The System.Windows.Media.Media3D.Visual3D to which the coordinates are transformed.
        //
        //
        // 返回结果:
        //     A transform that can be used to transform coordinates from the System.Windows.Media.Visual
        //     to the specified System.Windows.Media.Media3D.Visual3D ancestor of the visual
        //     object.
        public GeneralTransform2DTo3D TransformToAncestor(Visual3D ancestor);
        //
        // 摘要:
        //     Returns a transform that can be used to transform coordinates from the System.Windows.Media.Visual
        //     to the specified visual object descendant.
        //
        // 参数:
        //   descendant:
        //     The System.Windows.Media.Visual to which the coordinates are transformed.
        //
        // 返回结果:
        //     A value of type System.Windows.Media.GeneralTransform.
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     descendant is null.
        //
        //   T:System.ArgumentException:
        //     The visual is not an ancestor of the descendant visual.
        //
        //   T:System.InvalidOperationException:
        //     The visual objects are not related.
        public GeneralTransform TransformToDescendant(Visual descendant);
        //
        // 摘要:
        //     Returns a transform that can be used to transform coordinates from the System.Windows.Media.Visual
        //     to the specified visual object.
        //
        // 参数:
        //   visual:
        //     The System.Windows.Media.Visual to which the coordinates are transformed.
        //
        // 返回结果:
        //     A value of type System.Windows.Media.GeneralTransform.
        //
        // 异常:
        //   T:System.ArgumentNullException:
        //     visual is null.
        //
        //   T:System.InvalidOperationException:
        //     The visual objects are not related.
        public GeneralTransform TransformToVisual(Visual visual);
        //
        // 摘要:
        //     Defines the parent-child relationship between two visuals.
        //
        // 参数:
        //   child:
        //     The child visual object to add to parent visual.
        protected void AddVisualChild(Visual child);
        //
        // 摘要:
        //     Returns the specified System.Windows.Media.Visual in the parent System.Windows.Media.VisualCollection.
        //
        //
        // 参数:
        //   index:
        //     The index of the visual object in the System.Windows.Media.VisualCollection.
        //
        //
        // 返回结果:
        //     The child in the System.Windows.Media.VisualCollection at the specified index
        //     value.
        protected virtual Visual GetVisualChild(int index);
        //
        // 摘要:
        //     Determines whether a point coordinate value is within the bounds of the visual
        //     object.
        //
        // 参数:
        //   hitTestParameters:
        //     A System.Windows.Media.PointHitTestParameters object that specifies the System.Windows.Point
        //     to hit test against.
        //
        // 返回结果:
        //     A System.Windows.Media.HitTestResult that represents the System.Windows.Media.Visual
        //     that is returned from a hit test.
        protected virtual HitTestResult HitTestCore(PointHitTestParameters hitTestParameters);
        //
        // 摘要:
        //     Determines whether a geometry value is within the bounds of the visual object.
        //
        //
        // 参数:
        //   hitTestParameters:
        //     A System.Windows.Media.GeometryHitTestParameters object that specifies the System.Windows.Media.Geometry
        //     to hit test against.
        //
        // 返回结果:
        //     A System.Windows.Media.GeometryHitTestResult that represents the result of the
        //     hit test.
        protected virtual GeometryHitTestResult HitTestCore(GeometryHitTestParameters hitTestParameters);
        //
        // 摘要:
        //     Called when the DPI at which this View is rendered changes.
        //
        // 参数:
        //   oldDpi:
        //     The previous DPI scale setting.
        //
        //   newDpi:
        //     The new DPI scale setting.
        protected virtual void OnDpiChanged(DpiScale oldDpi, DpiScale newDpi);
        //
        // 摘要:
        //     Removes the parent-child relationship between two visuals.
        //
        // 参数:
        //   child:
        //     The child visual object to remove from the parent visual.
        protected void RemoveVisualChild(Visual child);
        //
        // 摘要:
        //     Called when the System.Windows.Media.VisualCollection of the visual object is
        //     modified.
        //
        // 参数:
        //   visualAdded:
        //     The System.Windows.Media.Visual that was added to the collection.
        //
        //   visualRemoved:
        //     The System.Windows.Media.Visual that was removed from the collection.
        protected internal virtual void OnVisualChildrenChanged(DependencyObject visualAdded, DependencyObject visualRemoved);
        //
        // 摘要:
        //     Called when the parent of the visual object is changed.
        //
        // 参数:
        //   oldParent:
        //     A value of type System.Windows.DependencyObject that represents the previous
        //     parent of the System.Windows.Media.Visual object. If the System.Windows.Media.Visual
        //     object did not have a previous parent, the value of the parameter is null.
        protected internal virtual void OnVisualParentChanged(DependencyObject oldParent);
    }
}

image

image

 

posted @ 2026-06-15 11:45  Tony.Jia  阅读(7)  评论(0)    收藏  举报