ImageGear .NET v24.12 - Updated
Displaying and Manipulating Vector Data
User Guide > How to Work with... > SVG and Other Vector Formats > ImGearVectPage > Displaying and Manipulating Vector Data

Vector drawings are displayed using the normal ImageGear display methods. However, there is a specific API for controlling display and manipulation of the vector data. ImGearVectPage Class provides a property called VectorData Property, which returns an ImGearVectorData Class object that can be used to access a drawing's vector data. This object provides methods and properties for working with individual vector entities as well as controlling how the vector data is displayed.   

Also see the C# Vector sample for a demonstration of the use of ImGearVectorData Class

Working with Gradient Filling

Gradient filling properties are encapsulated in ImGearVectorGradient Class. Objects of this class are attached to ImGearVectorFilltype Class objects.

There are two types of gradient fillings: linear and radial. They are represented by ImGearVectorGradientLinear Class and ImGearVectorGradientRadial Class, respectively.

A linear gradient is defined by its start and end points. A radial gradient is defined by a start point and an outer circle. The start point should be located inside the outer circle, but not necessarily in its center. Coordinates of the gradient can be absolute or relative (to the bounding rectangle of the entity that uses the gradient).

The color of the gradient is defined by an array of stops. A stop comprises a pair of offset and color. Stop offsets are relative to gradient coordinates. 0.0 corresponds to the start point, 1.0 corresponds to the end points, in the case of a linear gradient, or to a point at the outer circle, in the case of radial gradient. If the first stop offset is greater than 0.0, or the last stop offset is less than 1.0, the gradient is expanded according to its SpreadMethod. Gradient color is linearly interpolated between the stops.

A gradient filling can be transformed with an affine matrix.