Share via


IXRGeometry (Compact 2013)

3/28/2014

This class provides a base class for objects that define shapes.

Syntax

class IXRGeometry : public IXRDependencyObject

Inheritance Hierarchy

IXRDependencyObject

  IXRGeometry

    IXREllipseGeometry

    IXRGeometryGroup

    IXRLineGeometry

    IXRPathGeometry

    IXRRectangleGeometry

Methods

In addition to the methods inherited from IXRDependencyObject, this class contains the following methods.

Name

Description

IXRGeometry::GetBounds

Retrieves the bounding box of the current object.

IXRGeometry::GetTransform

Retrieves the IXRTransform derived object that affects the current object.

IXRGeometry::SetTransform

Applies an IXRTransform derived object to the current object.

Thread Safety

Members of this class are thread-safe if you previously called IXRApplication::CreateHostFromXaml and supplied it with an XRWindowCreateParams structure that has AllowsMultipleThreadAccess set to true.

Remarks

You can use IXRGeometry objects to clip regions and to define geometry for rendering two-dimensional graphic data as a path.

IXREllipseGeometry, IXRLineGeometry, and IXRRectangleGeometry are simple geometries that specify the geometrical shape as one element with basic coordinate or dimension properties. IXRGeometryGroup uses a collection of IXRGeometry objects to define a complex geometry. IXRPathGeometry uses a collection of IXRPathFigure objects to define a complex geometry.

When you create a class instance, use an IXRGeometryPtr smart pointer instead of a raw interface pointer. For more information, see XRPtr<Interface>.

You can also define an IXRGeometry object in Microsoft Silverlight 3 XAML. For information about the differences between XAML in XAML for Windows Embedded and Silverlight 3, see Differences Between Microsoft Silverlight 3 and XAML for Windows Embedded. For more information about how to define this element in the source XAML for your application, see the Geometry Class on MSDN.

IXRGeometry Compared to IXRShape

The IXRShape class and the classes that derive from it have rendering properties that IXRGeometry and its derived classes lack. IXRShape derives from IXRFrameworkElement and therefore can render itself. You can use its derived classes as content in any element that supports IXRUIElement children.

The geometry classes define the geometry of graphic elements and are used to define a path.

.NET Framework Equivalent

System.Windows.Media.Geometry

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

Classes for Visual Appearance
IXRPath::SetData