ID2D1Geometry interface

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.

Members

The ID2D1Geometry interface inherits from ID2D1Resource. ID2D1Geometry also has these types of members:

Methods

The ID2D1Geometry interface has these methods.

MethodDescription
CombineWithGeometry Overloaded.

Combines this geometry with the specified geometry and stores the result in an ID2D1SimplifiedGeometrySink.

CompareWithGeometry Overloaded.

Describes the intersection between this geometry and the specified geometry.

ComputeArea Overloaded.

Computes the area of the geometry.

ComputeLength Overloaded.

Calculates the length of the geometry as though each segment were unrolled into a line.

ComputePointAtLength Overloaded.

Calculates the point and tangent vector at the specified distance along the geometry.

FillContainsPoint Overloaded.

Indicates whether the area filled by the geometry would contain the specified point.

GetBounds Overloaded.

Retrieves the bounds of the geometry.

GetWidenedBounds Overloaded.

Gets the bounds of the geometry after it has been widened by the specified stroke width and style and transformed by the specified matrix.

Outline Overloaded.

Computes the outline of the geometry and writes the result to an ID2D1SimplifiedGeometrySink.

Simplify Overloaded.

Creates a simplified version of the geometry that contains only lines and (optionally) cubic Bezier curves and writes the result to an ID2D1SimplifiedGeometrySink.

StrokeContainsPoint Overloaded.

Determines whether the geometry's stroke contains the specified point.

Tessellate Overloaded.

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.

Widen Overloaded.

Widens the geometry by the specified stroke and writes the result to an ID2D1SimplifiedGeometrySink.

 

Remarks

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.

Requirements

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]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Header

D2d1.h

Library

D2d1.lib

DLL

D2d1.dll

See also

Geometry Overview
Transform Geometry Example
Combine Geometries Example
Create Geometry Groups Example
Draw Rectangle Example

 

 

Community Additions

ADD
Show:
© 2014 Microsoft