Represents a geometry resource and defines a set of helper methods for manipulating and measuring geometric shapes. Interfaces that inherit from ID2D1Geometry define specific shapes.
When to implement
Custom implementations are not supported.
The ID2D1Geometry interface inherits from ID2D1Resource. ID2D1Geometry also has these types of members:
The ID2D1Geometry interface has these methods.
Combines this geometry with the specified geometry and stores the result in an ID2D1SimplifiedGeometrySink.
Describes the intersection between this geometry and the specified geometry.
Computes the area of the geometry.
Calculates the length of the geometry as though each segment were unrolled into a line.
Calculates the point and tangent vector at the specified distance along the geometry.
Indicates whether the area filled by the geometry would contain the specified point.
Retrieves the bounds of the geometry.
Gets the bounds of the geometry after it has been widened by the specified stroke width and style and transformed by the specified matrix.
Computes the outline of the geometry and writes the result to an ID2D1SimplifiedGeometrySink.
Creates a simplified version of the geometry that contains only lines and (optionally) cubic Bezier curves and writes the result to an ID2D1SimplifiedGeometrySink.
Determines whether the geometry's stroke contains the specified point.
Creates a set of clockwise-wound triangles that cover the geometry after it has been transformed using the specified matrix and flattened using the specified tolerance.
Widens the geometry by the specified stroke and writes the result to an ID2D1SimplifiedGeometrySink.
There are several types of Direct2D geometry objects: a simple geometry (ID2D1RectangleGeometry, ID2D1RoundedRectangleGeometry, or ID2D1EllipseGeometry), a path geometry (ID2D1PathGeometry), or a composite geometry (ID2D1GeometryGroup and ID2D1TransformedGeometry).
Direct2D geometries enable you to describe two-dimensional figures and also offer many uses, such as defining hit-test regions, clip regions, and even animation paths.
Direct2D geometries are immutable and device-independent resources created by ID2D1Factory. In general, you should create geometries once and retain them for the life of the application, or until they need to be modified. For more information about device-independent and device-dependent resources, see the Resources Overview.
Minimum supported client
|Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | Windows Store apps]|
Minimum supported server
|Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | Windows Store apps]|
- Geometry Overview
- Transform Geometry Example
- Combine Geometries Example
- Create Geometry Groups Example
- Draw Rectangle Example
Build date: 11/16/2013