Visual
Description
Abstract base class for IVisual implementations.
The default implementation of IEquatable.Equals and object.GetHashCode use object identity, subclasses may override them in order to provide other definitions for equality.
Public / Constructors
Vector
Creates a new instance of IVisual that wraps a IVectorImage.
The calling code is responsible for making sure that image in does not get disposed while the returned IVisual is in use.
Public / Methods
ComputeAlignedBounds
Computes the pixel alignment of the given visualBounds in when using the given resolution in.
First, the resolution in is used to convert visualBounds in to pixel coordinates, which will usually have non-integral value. Then, the pixel bounds are enlarged, so that top-left and bottom-right corners align with the respective pixel corner, which makes pixel coordinate values integral. Finally, the enlarged pixel bounds are scaled back to visual units, which yields the aligned visual bounds.
- See also